Minimum detail height?
To simplify, in this problem, let's call it as an invoice printing "report".
In this report, I have header and footer, both fixed height. In the detail
band (Dynamic height), I have a subreport component, that is used to print
the items from the invoice., using shapes and lines to make it looks like a
grid. As you can guess, the number of items in an invoice can vary.
The "space/height" designed to the items in the form, is ie. 10cm. The
problem is, it doesnt matter if I have just one item in the invoice, I need
that the "grid" occupy the whole height (10cm). So, if I have 1, 2, 5, 10,
etc items, the grid needs to be draw always at the same size/height.
Any ideas about how can I do this with RB?
Carlos
In this report, I have header and footer, both fixed height. In the detail
band (Dynamic height), I have a subreport component, that is used to print
the items from the invoice., using shapes and lines to make it looks like a
grid. As you can guess, the number of items in an invoice can vary.
The "space/height" designed to the items in the form, is ie. 10cm. The
problem is, it doesnt matter if I have just one item in the invoice, I need
that the "grid" occupy the whole height (10cm). So, if I have 1, 2, 5, 10,
etc items, the grid needs to be draw always at the same size/height.
Any ideas about how can I do this with RB?
Carlos
This discussion has been closed.
Comments
One option is to create the grid behind the subreport using the PageStyle
band. This way it will always print as-is regardless how much data is
displayed.
Otherwise you will need to manually create the drawcommands on the page to
complete the grid after the report has finished traversing all the data.
Below is a similar example.
http://www.digital-metaphors.com/rbWiki/Delphi_Code/Formatting/How_To..._Fill_a_page_with_lines
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
code example, I see:
lDrawLine := TppDrawLine.Create(nil);
But I can't see any code to free the lDrawLine object. Isn't it necessary?
Carlos
No need, the page object will take care of freeing the drawcommand when it
is destroyed.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com