SSRS; Report rendering empty when using url to pass field value to a parm in another report

Lou DiFrancesco 0 Reputation points
2023-03-13T18:57:25.05+00:00

I am trying to pass a field value in one report to a parm value in another report using a url in the Action feature. The field on first report should be hyperlink. I test everything with values hard coded in the url and the second report runs with no problem. If I change the hard coded value to be the expression from the first report, the second report opens saying 'no data available'. The following is my url expression where the shopper code is the field defined as an expression:

https://myreporturl?rp:FromDimDate=2022-07-31&rp:ToDimDate=2022-12-31&rp:DimShopperCode=Lookup(Fields!Shopper_Code.Value &CStr(Fields!Date_BK.Value),Fields!Shopper_Code.Value & CStr(Fields!Date_BK.Value), Fields!Shopper_Code.Value, "Shopper_dataset")

Is this written correctly?

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,796 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AniyaTang-MSFT 12,311 Reputation points Microsoft Vendor
    2023-03-14T05:49:34.9966667+00:00

    Hi @142041

    I tested that parameter values can only be specified values, expressions cannot be used.

    For the use of passing parameters in a URL, you can check out this link: Pass a Report Parameter Within a URL.

    Best regards,

    Aniya