Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Grouping/Sorting Post Reply Post New Topic
Author Message
redboan
Newbie
Newbie


Joined: 06 Jun 2007
Location: United States
Online Status: Offline
Posts: 8
Quote redboan Replybullet Topic: Grouping/Sorting
    Posted: 09 Jul 2007 at 10:37am
Hello All,

I am having an issue with grouping/sorting.  I have an Access Database, with about 70 records.  Of these 70 records, I have a field "category", that can have about 14 different "categories", and need to have all these records show.

However, when I select a category in the "select expert", after creating many groups, it only shows that one group.  It seems as if I change one of the groups to a different category, it changes them all.

Basically, I need to have a report that shows all these different groups, but separately.  I have tried using all subreports, but that will not work for my type of report.

Thanks,
Adrian
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 09 Jul 2007 at 10:52am
Sorry, but I'm not following what you are trying to do. You create multiple groups and then it only shows one of them (because the select expert filters them out?). Then you say if you change one of the groups it changes them all. Changes all the groups? In what way?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 09 Jul 2007 at 10:52am
Oh yeah - if you want to display all groups, but separately then you can do page breaks after the group footer. Is that what you want?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 09 Jul 2007 at 10:53am
Perhaps I am missing the point of what you are trying to do. If you want to group by category, you should be able to create a single group based on the category field. That will create a new group with appropriate details as each new catergory is read. The layout/design might look like this
--------------------
Group 1 {category field}
Detail
   {detail1} {detail2}
-------------------------------------
It should read like this when run
 
CategoryA
    Detail field1 info   Detail Field 2 info
 
CategoryB
    Detail field1 info   Detail Field 2 info
 
...and so on for the other 12 categories.
 
Hope this helps
 
Regards
 
John W.
IP IP Logged
redboan
Newbie
Newbie


Joined: 06 Jun 2007
Location: United States
Online Status: Offline
Posts: 8
Quote redboan Replybullet Posted: 09 Jul 2007 at 11:06am
Okay, I'll be a little more specific.

I have one table, with 70 records, in which I need separated by the 'category' field.  I have 14 different 'categories'.  In these categories, I have a field called 'finding', that we are numbering, and the numbers have to refresh in each category.

I guess I am not understanding how the 'group' function works (and I have the Crystal book, a little confusing for this section).  Do I need to create 14 different 'groups' for all of this data to show, or just one 'group'?  I have tried both, but when I do a preview, only the information for the last 'category' is shown, not all 14. 

I have created this 'grouping' in a subreport, as that is where my layout is for all of this information.

Thanks,
Adrian
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 09 Jul 2007 at 11:30am
No, you create one group on the Category field.  This will then sort you data by category and you'll be able to do things like set up a running count of your finding field that resets to 0 every time the Category field changes.  It sounds like that is what you're trying to do.
 
-Dell
IP IP Logged
redboan
Newbie
Newbie


Joined: 06 Jun 2007
Location: United States
Online Status: Offline
Posts: 8
Quote redboan Replybullet Posted: 09 Jul 2007 at 11:51am
Thanks, that did some of what I need to be done.  I also need a page break in between each category, and for the numbering scheme to start over in each category as well.

Any ideas?
Thanks,
Adrian
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 09 Jul 2007 at 11:57am
In the select expert, on the group footer select "New Page After".  Click on the formula button next to it and enter "Not OnLastRecord" - this will prevent a final blank page.
 
When you set up a running count to use for your numbering, you can tell it to reset when the group changes.
 
-Dell
IP IP Logged
redboan
Newbie
Newbie


Joined: 06 Jun 2007
Location: United States
Online Status: Offline
Posts: 8
Quote redboan Replybullet Posted: 09 Jul 2007 at 12:15pm
Awesome, that worked.

I have one other issue right now.  On each page, I also have a 'finding' field, which is followed by the crystal special field 'record number'.  On each new page (for each new category), I need to have that record number to reset to one.

Thanks,
Adrian
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 09 Jul 2007 at 12:24pm
You can't use the Record Number.  You'll have to set up a running count.  Here's what you do:
 
1.  Create a new Running Total field
 
2.  In "Field To Summarize", select a field that is unique for each record.  In "Type of Summary", select "Distinct Count".  In "Reset" select "On Change of Group" and select your Category group.
 
3.  Put this field on your report instead of the Record Count.
 
-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.