How to retrieve report dimensions (1 Viewer)

Guus2005

AWF VIP
Local time
Today, 15:56
Joined
Jun 26, 2007
Messages
2,641
Hi,

I am creating an application for the international market. In it there is a report created on-the-fly.
In Europe we use papersize A4 and in the US there is a Letter format.
I want to retrieve the dimensions (height, width) of the report automatically.

When printed to a pdf file it shows a gap between the detail section and the footer. I want to eliminate this gap by filling out the last control to the end of the report.

Should i hardcode this value or is there a way to determine the A4/Letter report height automatically? (Not to mention the report width)

Report.Section(acDetail).Height gives me 5952 twips. Which is the size of the canvas on entry. When added several controls the value is 16000 which still leaves a gap between detail and footer. (there is no header)

Any ideas?

Thx!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:56
Joined
May 7, 2009
Messages
19,242
You have to test on each paper size how many rows can fit on a page. Add as many blank record to the source table. I used, if i am not mistaken, mr.Alessandro's code to fill those blank rows on the report even if there is only 1 or 2 records in the table.
 

Guus2005

AWF VIP
Local time
Today, 15:56
Joined
Jun 26, 2007
Messages
2,641
Hi arnelgp,

Thanks for your answer. Where can i find mr.Alessandro's code?

Thx,
Guus
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:56
Joined
May 7, 2009
Messages
19,242
This is a midified version. The original dont work in my case.
 

Attachments

  • paddedReport.zip
    28.6 KB · Views: 62

Guus2005

AWF VIP
Local time
Today, 15:56
Joined
Jun 26, 2007
Messages
2,641
Thanks Arnelgp.
It is not immediatley clear to me what it does but i will figure it out.
Thx!
 

Users who are viewing this thread

Top Bottom