简体   繁体   中英

SSRS report change date based on subscription

I'm trying to set two different dates for the same SSRS report.

What the report basically does is check a StartDate and EndDate these dates are default to yesterday. But I have to implement a new subscription which has to look to the beginning of the month.

I've been investigating and I couldn't see any configuration rather than change the default date, but this will break the first subscription.

I'm thinking to add a boolean flag saying "check from the first" and an if inside the SQL query.

but I would like to know if there is any better approach rather than this "hardcoded" and ugly way, using the subscription if possible.

Thanks.

You can use a data-driven subscription to calculate the parameter values for the new subscription you want to create. Write a SQL query that gets the two date values you want to use. Then you can pass these in to override the defaults. You don't even have to edit the report and it will be dynamic.

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