Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Dynamic Cascading Prompts Post Reply Post New Topic
Author Message
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Topic: Dynamic Cascading Prompts
    Posted: 09 Jun 2007 at 4:17am
Hi Friends,
 
I have a requirement as follows.
 
I have two parameters ProjNo Period(Date)..........
 
Based on ProjNo I need to populate date........I can do this by using Cascading Dynamic Parameters.............
 
Problem
 
1)User will select ProjNo and Period and see the results.......
 
2)User only wants to select ProjNo and leave the period parameter blank....and see the results
 
3)User also wants to select only Period and leave the Proj No Blank........  and see the results
 
Can anyone have idea how to do this............
 
Cheers
Rahul
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 09 Jun 2007 at 9:55am
You need to add an "ALL" option to each drop down list. An easy, but not database-friendly way of doing it is to include "All" as a record in each table so that the user can pick it from the dropdown list. But you probably don't want to add new records in your tables just for the report. So I recommend using a command object and the UNION keyword to build your SQL resultset. For example:
SELECT -999 as Id, "ALL" as Desc 
UNION
SELECT Id, Desc FROM yourtable

Then in your record selection formula you can test for the ALL keyword to select all the record.
{?Parameter}=-999 OR {?Parameter}={table.ProjNo}

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
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.031 seconds.