Announcement

Migration of this forum

Dear users of this forum,

we are pleased to inform you that we will be updating the software behind this forum in the near future.

Existing posts, users and categories will remain untouched.

Important:

  • Each user will need to reset their password.
  • Please select "I forgot my password".
  • Enter the email address you used to register in this forum.
  • You will receive an email with a link to set a new password.
  • Please choose a new (secure) password and confirm the process.

We will keep you informed in the pinned thread.

Kind regards,
Your ReportServer Team


Migration des Forums

Liebe Nutzer dieses Forums,

wir freuen uns, euch mitteilen zu können, dass wir in naher Zukunft die Software hinter diesem Forum aktualisieren werden.

Existierende Beiträge, Nutzer und Kategorien bleiben weiterhin bestehen!

Wichtig:

  • Jeder Nutzer muss sein Passwort neu vergeben.
  • Wählt dazu einfach "Ich habe mein Passwort vergessen".
  • Gebt die E-Mail-Adresse ein, mit der ihr registriert seid.
  • Ihr erhaltet eine E-Mail mit einem Link zur Passwortvergabe.
  • Bitte wählt ein neues (sicheres) Passwort und bestätigt den Vorgang.

Wir halten euch im angepinnten Beitrag auf dem Laufenden!

Mit vielen Grüßen
Euer ReportServer Team

#1 2019-01-29 00:37:14

aditi.raiter
Member
Registered: 2018-05-01

Passing value of a selected parameter

Is it possible to pass the value of selected parameter to another parameter in the same report?

Example : If a report has 2 Data source parameters - country and state. If I select country = 'US' , the parameter value would additionally get passed to state report parameter so that it can append an  extra condition to get states where country is 'US'. This way,  in the list drop down the user gets to select states of US and not of other countries.

Thanks
Aditi

Offline

#2 2019-01-29 07:54:08

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Passing value of a selected parameter

Hi Aditi,

yes, this is possible with datasource parameters. These are called cascading parameters.

Usually you would write your parameter2 query as something to the extend of:
Select key_col, val_col from mytable where some_col = $P{param1}
Also, please note this: Don't forget to add myValue as a dependent parameter: "Parameter properties" -> "Depends on"

Check here:
https://forum.reportserver.net/viewtopic.php?id=1344
and here:
https://reportserver.net/en/guides/admi … cascading/

Regards,
Eduardo

Offline

#3 2019-01-29 14:52:19

aditi.raiter
Member
Registered: 2018-05-01

Re: Passing value of a selected parameter

That helps. Thanks so much !

Offline

#4 2019-05-09 13:03:47

michigunesh
Member
Registered: 2018-12-20

Re: Passing value of a selected parameter

Hi,

Just to extend this scenario of Cascading prompt, I have a requirement where User can select multiple values. Would you be able to help how this could be achieved as it seems like ReportServer only Supports Single Selection for Cascading Prompts.

Thanks

Offline

#5 2019-05-13 08:33:12

IF_Eduardo
Administrator
Registered: 2016-11-01
Website

Re: Passing value of a selected parameter

Hi michigunesh,

if you need multiple values, you can write a different query:

instead of
Select key_col, val_col from mytable where some_col = $P{param1}

you could write:

Select key_col, val_col from mytable where some_col = $X{IN, column, param1}

or

Select key_col, val_col from mytable where some_col = $X{NOTIN, column, param1}

More information on parameters:
https://reportserver.net/en/guides/admi … arameters/

Regards,
Eduardo

Offline

#6 2019-07-20 22:22:24

michigunesh
Member
Registered: 2018-12-20

Re: Passing value of a selected parameter

Thanks a lot, that helped.

Offline

Board footer

Powered by FluxBB