Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: dynamic parameter based on a variable in the repor Post Reply Post New Topic
Author Message
rvroth
Newbie
Newbie


Joined: 13 Jul 2010
Location: Luxembourg
Online Status: Offline
Posts: 16
Quote rvroth Replybullet Topic: dynamic parameter based on a variable in the repor
     Posted: 03 Jul 2014 at 2:29am
Hi,

I'd like to create a dynamic parameter in CR 2011, but as I am a rather unexperienced CR developer, I can't figure out how to do it. I hope you can help me ...

My report is based on a query that returns only a single row like CLIENT_ID, DEPARTMENT_ID, COLUMN_1, COLUMN_2, ...

The report also has some parameters like CLIENT_ID to retrieve the single row and other parameters to display on the report.

One of these parameters depends on the value of DEPARTMENT_ID returned by the single row query. I'd like the user to choose from an EMPLOYEE_ID drop down list.

So, to summarize, here's an example:

table CLIENTS
CLIENT_ID NAME
C1          Name1
C2          Name2
C3          Name3

table DEPARTMENTS
DEPARTMENT_ID     EMPLOYEE_ID
D1               E11
D1               E12
D2               E21
D3               E31
D3               E32
D3               E33

the CR reports when started asks for:
Parameter CLIENT_ID --> inout of C1

the query returns: C1 D3 Name1 blabla blabla

the CR reports then asks for Parameter EMPLOYEE_ID
proposing following list
E31
E32
E33

Does anyone know if this is doable in CR2011. If so, how could I achieve it?

Many thanks for your answers.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Jul 2014 at 6:15am
not really following your request but your description is seems close to a dynamic cascading parameter. It is unclear to me how you are linking your two 'queries' as nothing in your description shows how D3 even exists in the first query.
IP IP Logged
rvroth
Newbie
Newbie


Joined: 13 Jul 2010
Location: Luxembourg
Online Status: Offline
Posts: 16
Quote rvroth Replybullet Posted: 03 Jul 2014 at 7:55pm
thanks DBlank for your answer and sorry if I wasn't clear.

the first query returns following columns:
CLIENT_ID, DEPARTMENT_ID, COLUMN_1, COLUMN_2, ...

D3 is the DEPARTMENT_ID

does it make sense? thanks
IP IP Logged
rvroth
Newbie
Newbie


Joined: 13 Jul 2010
Location: Luxembourg
Online Status: Offline
Posts: 16
Quote rvroth Replybullet Posted: 03 Jul 2014 at 8:43pm
ok, so I didn't know about cascading parameters, but reading docs about it, I got it to work like I need it to on a sample report.

Now I need to implement it on the real report.

Thanks for your help; I'll come back to let you know ...
IP IP Logged
rvroth
Newbie
Newbie


Joined: 13 Jul 2010
Location: Luxembourg
Online Status: Offline
Posts: 16
Quote rvroth Replybullet Posted: 03 Jul 2014 at 10:15pm
I run into a new issue I didn't notice before.

The stored procedure the report is based on needs 3 parameters to complete.

The report, asks once these 3 parameters on a screen and then a second time with all the parameters of the report, including the dynamic parameter.

Is there a way to either tell it to ask the 3 first parameters only once, or to automatically fill out these 3 first parameters on the second screen so the user doesn't have to key them in twice?

thanks a lot for your answers ...
IP IP Logged
rvroth
Newbie
Newbie


Joined: 13 Jul 2010
Location: Luxembourg
Online Status: Offline
Posts: 16
Quote rvroth Replybullet Posted: 06 Jul 2014 at 10:02pm
I think the issue comes from the data sources the dynamic parameter is based on.

There are 2 existing datasources I can choose from. No idea why they appear twice.

Can anyone tell me how to get rid of one of it; or does anybody know the reason why the 3 parameters are asked twice?

Thanks a lot ...
IP IP Logged
rvroth
Newbie
Newbie


Joined: 13 Jul 2010
Location: Luxembourg
Online Status: Offline
Posts: 16
Quote rvroth Replybullet Posted: 16 Jul 2014 at 2:04am
up
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