Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Parameters prompts Post Reply Post New Topic
Author Message
Altec
Newbie
Newbie
Avatar

Joined: 01 Dec 2009
Location: Canada
Online Status: Offline
Posts: 7
Quote Altec Replybullet Topic: Parameters prompts
    Posted: 09 Dec 2009 at 11:38am
Hi,
 
I’m trying to setup multiple parameter prompts within my SQL statement so the users can choose both the values or choose individual values.

So far it displays the prompts properly but only works if I select and populate both prompts at once and not either or.

The SQL statement for the parameters is as followed, with two parameters setup in the parameter list called Project and Project2.

("project_group"."project_group_id" = {?Project} or "project_group"."project_group_id" = {?Project2})

Any ideas on how to select either / or to produce the report?

I am trying to set up parameters within the SQL statement because it is faster to gather the results then setting up parameters within Crystal.

Thanks.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 09 Dec 2009 at 2:26pm
I don't tend to mess with this part of CR as I never know how it is going to respond.  What is probably happening is that when one parameter is null it is crashing and exiting.  What you might try is surrounding the parameters with ISNULL({?},0).
 
What you are trying to do, I understand, but this might be the wrong way. I can't say for sure as I gather my data by using stored procs. How I got around this is I created a function in SQL to break up a string that the user sent which I allowed me to select the either or that you are looking for...But if you are not using stored proc, that won't work for you.
 
Another thing you might try is instructing the user to enter 0 for the parameter that they don't want to use...just a thought.
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.