Problems with sub-report
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
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
This discussion has been closed.
Comments
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
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com