Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Total in Subreport

Status
Not open for further replies.

marylally

Technical User
May 15, 2009
37
US
I've created a main report by userid. My subreport links by userid and also reservationNo.

I have a tourtotal field for each record that matches. I can't seem to get a sum of all the tourtotals on the subreport. Instead it only sums each single record. Any ideas?



MaryBeth
 
Save subreport as a report on its own and hard code userID and ReSNo and check data that returns.

Sounds like something is wrong with SR or you are linking Resno to wrong field.

Modify report until numbers are correct and then reinsert with relevant links to main report.

Ian
 
Hi Ian,
I don't think hard coding is my answer as the sub needs to look at the same database each time a new date parameter is entered.

Also, I don't have UserID(Number) I have UserName(string)
I know I stated I had userno previously, but it's actually userName.

I was able to add the subreport again in the group header and use your formula from before, unfortunately it still only adds all tours not tours per user. Mary

MaryBeth
 
Thats not what I meant

Test the SR on its own with known UserName and ResNo and make sure its working correctly. When returning correct data remove hard coded filters and link back in as required.

Ian
 
Ian,
I can't find the filter button?

I think my problem is that the subreport is treating each mathcing record as one? I can only get 1 for each match.
In my subreport I have this formula in the header

whileprintingrecords;
numbervar user;

In the Footer I have this formula which only wants to bring back 1 instead of total tour per user

whileprintingrecords;
shared numbervar users:=count({t_Event.UserName});

I appreciate all your help. Mary

MaryBeth
 
MaryBeth

Been away for a few days.

try

whileprintingrecords;
shared numbervar users:=distinctcount({t_Event.UserName});

Ian

 
Hi Ian,
I tried that. It still only counts one per user per tour. I don't understand as it will count the total of all users and tours.

1,2,3,4,5 and so forth.

I'm wondering if it's looking at each match in the subreport as one item?

I also thought about inserting a subreport within the sub report, but it won't allow me to do that either.

This is driving me crazy as it should just subtotal????

Any new ideas will be greatly appreciated. Thanks, MaryBeth

MaryBeth
 
YOu can only get one total for each user at a time.

Can you save report with to box.net and then paste url here. I can not understand what you are doing.

If I can see report I might be able to work out what problem is.

What version of Crystal are you using?

Ian
 
Ian,
I can't put in box.net. I can email it to you with saved data and you can at least view the report?
I'm using 10.

MaryBeth
 
Ian,
I can't put in box.net my work doesn't allow me. I can email it to you with saved data and you can at least view the report?
I'm using 10.

MaryBeth
 
MaryBeth

They are very strict here if I post my email it will be deleted.
Box.net is your only option.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top