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

Problems with sub-report

edited February 2005 in General
I'm trying to do a report that have some sub-reports that I use to calculate
values with calculate variables. Then
I put that value on a global variable, and finally assign the value of that
global variable in the OnGetText event of
the label that is on the main report. But then I must hide the sub-reports
(I only use it to calculate values from several
dataviews). I tried to put Visible = False in some events, and the
sub-reports don't appear on the report, but all the values that I calculate
got the value of 0 (zero). If I don't hide them the values are correct.

What can I do?

Thanks

IM

Comments

  • edited February 2005
    Nico Cizik (Digital Metaphors) wrote:


    Is there any way in RB, by only using RAP, to build a report which
    transverse independent data views and lists aggregate results.

    One solution is to use a sub report for each dataview, but as you say I
    can't hide the subreport and I just only want to list the sum of each
    dataview in the main report.

    MacBar
  • edited February 2005
    Hi,

    When you set the visibility of a subreport to False, none of the objects
    inside the subreport are generated and therefore, none of the events
    corresponding to those objects are fired. If you need to make a calculation
    as data traverses, you will either need to keep the subreport visible or
    make the calculation outside of ReportBuilder previous to printing.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2005
    Hi MacBar,

    ReportBuilder was not designed to make aggregate calculations during report
    generation. Any processing that you need to do as far as traversing your
    data and calculating a result that you do not want printed on your report
    will need to be done separate from the report generator. (before calling
    Report.Print).

    --
    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.