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

Crosstab column in specified order 1

Status
Not open for further replies.

azoe

Technical User
Feb 21, 2005
175
US
Crystal 11, MS SQL database, ODBC connection

I need to order the columns in my crosstab in non-alphabetic order. The column names are hardcoded in a formula based on certain conditions. I read thread767-880706 but I'm not sure if that will help me because I think that person was using field contents as a name rather than hardcoding in a formula. (my column header formula reads like this: if @condition = True then 'Charges')

I could put a 1, 2, or 3 in front of the name but that doesn't look very nice.

I'm not sure I understand what I found in the "Use a Formula as Group Sort Order" button below:

// This conditional formatting formula must return one of the following Group Sort Order Constants:
//
// crAscendingOrder
// crDescendingOrder
// crOriginalOrder

I tried entering crOriginalOrder in the Search box of Help but it didn't find any items.

Thanks in advance for your help.
 
When you click on the group options button in the crosstab expert, use the dropdown to select "specified order" and then add the groups from the dropdown that then appears in the order that you would like them displayed.

-LB
 
I overlooked the drop-down with "specified order" in it - thanks for pointing that out. However, there are not any groups in the group drop-down. Maybe that is because of my formula? Maybe I am supposed to click New and create some.
Thank you -
 
If you are really using the formula you mention above as your "column header formula" for your crosstab column, you would get only two results: "Charges" or ""

So what is your column field and what are the possible results? They should appear in the dropdown even if based on a formula.

-LB
 
This is the whole formula for the column header:
If {@ChargeCondition} = True
Then
'1Charges'
Else If {@AdjustmentCondition} = True
Then '3Adjustments'
Else If {@NetCollections} <> 0
Then
'2Net Collections'

If helpful, this is the formula for the summarized field:
If {@ChargeCondition} = True
Then
{dch_MonthlyProduction;1.ChgAmt}

Else If {@AdjustmentCondition}
Then {@ConvertAdjustments}

Else If
{@The4GroupSplit} = "2Refer70"
Then
{@NetCollections} * .7

Else if {@The4GroupSplit} = "2Render30"
Then
{@NetCollections} * .3

Else {@NetCollections}

Just to be sure we are on the same page, when I highlight the formula in the columns box, and click the "Group Options" button, the window that opens is: Cross-tab Group Options, the tab is: Specified Order, and the box with the potential drop-downs is: Named Group

It is empty. Could that be because I don't have any Crystal Groups based on that formula?
Thanks -
 
If it is empty, then you can create the group instances, by clicking on "new" and then naming each option and setting the formula = to each particular result.

Does this crosstab work before attempting to reorder the group instances?

-LB
 
The crosstab worked before they decided to change the order of the columns.

It is working now too - thanks. Once I clicked New and gave it a name and picked equal to and clicked that drop-down - the choices were listed there. Thank you!

Now they also decided they want rows to appear with zeros if there aren't any records for it. I have a formula that splits all the records into either Medicare or Non Medicare. Some months there may not be a Medicare or NonMedicare row but the year to date shows one row for each so they want it consistent. I'll try to figure it out and maybe do another posting for that one.

Thanks a lot -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top