简体   繁体   中英

SSRS: Update text parameter based on other parameters

I have 3 parameter in the report @Start , @End , and @UserID in my report.

I want to add a 4th parameter, @Parameters , which is of Text datatype. This parameter can be null or empty. In other words, its NOT required to run the report.

The value of the @Parameters should be ReportName_@Start_@End_@UserID .

I have tried the default value of @Parameters to be

=Globals!ReportName + "_" + Parameters!Start.Value + "_" + Parameters!End.Value + "_" + Parameters!UserID.Value

The problem with the default value is that if I update @Start or @End or @UserID parameter, the value of @Parameters doesn't change.

You dont need to define a new parameter for that, just combine the 3 parameter to get your desired result

="Report Name / From " & Parameters!Start.Value & " to " & Parameters!Start.Value & " / User: " & Parameters!UserID.Value

If your Report Name is variable just add it too. For example

="Sales region for " & " Fields!SalesRegionYear.Value & " / From " & Parameters!Start.Value & " to " & Parameters!Start.Value & " / User: " & Parameters!UserID.Value

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM