Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

Subreport formats infinite pages

edited April 2003 in Subreports
Greetings,


I have two related applications, one used to design reports and a main
application that runs them. The designer allows the report author to preview
the report. The main application does not allow the report template to be
modified, but allows it to be previewed or printed. I have a number of
reports that include subreports that run correctly when previewed with the
designing application, but appear to enter an infinite loop from the main
application. All reports that do not involve subreports, as well as all that
have subreports, but for which there is no subreport data, run fine in both
applications.


I have examined the property settings of the ppReport object, the datasets,
data sources and pipelines in each case and found them to be virtually
identical. Of course, the applications themselves are very different. What
other aspect of the applications could cause this problem?


Regards,



Andy

Comments

  • edited April 2003
    The default printer that the machine is connected to is problably different.
    Try increasing the margins for the report layouts to support at least a
    margine of 0.25 inches which should work on most printers. This is the
    unprintable area. Check the printer driver specs on the unprintable area to
    be sure you support. There are WinAPI calls you can make to get the printer
    device capabilities information at runtime as well.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited April 2003
    Greetings,


    Jim, thanks for the quick response.

    However, I found and solved my own problem, thanks to information from the
    article "TroubleShooting: Report Prints Endless Pages". The subreport's
    DataPipeline was nil. This seemed to be caused by loading the report
    template (which includes the subreport's DataPipeline) before creating the
    DataPipeline. Apparently, the load of the template set the subreport's
    DataPipeline property to nil, because the DataPipeline did not exist.

    The application used to design the reports reloads the report template just
    before calling the print method, so the subreport's DataPipeline existed and
    therefore the report worked correctly.

    Moving the load of the template in the main application
    until after the DataPipeline was created solved the problem.



  • edited April 2003
    Yes, a subreport with its data pipeline set to nil will cause that. Happy to
    hear that you've figured it out.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited May 2003
    Jim,

    I have sub reports that do not have a datapipeline assigned to them and do
    not have an endless print problem.

    The reason these subreports do not have a datapipeline assigned is because
    the fields in the subreport come from several datapipelines. In this case
    what (if any) pipeline would you assign to the subreport itself?

    Thanks,

    Tom



  • edited May 2003
    They probably don't generate infinite pages because they have
    Subreport.Report.Autostop set to true. This is what you need to set when you
    don't want to connect a pipeline to a report or subreport. RB should
    automatically set this property properly when you create a report or connect
    a pipeline.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.