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

Report Subreport question

edited February 2006 in General
This is going to be a little difficult to ask but here goes...

I have a report that has detail reports on it. Inside those subreports are
other subreports. As a subreport prints I have logic for example that says:
if the labor for this detail report does not exist then don't print that
section. However, due to labor existing for 4 of the 5 jobs I'm printing,
if any of them do not exist and I hit the code that turns it off, it turns
it off for the entire report.

Here is an example:

I have 4 jobs that need to print and I have parts associated with each job.
The report prints the first job and its 3 parts along with a total. Then it
prints the second job and its 2 parts and total. Then the 3rd. However,
when getting to the 4th I see that there are no parts for the job and
therefore turn off the band that contains the totals for that job because I
don't want to print a blank line that just has a heading on it.

However, as soon as I turn that band off, all of the other previously
printed bands disappear. You can actually see the bands when the report
first opens and then they disappear a fraction of a second later once it
hits the last job.

Is there a way to have the report actually print itself and therefore allow
you to turn things on and off without it effecting the entire report?

Thanks,

glenn

Comments

  • edited February 2006
    Hi Glenn,

    By "Turning the band off" do you mean you are setting all the component's
    visble properties to False? Just from reading your description below, my
    first guess would be that you have a TwoPass report and are setting the
    visibility of the band in the first pass, so when the second pass comes
    around, the entire report is invisible. Try using the Report.FirstPass and
    Report.SecondPass properties to determine which pass you are on before
    setting the visibility of components in a band. Also, be sure you are
    re-assigning the visible property after the band with no parts is done with.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.