如何修复Nevrona Rave中无尽的打印循环错误

时间:2021-08-16 17:34:54

Nevrona Designs' Rave Reports is a Report Engine for use by Embarcadero's Delphi IDE.

Nevrona Designs的Rave Reports是一个报告引擎,供Embarcadero的Delphi IDE使用。

This is what I call the Rave Endless Loop bug. In Rave Reports version 6.5.0 (VCL10) that comes bundled with Delphi 2006, there is a nortorious bug that plagues many Rave report developers. If you have a non-empty dataset, and the data rows for this dataset fit exactly into a page (that is to say there are zero widow rows), then upon PrintPreview, Rave will get stuck in an infinite loop generating pages.

这就是我所说的Rave Endless Loop错误。在与Delphi 2006捆绑在一起的Rave Reports版本6.5.0(VCL10)中,存在一个困扰许多Rave报告开发人员的恶劣错误。如果你有一个非空的数据集,并且这个数据集的数据行完全适合页面(也就是说没有寡行),那么在PrintPreview上,Rave将陷入无限循环生成页面。

This problem has been previously reported in this newsgroup under the following headings:

此新闻组先前已在以下标题中报告此问题:

  1. "error: generating infinite pages"; Hugo Hiram 20/9/2006 8:44PM
  2. “错误:生成无限页面”; Hugo Hiram 20/9/2006 8:44 PM

  3. "Rave loop bug. Please help"; Tomas Lazar 11/07/2006 7:35PM
  4. “Rave loop bug。请帮忙”; Tomas Lazar 11/07/2006 7:35 PM

  5. "Loop on full page of data?"; Tony Chistiansen 23/12/2004 3:41PM
  6. “循环整页数据?”; Tony Chistiansen 23/12/2004 3:41 PM

  7. reply to (3) by another complainant; Oliver Piche
  8. 另一名投诉人回复(3);奥利弗·皮切

  9. "Endless lopp print bug"; Richso 9/11/2004 4:44PM
  10. “无尽的lopp打印bug”; Richso 9/11/2004 4:44 PM

In each of these postings, there was no response from Nevrona, and no solution was reported.

在每个帖子中,Nevrona都没有回复,也没有报告任何解决方案。

Possibly, the problem has also been reported on an allied newsgroup (nevrona.public.rave.reports.general), to wit: 6. "Continuously generating report"; Jobard 20/11/2005 Although it is not clear to me if (6) is the Rave Endless loop bug or another problem. This posting did get a reply from Nevrona, but it was more in relation to multiple regions ("There is a problem when using multiple regions that go over a page-break.") than the problem of zero widows.

可能还有一个联盟新闻组(nevrona.public.rave.reports.general)报道了这个问题,即:6。“不断产生报告”; Jobard 20/11/2005虽然我不清楚(6)是Rave Endless循环错误还是其他问题。这个帖子确实得到了Nevrona的回复,但是与多个地区相关的更多(“当使用多个区域超过分页时存在问题。”)而不是零寡妇的问题。

4 个解决方案

#1


2  

This is more of a work-around than a true solution. I first posted this work-around on the Nevrona newsgroup (Group=nevrona.public.rave.developer.delphi.rave; Subject="Are you suffering from the Rave Endless Loop bug?: Work-around announced."; Date=13/11/2006 7:06 PM)

这更像是一种解决方案而非真正的解决方案。我首先在Nevrona新闻组上发布了这个解决方法(Group = nevrona.public.rave.developer.delphi.rave; Subject =“你是否患有Rave Endless Loop错误?:解决方案宣布。”;日期= 13 / 11/2006 7:06 PM)

So here is my solution. It is more of a work-around than a good long-term solution, and I hope that Nevrona will give this issue some serious attention in the near future.

所以这是我的解决方案。它更像是一种解决方案,而不是一种长期良好的解决方案,我希望Nevrona在不久的将来能够对这个问题给予一些认真的关注。

  1. Given your particular report layout, count the maximum number of rows per page. Let us say that this is 40.
  2. 根据您的特定报表布局,计算每页的最大行数。让我们说这是40。

  3. Set up a counter to count the rows within the page (as opposed to rows within the whole report). You could do this either by event script or by a CalcTotal component.
  4. 设置计数器以计算页面中的行数(而不是整个报告中的行)。您可以通过事件脚本或CalcTotal组件执行此操作。

  5. Define an OnBeforePrint scripted event handler for the main data band.
  6. 为主数据带定义OnBeforePrint脚本事件处理程序。

  7. In this event handler set the FinishNewPage property of the main data band to be True when the row-per-page count is one or two below the max (in our example, this would be 38). And set it to False in all other cases. The effect of this is to give every page a non-zero number of widows (in this case 1..38), thus avoiding the condition that gives rise to the Rave Endless loop problem.
  8. 在此事件处理程序中,当每页行数比最大值低一(2)时,将主数据带的FinishNewPage属性设置为True(在我们的示例中,这将是38)。在所有其他情况下将其设置为False。这样做的效果是为每个页面提供非零数量的寡妇(在这种情况下为1..38),从而避免产生Rave Endless循环问题的条件。

#2


1  

Thanks so much for this Sean - unfortunately this wouldn't work for me but I came up with another solution... You see I have a memo at the top of the region that might expand or contract depending on how many notes the user has left in the database. This means that the number of rows that can fit on a page varies. However. there is another solution - you use the MaxHeightLeft property of a databand. All you do is measure the height of your databand, multiply it by 2, and put this in your MaxHeightLeft property. This will force 1 or 2 records onto the next page if it fills up that much.

