Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need guidence on multiple selection problem?

Status
Not open for further replies.

rajrev

Programmer
Sep 25, 2003
148
US
HI,
We are using 10 parameters in a report.
say, State, Major, School...

The end user want to select,

State - CA, IL, AZ, AB, IO
Major - M1, M2, M3
School - S1, S2, S3, S4
all other parameters are ALL.

They need the output as the combimation of the selected vaules.(not other then the selected one)

ie
xxx 111 CA M1 S3
yyy 222 CA M3 S2
iii 533 IL M1 S4
ttt 221 AZ M2 S1
sss 453 CA M3 S3
like this.

What i did is I select the option "Allow Mutiple values" at the time of creating the parameter.
And in the formula
(
if ({?state} <>&quot;ALL&quot;) then
{?state}={tab1.state}
else
true
)
and
(
if ({?school} <>&quot;ALL&quot;) then
{?school}={tab2.school}
else
true
)
and
.....

I know, I'm doing somthing worng over here. So, expecting someone can help on fixing the problem.
Thanks in adv.

Thanks,
MK
 
Your theory seems OK, but to pass the SQL use:

(
if ({?state} <>&quot;ALL&quot;) then
{?state}={tab1.state}
else if ({?state} = &quot;ALL&quot;) then
true
)
and
(
if ({?school} <>&quot;ALL&quot;) then
{?school}={tab2.school}
else if ({?school} = &quot;ALL&quot;) then
true
)

When you say all other parameters are all, then you don't need a aparameter, do you?

-k
 
Thanks for your replay -k. the other parameters are optional to the end user. ie some times the user want to filter the data using other parameters called position or degree, language... etc.

By the way i'm doing the changes in the formula and I'll let you know the result.
Thanks once again.

MK
 
I'd suggest setting a default value of &quot;All&quot; for all of the parameters, then use the same sort of logic for all of them and then they're all optional. Otherwise why are you using ALL in the supposed non optional parms (as ALL equates to nothing entered)?

-k
 
It's working fine -k.
I'll come with a query in CE within next couple of hrs..
Thanks for your hlep.
MK
 
I forgot to refresh... the answer for your second suggesion is
I did that! ie putting ALL for all other parameter. and written the formula like
)
if (zzzz <>&quot;ALL&quot;) then
xxx
else
true
)
and.....

after your suggesion (ie change else if (... =&quot;ALL) I changed all the if conditions.
its working good now.

can I ask the CE question in the same section!?!?!

I tried to use the justified the output for a long text filed in the report.
for example
comment:
................................................
................................................
its a subreport. I did the justify the subreport as well as justify the field inside the subreport.
what happand when i use the adobe file output in CE is, the field was justified, but the LAST char. in each line cut in half..do i have to do any size change?

if you need more info pl. let me know. or if you want I can post this q in the CE discussion section.

Thanks,
MK
 
Exporting is always tricky, just make sure that you apply the latest patches to Crystal.


Generally it's best to start new questions with a new thread and post it in the appropriate forum (Crystal Enterprise) so that we all might benefit from the solutions.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top