Unlimited Paper Height in .Net
So far Fastreport does nicely whatever we needed. However, I'm stuck with paper height setting (through VB code) for continous printing paper sources.
Understood, its not available as an option in .Net but it is available in FR 4.0 Studio. Since, its a windows form application developed using VB.Net, it could be simpler if some work around can be available using code.
Any help is highly appreciated.
Understood, its not available as an option in .Net but it is available in FR 4.0 Studio. Since, its a windows form application developed using VB.Net, it could be simpler if some work around can be available using code.
Any help is highly appreciated.
Comments
We plan to add such property in one of the next major builds. Now you may use the report script to set the page height. Make your report two-pass. Use the script to calculate the report height on the first pass, and set the page height on the final pass.
See the attached report.
Alex rocks !!! Works wonderfuly. Thank mate.
Sorry I am new to Fast Reports.net.
I recreated a report on the basis of your report. But each record prints on 1 page.
How to create a report with two-pass ?
P.S. I want to change the height of the page based on the number of records. All records should be printed in a single page.
Thanks in advance.
You probably forgot to connect BeforePrint event handlers to the bands. You may attach your report here for review.
What code should I handle within the BeforePrint event handlers of the bands?
I created a simple report using the report wizard and connecting to the Northwind access database employees table.
I selected three columns ID, FirstName and LastName.
I did nothing else except adding code from your example.
Am I missing something ?
Please advise.
Thanks in advance.
http://fast-report.com/documentation/UserM...enthandlers.htm
I have worked around the problem. Please reply is there any other way of doing this.
1. I have created two reports billbase, billPrint.
2. In billbase, I created a public method called GetRows in which I pass the number of rows counted from Data_event.
3. I prepare the report and get the number of rows from the report.
4. In billPrint I created a public method called SetRows in which I pass the number of rows.
5. In the Page1_StartPage event I multiply the number of rows with the databand height and add the report header, footer heights.
6. Then I print the report.
The report prints correctly as intended.
Am I doing this the right way or is there an easier way of doing this.
Thanks in advance.
Not the good way. Will not work if the databand has CanGrow/CanShrink options. Why you don't use the example I've posted in this topic?
I finally made it to work as expected with a slight modification in your code.
I made a report with double pass and added the following code.
Please inform me - is my code correct.
Yes, it's correct.
I am having trouble doing this with my report as it already contains quite a lot of code. Page1.height seems to be doing nothing in my case and is defaulting to the 'page.height' specified in the property.