Sum #Error in sub reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a problem with showing sums in subreport, couldnt find any similar
problem by browsing the forum.
The main report is a unbound report including a subreport. This subreport is
including another subreport, said in other words, 3 levels. The main report
is only a can for the subreports.
The subreport (level 3) gets its data from a query, the summing of the data
is in a textbox in the footer.
The level 3 subreport is embed in a new subreport, level 2. The sums from
level 3 is "picked up" with expressions in tex boxes in level 2, e.g.
=IIf([Status4]=4;[nameof rptlevel3]![name of txtbox level3];Null)
If I open the subreport level 2, the sums are shoving if theres data in the
query, if theres no data, no sums are shown. This is the way it should be.

Now, the problem is when I put the the subreport in the main report.
If I open the main report, the sums are shoving if theres data in the query,
if theres no data, the text boxes shows #Error.
What do I do wrong?
If you need more info, i will be pleased to answer any question.
 
TomH said:
I have a problem with showing sums in subreport, couldnt find any similar
problem by browsing the forum.
The main report is a unbound report including a subreport. This subreport is
including another subreport, said in other words, 3 levels. The main report
is only a can for the subreports.
The subreport (level 3) gets its data from a query, the summing of the data
is in a textbox in the footer.
The level 3 subreport is embed in a new subreport, level 2. The sums from
level 3 is "picked up" with expressions in tex boxes in level 2, e.g.
=IIf([Status4]=4;[nameof rptlevel3]![name of txtbox level3];Null)
If I open the subreport level 2, the sums are shoving if theres data in the
query, if theres no data, no sums are shown. This is the way it should be.

Now, the problem is when I put the the subreport in the main report.
If I open the main report, the sums are shoving if theres data in the query,
if theres no data, the text boxes shows #Error.
What do I do wrong?
If you need more info, i will be pleased to answer any question.


Change the expression to check the subreport's HasData
property. Maybe something like:

=IIf([nameof rptlevel3].REPORT.HasData And [Status4]=4;
[nameof rptlevel3].REPORT![name of txtbox level3];Null)
 
Back
Top