URGENT: Getting height of a dynamic group or band at runtime
Hi,
I am trying to get the height of a group which is kept together. I need
to re-order the table in order to print them at minimum number of
pages. For example;
G1: Height = 6/10 of page height
G2: Height = 7/10 of page height
G3: Height = 4/10 of page height
RB will print it to 3 pages. But if I rearrange records to order G1,
G3, G2, it will fit to 2 pages. I tried AfterPrint and AfterGenerate
events without success.
Any chance?
PS: Using RB7.02 & D6.
Sean
I am trying to get the height of a group which is kept together. I need
to re-order the table in order to print them at minimum number of
pages. For example;
G1: Height = 6/10 of page height
G2: Height = 7/10 of page height
G3: Height = 4/10 of page height
RB will print it to 3 pages. But if I rearrange records to order G1,
G3, G2, it will fit to 2 pages. I tried AfterPrint and AfterGenerate
events without success.
Any chance?
PS: Using RB7.02 & D6.
Sean
This discussion has been closed.
Comments
You can try using the Band.AfterGenerate event to check the Band.SpaceUsed
property. The units are microns, therefore you might want to convert to
inches or some other units. There are some routines defined in ppUtils.pas
that enable conversion. Most common are ppFromMMThousandths and
ppToMMThousandths.
That being said, you cannot modify the dataset or affect pagination while
the report is generating.
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Thanks
Sean
I do not need to rearrange on the fly. So no problem.
Thanks
Sean