summing & HasData expression

sullivan

Registered User.
Local time
Today, 21:56
Joined
Apr 24, 2001
Messages
48
On a report, with a subreport, I am using the HasData expression to pull the value from a control on the subreport onto the main report.
=IIf([Consultation Subreport].[Report].[HasData]=-1,[Consultation Subreport].[Report]![TotalFee],0)

In the report footer there is a series of grand totals, and the users would like to have a grand total for the field off of the subreport. I tried using the name (RefTotalFee) of the HasData field, but that doesn't work. I also tried making a copy of the field, putting it in the footer, and putting a runningsum over all on it - but this doesn't work either. Is there anything I can do?
Thanks in advance.
 
Did you ever get an answer for this? I also need to know how to Sum my HasData that is bringing info from a subreport. Can anyone help?

Jennifer
 
Why can't you Sum the data on the subReport?
 
I need to sum the data on the main report because it's using a different grouping level than the subreport. I have the info coming in fine from the control using the same kind of hasdata statement as above, I just need to Sum the statement.

Jennifer
 
=Sum(IIf([MoniesRecd].[Report].[HasData],[MoniesRecd]![Report]![fldPymnt],0))
I think that's what your looking for.
 
I thought so too! But I used that, and I get asked for the parameter of my subreport.hasdata. Could I have the controls in the wrong place? I have a group header and footer. Header has the Account number, and I want Footer to have the subtotals for that Account. Details has all of the items that share that account number, and this is where my subreports and controls bringing in that info are.

Thanks for your help, Rich. Any ideas what I'm doing wrong here?

P.S. - I also tried using the RunningSum property and setting it to OverGroup, but it SUM's OverAll even though it's in the group footer. ARGH!

Jennifer

[This message has been edited by JCross (edited 04-09-2002).]
 
OK - It's a bit convoluted, but I added an invisible control to the Details, RunningSum OverGroup...and then made a visible control in the Footer referencing the invisible control. Not pretty, but it works. On to the next problem!!

Thanks for your help.

Jennifer
 

Users who are viewing this thread

Back
Top Bottom