Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-02-18
4
Medium Priority
?
2,814 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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 …
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 a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

610 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