Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Showing "Select All" in cascading parameter Post Reply Post New Topic
Author Message
grmotild
Newbie
Newbie
Avatar

Joined: 19 Oct 2007
Location: Israel
Online Status: Offline
Posts: 7
Quote grmotild Replybullet Topic: Showing "Select All" in cascading parameter
    Posted: 19 Oct 2007 at 1:09am
Hi. I am new member here and have only 3 days expirience in CR. I have a question. I am using 3 levels cascading parameters group in my report. I would like to show at the first line of third combo option Select All message that means all records from this fields. How can I mplement that?
 
Thanks in advance
Michael
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 19 Oct 2007 at 8:55am
HI Michael. If you're new to CR you should check out my Encyclopedia book and make your life a lot easier. I cover the details of DCPs starting on page 198 and on page 209 I have a tutorial for adding "ALL" to them.

What you need to do is create a Command object and write the SQL query to build your list of values for the prompts. In the part where you want to have "ALL" as a selection, use the UNION keyword to add it to the list manually. That way it gets included with the list of values with the other data being displayed.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
grmotild
Newbie
Newbie
Avatar

Joined: 19 Oct 2007
Location: Israel
Online Status: Offline
Posts: 7
Quote grmotild Replybullet Posted: 21 Oct 2007 at 1:11am
Hi Brian.
I should thank you for quick respond. I tried to make Union query. Its look so:
 
SELECT "MITBAL"."MBDIVI","MITBAL"."MBWHLO"
FROM "S65A583D"."MVXCDTATST"."MITBAL"
UNION
SELECT "MITBAL"."MBDIVI","...All"
FROM "S65A583D"."MVXCDTATST"."MITBAL"
UNION
SELECT "...All", "...All"
FROM "S65A583D"."MVXCDTATST"."MITBAL"
 
Unfortunately I've got error: "Column qualifier or table MITBAL undefined".
I also tried to use single ( ' ) in select. It was same error.
In select queries I have to use " in order to access data from AS400.
 
Michael 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 21 Oct 2007 at 9:12am
Try changing it to this:
 
SELECT "MITBAL"."MBDIVI","MITBAL"."MBWHLO"
FROM "S65A583D"."MVXCDTATST"."MITBAL" "MITBAL"
UNION
SELECT "MITBAL"."MBDIVI","...All"
FROM "S65A583D"."MVXCDTATST"."MITBAL" "MITBAL"
UNION
SELECT "...All", "...All"
FROM "S65A583D"."MVXCDTATST"."MITBAL" "MITBAL"
 
This will set an alias on the table, which should clear up your issue.
 
-Dell
IP IP Logged
IdoMillet
Groupie
Groupie


Joined: 26 Oct 2007
Location: United States
Online Status: Offline
Posts: 99
Quote IdoMillet Replybullet Posted: 26 Oct 2007 at 4:42pm
Consider changing UNION to UNION ALL.

UNION ALL doesn't go through a step of removing duplicates (like UNION does).  This can improve performance significantly.

- Ido
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
www.MilletSoftware.com
IP IP Logged
grmotild
Newbie
Newbie
Avatar

Joined: 19 Oct 2007
Location: Israel
Online Status: Offline
Posts: 7
Quote grmotild Replybullet Posted: 01 Nov 2007 at 1:39am

Thanks. Its the best place for developers.

Michael

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.