Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Default values for Cascading List of values? Post Reply Post New Topic
Author Message
GowthamSen
Groupie
Groupie


Joined: 03 Jun 2009
Location: India
Online Status: Offline
Posts: 65
Quote GowthamSen Replybullet Topic: Default values for Cascading List of values?
     Posted: 12 Aug 2010 at 12:36pm
Hi,
 
I have a report where cascading list of values are created for prompts.
 
They are working absolutely fine.
 
Now, I want to show "ALL" option in list of values if the user wants to select all values.
 
The default value option is available. But its only for Static type. As the cascading prompts are Dynamic this option is not feasible.
 
Any help is appreciated.
 
Thanks in advance.
 
Regards
 
Gowtham
Thank you
Regards,

Gowtham Sen.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 13 Aug 2010 at 3:24am
if you are getting the values from a command object, I always add a select with ' ALL' and union it to the rest of my selection.  The space in front of the ALL is important...it sorts the value to the top of the list.
 
HTH
IP IP Logged
GowthamSen
Groupie
Groupie


Joined: 03 Jun 2009
Location: India
Online Status: Offline
Posts: 65
Quote GowthamSen Replybullet Posted: 13 Aug 2010 at 4:12am

Thanks Lockwelle.

I am not getting from a command object. But I can do this converting normal table as command. Thanks for the tip.
 
By the way, I shouldn't ask another question.. still I am putting it before you. :)
 
Is there any we can apply OR join between two tables aore between command objects.
 
I should not use command object for this, as I want to use cascading prompts/dynamic prompts based on this.
 
Thanks!
 
Gowtham
Thank you
Regards,

Gowtham Sen.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 16 Aug 2010 at 3:26am
Or s for joins are usually LEFT joins and looking at the output.  A NULL value tells that the join 'failed' and you can look at another conditions.
 
Say you have 1 table for customers, but some of the customers are actually 'children' of other customers (think a chain store like sears or walmart...they have a corporate office and individual stores) so you might write a query like:
 
select *
from orders as o
   left join customers as nc
     on o.customerID = nc.parentCustomerID
   left join customer as pc
     on o.customerID = pc.customerID
where nc.parentCustomerID = x
  OR pc.customerID = x
 
nc is normal customer and they have no parentCustomerID (ID = 0)
pc is a parent customer...so you get a OR in the join.
 
you can also use a CASE statement in the JOIN clause, but that will be slower as every record is going to be check to see which condition of the JOIN to use.
 
Cascading parameters just needs tables to link together, and CR doesn't care if they are 'physical' tables in the database or 'virtual' tables from a Command object.  As long as you can link them together they will cascade.
 
HTH
IP IP Logged
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