Reporting Services: Overriding the default setting with an expression in a linked report

So, I have a daily panel report in SSRS 2005. It has the @pDate parameter, which is "= Now" by default.

I would like to use the same report in a linked report to show the last final dashboard (which will then be mailed via subscription) and override the default setting with another expression: "= dateadd (d, -1, Now)." But when I change the default setting, I get a data mismatch error (natch).

I assume the end of the line, and I just need to expand a copy of the dashboard daily report with yesterday's default value @pDate, but I thought I would post it here and see if anyone has a great shortcut to do this unnecessarily support two RDLs.

UPDATE: I found this on MSDN :

If the default value takes on a value, you can type a constant or syntax that is valid for data processing extension used in the report.

The "data processing extension" seems to translate to the SQL server, so I tried the correct singleton fetch, which were not constants (GETDATE (), "04/27 /" + YEAR (GETDATE ()), etc. ) and nothing else.

+3
source share
2 answers

So, I found out my problem: if you have subordinates in the main report that use the pass-through parameters from the main report, make sure that all your parameters in your signatures use the same data type . My two signatures used the String data type for the @pDate field instead of DateTime, so the subscription was unsuccessful (although for some reason the live version of the report allows this inconsistency.)

Now I am using a data-based subscription to dynamically set @pDate, and everything seems to be working fine.

+1
source

, ( - pDateOverride ), pDate , , , Now(). - :

=Iif(IsEmpty(Parameters!pDateOverride.Value),Now(),Parameters!pDateOverride.Value)

pDateOverride .

0

Source: https://habr.com/ru/post/1706075/


All Articles