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

Creating a group with multiple instances of a record

Status
Not open for further replies.

Azzuri

Programmer
Apr 16, 2002
18
CA
Hello All,

I am having a problem grouping data within a report. My problem is as follows:

For every ticket created within are system, a ticket has a series of status's. The status of ticket follow a sequential order: Pending Dispatch, Dispatch, Assigned, Pending Close, Closed. I need to get all tickets that are closed and group them as complete while getting all tickets that have not been closed and group them as incomplete.

The problem is for tickets that are closed I am only getting the Closed instance of the ticket and all other instances (ex: Dispatch, Assigned) are showing as incomplete. I need to get all these other instances within the complete group.

If any one has any suggestions, it would be much appreciated.

Thanks,
 
ok...you group on {Table.ticketStatus} using "in specified order"...not ascending or descending

within this specified groups You create 2 groups Closed and Open .... With each group you will specify which value of
{Table.ticketStatus} belongs in which group....any that don't match will be put into a 3rd category called Other in case a new ticketStatus comes up in the future.

Hope this helps
Jim

JimBroadbent@Hotmail.com
 
Is there a master table of tickets?
Is there a field in this master table that holds the current status of that ticket or do you have to look at a group of records to see the current status?

If you have a field in the master table this is easy, but I will guess that you don't have this and have to look at the group to see the highest status.

I think you will need a report and a subreport.
Create a formula in your report that says:

If status = Closed
then 1
else 0

Then subotal this formula for each ticket.
Then put in a group selection formula that says:

Sum({@formula},{ticket}) > 0

This will give you a report of all closed tickets, with their details. Use runnin totals to get any grand total of this report.

Then create an identical copy of this report as a subreport, with a group selection formula of
Sum({@formula},{ticket}) = 0

This will give you all open tickets with their details. Again use running totals for grand totals. Put the sub into the report footer of the main. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top