I have created a data driven subsciption for a report. The subscription gets data from a table in Oracle database. (query: select * from Mytable) What I want to do is to subscript reports by event(by schedule works already). For example, when new rows are inserted in the table in Oracle, this will trigger subscription and generate new reports. How do i approach this? Thanks!
相关问题
- Why does SSRS need to recycle the application doma
- Use multiple ReportItems in one expression in RDLC
- How to delete old subscriptions
- QUERY method of Soap request for SSRS and WCF test
- SSL/wallet error trying to access Oracle DB from S
相关文章
- SQL Server Reporting Services - Set default value
- Get list of reports from SSRS?
- SSRS tablix column CanGrow property for width?
- The report server cannot process the report or sha
- SSRS 2008 report not working with using a stored p
- Dataset with dynamic columns in tablix/matrix
- Bulk uploading images to SSRS
- how to properly display SSRS site within iframe
I can think of a few approaches. With some extra database design, you could set a flag in the table for rows that have been inserted, but not yet reported on. Then you could change your data-driven subscription query to run a stored procedure that looks for the flags, returns the rows to the subscription, and updates the flag on the table. You'd then schedule the data-driven subscription to fire at an appropriate time interval--when no rows have been inserted in the table, no rows are returned to the subscription, and so it doesn't fire.
If you want the report to fire with every single insert, then another approach is to set a trigger on your table so that every time a row is inserted, it sends code over to the ReportServer database, as follows:
The code above is how SQL Server fires subscriptions in the jobs. You would just invoke the job directly by the trigger. The GUID in the @EventData is the SubscriptionID that you want fired. You'll have to look in the Subscription table (in the ReportServer database) to figure that out. Also, I'd suggest that you set up the data-driven subscription to be on a "One-Time" schedule, if you go this route.