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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bringing over subtotal reports 1

Status
Not open for further replies.

jlp118

Programmer
Jul 23, 2001
28
US
I have created a report that shows sales for all customers for during week 1. I have created a sub report that shows all sales for week 2 for that month. I have done the same for week 3 and week 4. When I go to the original report, I can see the detail that I wanted. I set it up to just show the total pounds sold for each customer and not all the individual detail. The problem I am having is this...I can not do a running total for week 2, week 3 and week 4 that just shows the entire total for that week. When I create the running total, it just does a running total for each customer and not the whole week. I have put the running total field in the report total section of my report. How do I fix this?
 
Is there a reason that you are using subreports? Why not simply select the time period and goup by week? That will make things much simpler.

Also, you probably don't need running totals, use a regular grand total of that field in each report. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
The reason that I have created subreports is because it is the only way I know how to get the detail for different time periods more than once. You are right it would be more simple, however when I go to the select expert, I can only set parameters for that field once. For example, the field I am using is SHIPDATE. I can only say SHIPDATE is between 06/04/2001 and 06/08/2001. Then what I want to say after that is now SHIPDATE is between 06/11/2001 and 06/15/2001. I need both weeks to show up on the same report so I can see from week to week, customer xyz bought in week 1 4,000.00 pounds and in week 2 he bought 3,000.00 pounds. I can not specify certain criteria for the same field twice (that I know of) so this is why I have created subreports.
 
Two solutions.

One is you can say between 6/4 and 6/15, get both weeks, and let the group by week separate them.

If you need to exclude the time between, you can bypass the expert and go the record selection formula and write:


{date } in 06/04/2001 to 06/08/2001
or
{date } in 06/04/2001 to 06/08/2001

Use the show formula to get the correct syntax for one, then add the OR and add as many weeks as you want. You can't do that using the expert, but it will still work.
Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
That worked by grouping and letting the dates group by week. However, it shows the weeks stacked on top of each other. I need to see the weeks side by side. Do you know how to do this?
 
Um...you can't put them side by side using this technique. That is probably why you had subreports, so they could be side by side.

You can try a cross-tab, whith the column field being the Date (weekly) and the row field being the Customer name, and the pounds being the summarized field. This will give you a column for each week.

If this doesn't work, then you will need to go back to subreports. Add a grand total for each subreport. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top