Print Page | Close Window

two different sorts for a report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4566
Printed Date: 02 May 2024 at 8:25am


Topic: two different sorts for a report
Posted By: CRNewbie32
Subject: two different sorts for a report
Date Posted: 17 Oct 2008 at 6:45am
I'm a relative Crystal newbie--more experience with SSRS. I created a SQL Server procedure that has a parameter that groups a Lawson account either account/acct_unit or acct_unit/account. Which works fine in SSRS but we have to publish in Crystal for reasons I won't bore you with. I've tried working with dynamic groups and several other things, including changing my procedure so it orders by according to the parameter (which SSRS doesn't need, but I digress), but can't get the report to be dynamic. We're publishing it with Account first because I can't figure this out. I know there has to be a way to do it.  Can any of you Crystal gurus tell me how to accomplish this? I would be very grateful.

-------------
TrytoworkwithSQLServerCrystal



Replies:
Posted By: rosaus
Date Posted: 17 Oct 2008 at 11:40am
Hello.....What I suggest you to do is create a formula with the parameter field. Use If Else control structure to accomplish your job.
Ex:

Formula1:
If ({? Parameter} = 'XXXX') then account
else acct_unit
Formula2:
If ({? Parameter} = 'XXXX') then acct_unit
else account

Place Formula1 in the group1 and Formula2 in group2.




Posted By: CRNewbie32
Date Posted: 17 Oct 2008 at 1:14pm
Looked logical and I tried it but I can't get the groups to stay attached to the Formula fields. Has anyone experienced this and have a fix?

-------------
TrytoworkwithSQLServerCrystal


Posted By: rosaus
Date Posted: 17 Oct 2008 at 1:30pm
What I meant was to create a Group on the formulas. I have tried this and worked.


Posted By: CRNewbie32
Date Posted: 17 Oct 2008 at 1:45pm
It's probably the Friday brain dead thing,but I can't connect a Group to the Formulas I created.
 
And I looked at the Formulas for a place to create a group and didn't see it anywhere.


-------------
TrytoworkwithSQLServerCrystal



Print Page | Close Window