Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Tricky question Post Reply Post New Topic
Author Message
crystalgal
Groupie
Groupie
Avatar

Joined: 20 Feb 2009
Location: United States
Online Status: Offline
Posts: 66
Quote crystalgal Replybullet Topic: Tricky question
     Posted: 02 Feb 2012 at 6:21am

Hello all,

I am trying to figure out an issue with parameter:

The user needs in paramater prompt "all" for subjects that are offered. But in our institute there are 2 kinds of subject codes 3 digits and 2 digits.

We have a list of 2 digits courses which I used for parameter prompt. But when I add an SQL to include "all" in prompt, 3 digits codes also appear. How do I eliminate the 3 digits codes from "all" selection?
 
Any help is appreciated and thank you.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Feb 2012 at 6:34am
can you clarify your issue a little more?
Is the issue that you are using a dynamic param that now has to many values in the LOV
or
is the issue that your report data set has too many rows because if the user select ALL that really means just all rows with 2 digits?


Edited by DBlank - 02 Feb 2012 at 6:34am
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 02 Feb 2012 at 6:40am
one you could eliminate 3 digit codes from the report all together
in crystal select expert
Length(table.code) <>3
 or
i assume your parameter is something line
(
if parameter = "list 1" then table.codes = formula for list of codes else
if parameter = "ALL"  then Length(table.code) <>3
)
IP IP Logged
crystalgal
Groupie
Groupie
Avatar

Joined: 20 Feb 2009
Location: United States
Online Status: Offline
Posts: 66
Quote crystalgal Replybullet Posted: 02 Feb 2012 at 6:56am
Not using dynamic paramete rbut getting data from 2-digits LOV but when I select "All" in prompt 3- digits subject codes also appear.
 
TIA
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Feb 2012 at 7:02am
select statement would be
((param='ALL' and len(trim(field))=2)
or
param=field)
IP IP Logged
crystalgal
Groupie
Groupie
Avatar

Joined: 20 Feb 2009
Location: United States
Online Status: Offline
Posts: 66
Quote crystalgal Replybullet Posted: 02 Feb 2012 at 7:02am
kostya1122: I used the length<> 3 but I need to suppresee the whole row of data which i tried with section expert but formula is not working. Any other ways?
TIA
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 02 Feb 2012 at 7:14am
if you using section expert to suppress a row when there are 3 digit codes then the formula for that would be
length(table.code) = 3
IP IP Logged
crystalgal
Groupie
Groupie
Avatar

Joined: 20 Feb 2009
Location: United States
Online Status: Offline
Posts: 66
Quote crystalgal Replybullet Posted: 02 Feb 2012 at 7:28am
Thank you both for the help.
 
Have a great day!
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