?
Solved

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

Posted on 2011-02-18
4
Medium Priority
?
2,746 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 101

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 101

Accepted Solution

by:
mlmcc earned 2000 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

743 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