Report Width Has to be Greater than Print Width | Red dotted line handler

Posted by: justy2k4 on 4 August 2017, 3:21 pm EST

  • Posted 4 August 2017, 3:21 pm EST


    I am developing 2 types of reports as follows:

    1. One that adds controls dynamically in run-time; thus, number of columns...etc can make the report width greater than the print width. This is when the "red dotted line" shows in print preview and I see the rest my data on the right side of the red line. The data on the right side of the red line prints on a new page with no page header\groupheader what so ever.

    2. The other report is already greater in width compared to the print width. Example:

    Column1 | Column2 | Column3.. | ColumnN

    01/11 | xxxx | yyyy | cccccc

    01/12 | xxx1 | yyy1 | ccccc1

    Let's say I have 15 columns that goes from Column1 through Column 15. And I see the red dotted line after Column 10. What I want to be able to do is keep the exact same data of Column1 on the "new page" which will be printed due to the red dotted line and then display data from Column 11 through Column 15. So I have something like: ( The below example assumes the red line appears after Col4.


    Col#1 | Col2|Col3|Col4

    01/11 | xxx | yyy | zzz

    01/12 | xx1 | yy1 | zz1


    01/11 | aaa | bbb | ccc

    01/12 | aaa1|bbb1 | ccc1

    I am using Active Report 2.0 ( with VB 6.0 support ).
  • Replied 4 August 2017, 3:21 pm EST


    Unfortuantely your requirement may not b accomplished with a single report. You may however create two different reports to meet your requirement.

    1) Create Report1 to fit Columns 1....n(depending on the printwidth) and Report2 to fit Columns 7... etc
    2) Run each report individually to create the Pages collection
    3) Merge the reports page by page such that the final collection becomes Page1 from Report1 followed by Page1 from Report2 followed by Page2 from Report1...

    You can also increase the printwidth and the papersize of the report to meet this requirement.Though this might cause some issue while printing them as the printer to which you would be printing should support an papersize of the same width.

  • Replied 4 August 2017, 3:21 pm EST


    Thanks for your response. I was thinking more along the line of something like:

    1. Display data on Page1 and calculate the report width. Once the report width is greater than the print width, then I do a PageBreak.Enabled = "True" and start working with the 2nd page.

    2. Before the report gets to the 2nd page, I add a "PageEnd" event and in that event I can call the OnReportStart again.

    3. Within the OnReportStart I use a global variable to determine if it is the 1st page data or 2nd page data...etc so if it is the 2nd page data than I discard the data I already displayed on the 1st page and just start working with the remaining data.

    However, this doesn't seem to be working quite right because even though I am telling the report to display the remaining data it is still display data from the 1st page.

    I will try your suggested way and see if I can get this to work.
  • Replied 4 August 2017, 3:21 pm EST


    The approach that you were trying to use may get a little too complicated. Moreover, for a single instance of a report, there may be a single reportstart event. So, I guess you may try using the suggestions in my last post and it should help you get the desired output.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels