Solved

Crystal Reports: Cross-Tab Group Options > Use a Formula as Group Sort Order

Posted on 2011-02-18
4
2,477 Views
Last Modified: 2012-05-11
I have a cross-tab report where each row is for one customer type.  However, I only want to look at two customer types.  Either dealer or not dealer.

I wrote to formulas:
Dealer
{CUST.CTYPE} = "D"

Direct
{CUST.CTYPE} <> "D"

I right click on Row #1 Name and choose Row Options > Group Options...
In Cross-Tab Group Options I check Use a Formula as Group Sort Order and click x+2.
In the Formula Workshop - Group Sort Order Formula box, I cannot figure out what to do with my formulas.

If I put them both in the edit box,
   {CUST.CTYPE} = "D"
   {CUST.CTYPE} <> "D"
I get this error:
   A constant expression is required here.

How do I actually place my formulas in the edit box.  I tried using the formula names as well.
   @Dealer
   @Direct
And got this error:
   The remaining text does not appear to be part of the formula.
 
0
Comment
Question by:cgettel
  • 2
  • 2
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 34927448
The formula for Sort Order is looking to get crAscending, crDescending, crOriginalOrder to tell which sort order to use.

You could try using SPECIFIED ORDER but that would require you to specify the correct order.

You could add a formula like
If {CUST.CTYPE} = "D" then
    "Dealer - " & {CustomerNameField}
Else
    "Direct - " & {CustomerNameField}

You can then use the 2nd tab and use the CustomerNameField as what is displayed.

mlmcc

0
 

Author Comment

by:cgettel
ID: 34927512
Ah, so I uncommented the crAscendingOrder that was already in the edit box when I pulled it up.

Then I added
If {CUST.CTYPE} = "D" then
   "Dealer - " & {Dealer Sales}
Else
   "Direct - " & {Direct Sales}

x+2 give this error:
   The remaining text does not appear to be part of the formula.

I'm going to lunch.  I'll check back in an hour.

thanks mlmcc.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 34927995
No, you need to create a new report formula through the field explorer.

Then instead of using the the {CUST.CTYPE} field in the cross tab use the new formula.

Since you want just the 2 groups use this formula
If {CUST.CTYPE} = "D" then
   "Dealer"
Else
   "Direct"

mlmcc
0
 

Author Closing Comment

by:cgettel
ID: 34928237
Thank you!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now