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

New to Crystal, have basic question about grouping 1

Status
Not open for further replies.

jsteph

Technical User
Oct 24, 2002
2,562
US
Hi all,
I'm coming from an MS Access reporting environment, and am starting with CR 2008. I just used the wizard to get my feet wet and I'm a little frustrated with how it's going, and hoping for a nudge in the right direction.
So I have a table, with OrderDate, Location, Order#, and OrdTotal.
In the Grouping section I put OrderDate first, then Location as my only groupings.

So the report shows at the very top in the header the first order date, say 1/10/2011. Then underneath that header I see the first Location...so far so good...then the details under that instead of all orders for 1/10/2011 for the first Location, it instead shows dozens of orders from dates all over the calendar??!! Ok, so where did I swerve off the path?
Thanks,
--Jim
 
Hi,
That is odd because it should act the way you expect:
For that Date and That location show only the orders that fit BOTH criteria.

It is possible that your OrderDate field is not being seen as a true Date and that may be affecting the grouping - right-click on it and see if it is a DATE or a STRING type..

If String create a formula to convert it to a Date and use the formula for your first group:

The exact formula will depend on the contents and format of that field, so can you post an example of data from that table?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Also, make sure you selected "on change of day" in the group expert, since the default is "week".

-LB
 
turkbear,
Thanks very much. The OrderDate is a datetime data type, and all values are dates only. After it showed like this I set the formatting to mm/dd/yyyy and that didn't change anything.

On the last part of the wizard, it had asked something about grouping (I can't look at it now because it's only installed on my home machine for practice for now). But it asked if I wanted to do something (I think sorting) by the Top Five, Bottom Five, or None. I did none because I just want it sorted by this date and didn't want to confuse things with any "top five" thing happening.

But the data is sql-server 2005 datetime, and depending on where one displays this data, it will generally show up like "1/10/2011 12:00 AM" or "2011-01-10 00:00:00.000"
--Jim
 
Lbass,
That could be it--in fact if that's the default that definitely is it. I'll check it out tonight and post back.
Thanks,
--Jim
 
It sounds like you might have been in the group sort screen instead of the group expert. Make sure in the group expert that date is your first group, on change of day, and that location is your second group.

-LB
 
Hi,
If there are multiple times for each date that would explain your result - LB's idea will solve that.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
lbass,
Thanks, that was it! I set it to each day and it's perfect.
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top