非常感谢Sean - 不幸的是,这对我不起作用,但我提出了另一个解决方案......你看我在该地区的顶部有一份备忘录可能会扩展或收缩,具体取决于用户有多少笔记留在数据库中。这意味着页面上可以容纳的行数会有所不同。然而。还有另一种解决方案 - 您使用数据和的MaxHeightLeft属性。您所做的只是测量数据的高度,将其乘以2,并将其放在MaxHeightLeft属性中。如果它填满那么多,这将强制1或2个记录到下一页。

#3


0  

thank's a lot, this thread helps me out from my problem with endless printing loop in Nevrona Rave...., I set MinHeightLeft to 0,500, this setting is work but i'm not sure that it will work for anothers result set of my query report.

非常感谢,这个帖子帮助我解决了我在Nevrona Rave中无休止的打印循环的问题....,我将MinHeightLeft设置为0,500,这个设置是可行的,但我不确定它是否适用于我的其他结果集查询报告。

#4


0  

Master, The solution is MinHeightLeft to 0,500 , i use property wastefit area in true and generated the loop in the second print, but when changed the property MinHeightLeft to 0,500 the error disapear.

Master,解决方案是MinHeightLeft为0,500,我在true中使用属性wastefit区域并在第二次打印时生成循环,但是当将属性MinHeightLeft更改为0,500时错误消失。

Thanks !

Atte Fabiola Herrera. Fabi_ucv@hotmail.com

Atte Fabiola Herrera。 Fabi_ucv@hotmail.com

#1


2  

This is more of a work-around than a true solution. I first posted this work-around on the Nevrona newsgroup (Group=nevrona.public.rave.developer.delphi.rave; Subject="Are you suffering from the Rave Endless Loop bug?: Work-around announced."; Date=13/11/2006 7:06 PM)

这更像是一种解决方案而非真正的解决方案。我首先在Nevrona新闻组上发布了这个解决方法(Group = nevrona.public.rave.developer.delphi.rave; Subject =“你是否患有Rave Endless Loop错误?:解决方案宣布。”;日期= 13 / 11/2006 7:06 PM)

So here is my solution. It is more of a work-around than a good long-term solution, and I hope that Nevrona will give this issue some serious attention in the near future.

所以这是我的解决方案。它更像是一种解决方案,而不是一种长期良好的解决方案,我希望Nevrona在不久的将来能够对这个问题给予一些认真的关注。

  1. Given your particular report layout, count the maximum number of rows per page. Let us say that this is 40.
  2. 根据您的特定报表布局,计算每页的最大行数。让我们说这是40。

  3. Set up a counter to count the rows within the page (as opposed to rows within the whole report). You could do this either by event script or by a CalcTotal component.
  4. 设置计数器以计算页面中的行数(而不是整个报告中的行)。您可以通过事件脚本或CalcTotal组件执行此操作。

  5. Define an OnBeforePrint scripted event handler for the main data band.
  6. 为主数据带定义OnBeforePrint脚本事件处理程序。

  7. In this event handler set the FinishNewPage property of the main data band to be True when the row-per-page count is one or two below the max (in our example, this would be 38). And set it to False in all other cases. The effect of this is to give every page a non-zero number of widows (in this case 1..38), thus avoiding the condition that gives rise to the Rave Endless loop problem.
  8. 在此事件处理程序中,当每页行数比最大值低一(2)时,将主数据带的FinishNewPage属性设置为True(在我们的示例中,这将是38)。在所有其他情况下将其设置为False。这样做的效果是为每个页面提供非零数量的寡妇(在这种情况下为1..38),从而避免产生Rave Endless循环问题的条件。

#2


1  

Thanks so much for this Sean - unfortunately this wouldn't work for me but I came up with another solution... You see I have a memo at the top of the region that might expand or contract depending on how many notes the user has left in the database. This means that the number of rows that can fit on a page varies. However. there is another solution - you use the MaxHeightLeft property of a databand. All you do is measure the height of your databand, multiply it by 2, and put this in your MaxHeightLeft property. This will force 1 or 2 records onto the next page if it fills up that much.

非常感谢Sean - 不幸的是,这对我不起作用,但我提出了另一个解决方案......你看我在该地区的顶部有一份备忘录可能会扩展或收缩,具体取决于用户有多少笔记留在数据库中。这意味着页面上可以容纳的行数会有所不同。然而。还有另一种解决方案 - 您使用数据和的MaxHeightLeft属性。您所做的只是测量数据的高度,将其乘以2,并将其放在MaxHeightLeft属性中。如果它填满那么多,这将强制1或2个记录到下一页。

#3


0  

thank's a lot, this thread helps me out from my problem with endless printing loop in Nevrona Rave...., I set MinHeightLeft to 0,500, this setting is work but i'm not sure that it will work for anothers result set of my query report.

非常感谢,这个帖子帮助我解决了我在Nevrona Rave中无休止的打印循环的问题....,我将MinHeightLeft设置为0,500,这个设置是可行的,但我不确定它是否适用于我的其他结果集查询报告。

#4


0  

Master, The solution is MinHeightLeft to 0,500 , i use property wastefit area in true and generated the loop in the second print, but when changed the property MinHeightLeft to 0,500 the error disapear.

Master,解决方案是MinHeightLeft为0,500,我在true中使用属性wastefit区域并在第二次打印时生成循环,但是当将属性MinHeightLeft更改为0,500时错误消失。

Thanks !

Atte Fabiola Herrera. Fabi_ucv@hotmail.com

Atte Fabiola Herrera。 Fabi_ucv@hotmail.com