Cross-tab infinite loop

Hello all,

I have a cross-tab object on Fastreports 5.6.8.

If the cross-tab goes beyond the width of one page, it tries to re-print the same report an infinite number of times.

I've had it work a couple of times, depending on what kind of band the cross-tab is in, but usually it just crashes with a stack overflow.


To re-produce, create a cross-tab with 1 row, 3 columns, 1 cell, and the following checked:

Show Corner
Column Header
Row Header
Auto size
Border around cells
Reprint headers on new page
side-by-side cells

Then add this code:

procedure Cross1OnBeforePrint(Sender: TfrxComponent);
begin

Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);
Cross1.AddValue(,,[5]);

end;

Infinite loop.

Anybody else get this?

What is the fix?

thanks


Leave a Comment