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

Conditional Grouping in CR9 1

Status
Not open for further replies.

mholbert

IS-IT--Management
Jan 10, 2006
105
US
I am building a report uses data returned from a stored procedure on a sql server db. The data returned contains monetary values for Payments, Adjustments, and Charges for a Doctors office. Additionally, each row of data is defined as being inside of a particular department.

I want to report the Payments and Adjustments without grouping by department, but report the charges grouped by department.

Is there a way to create a report that groups conditionally?
 
Let's say you have a group on PatientID. Instead of inserting a group on department, you could insert a crosstab in the patient group header or footer that uses department as the row and charges as the summary. If you want to, you can eliminate the grid by going to the customize style tab within the crosstab expert->format grid lines->uncheck "show grid".

Insert summaries on payments and adjustments to get those results per patient.

-LB
 
I don't that would work because I don't need the kind of summary across rows that a crosstab provides. It would be much easier if there were a way to group the data conditionally. Something like 'if type = 'a' or 'b', then don't group, if type = 'c' group.

Thoughts?

MH
 
You pretty much wrote it, create a formula to use as ythe group field of:

If {table.field} in ["a", "b"] then
""
else
{table.department}

Now those that re not A or B will br grouped by department, the a/b will be within theor own grouping.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top