Programmatically creating and executing data delivery extensions in SSRS
Hi All,I have been stuck with this problem since few days, need help regarding the same. I am enclosing the problem description and possible solutions that I have found.Can anyone please help me out here?Thanks and regards,ViratProblem Description:I have a requirement for which I have created a data driven subscription inSQL Server 2005, the whole thing works like this:I have a report on Report Server which executes a stored procedure to getits parameters; then it calls another stored procedure to get data for thereport; then it creates the report and copies it to a file share. This isdone using data driven subscription and the time set for repeating thisprocess is 5 minutes.You can assume that following are working fine:1. I have deployed the report on the Report Manager (Uploaded the report,created a data source, linked the report to data source) - manually, thereport works fine.2. Created a data driven subscription.3. The data driven subscription calls a stored procedure, sayGetReportParameters which returns all the parameters required for the reportto execute.4. The Report Manager executes the report by calling a stored procedure, sayGetReportData with the parameters provided by GetReportParameters storedprocedure; after it has generated the report file (PDF) is copied to a fileshare.For each row that GetReportParameters stored procedure returns a report (PDFfile) will be created and copied to file share.Now, my question is 1. How to I get a notification that this file was successfully createdor an error occurred?2. The only message that reporting service shows on 'Report Manager >My Subscriptions' is something like "Done: 5 processed of 10 total; 2errors." How do I find out which record was processed successfully and which onesresulted in an error?Based on above results (success or failure), I have to perform furtheroperations.Solutions or Work around that I have found:1. Create a windows service which will monitor the file share folderand look for the file name (each record has a unique file name) for thereports that were picked up for PDF creation. If the file is not found, thisservice will report an error. Now, there's a glitch there; if a report takesvery long time to execute it will also be reported as error (i.e. when thisservice checks for the PDF file, the report was currently being generated).So, I can't go with this solution.2. I have also looked at following tables on ReportServer database:a. Catalog - information regarding all the reports, folders, datasource information, etc.b. Subscriptions - all the subscriptions information.c. ExecutionLog - information regarding execution of the subscriptionsand the also manual execution of reports.d. Notifications - information regarding the errors that occurredduring subscription execution.For this solution, I was thinking of doing a windows service which willmonitor these tables and do further operations as required.This looks like most feasible solution so far.3. Third option is to look at DeliveryExtensions but in that case Iwill have to manually call SSRS APIs and will have to manage reportinvocation and subscription information. What is your opinion on this?My environment details:
Windows XP SP2
SQL Server 2005
Reporting Services 2005
Please let me know if I am missing something somewhere...
November 15th, 2006 12:36pm
Ive added some comments for all solutions you proposed:
1. Create a windows service
[Igor] SSRS does not provide information regarding which particular subscription instances (resulted from a data-driven subscription) failed or succeeded. In case of file share delivery monitoring the share may be the only way to get this information until a custom file share delivery extension is implemented.
2. I have also looked at following tables on ReportServer database
[Igor] Note that using ReportServer database directly is not supported.
Data driven status always is in the format Done: {0} processed of {1} total; {2} errors. More detailed information is not available.
3. Third option is to look at DeliveryExtensions
[Igor] I would rank this as a best approach for your needs. Implementing custom delivery extension is not as hard. You just need to implement the IDeliveryExtension interface with two methods and one property. You can start from here http://msdn2.microsoft.com/en-US/library/ms154481.aspx. Deliver method in your extension will be called per every subscription instance created out of your data-driven subscription, and so you will have a complete control over delivering/processing success or failure information.
- Igor
Free Windows Admin Tool Kit Click here and download it now
November 15th, 2006 10:33pm
Thanks a lot!
I will look into delivery extensions, do you have any code samples for the same?
Thanks again!
November 20th, 2006 2:19pm
Printer delivery is the only available delivery extension sample. It implements IDeliveryExtension should be good enough to start from.
Good luck,
-Igor
Free Windows Admin Tool Kit Click here and download it now
November 20th, 2006 9:07pm
Thanks! I implemented my own data delivery extension and it worked.
December 8th, 2006 6:31pm
hay virat hi,
I need the same functianality can u plz send me your implemented Delivery Extension project
thanks in advance
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2007 3:49pm
Hello
How do we schedule automated generation of reports on SSRS and be delivered to a shared drive ? What kind of permissions do we need ?
When we click on "shared schedules" option on SSRS Management Studio , what configuration do we need to change ? any thoughts ?
Get similar error when I click on execution option of a particular report on report server
An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help
Get Online Help
For more information about this error navigate to the report server on the local server machine, or enable remote errors
Error on SSRS Management Studio:
Error that we get is "Failed to retrieve data for this request. (Microsoft.sqlserver.smoenum)
Additional Information
An Internal error occured on the report server. see the error log for more details.(rsinternalerror) (Report Services SOAP Proxy Source)
An Internal error occured on the report server. see the error log for more details .(rsinternalerror) (ReportingservicesLibrary)
For more information about this error navigate to the report server on the local server machine or enable remote errors ()
Details:
===================================
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
------------------------------For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------Program Location:
at Microsoft.SqlServer.Management.Smo.Enumerator.Process(Object connectionInfo, Request request) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItemWithQuery(IList nodes, INodeInformation source, INavigableItem sourceItem, String urnQuery, Boolean registerBuilder, Boolean registerBuiltItems) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItem(IList nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.Build(INodeInformation source, INavigableItem sourceItem, IFilterProvider filter) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.GetChildren() at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren()
===================================
An internal error occurred on the report server. See the error log for more details. (rsInternalError) (Report Services SOAP Proxy Source)
------------------------------For help, click: http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsInternalError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=9.00.1399.00
------------------------------Program Location:
at Microsoft.SqlServer.Management.UI.RSClient.RSClientConnection.ListSchedules() at Microsoft.SqlServer.Management.UI.RSUserInterface.ScheduleEnumerator.PopulateInstances(EnumResult erParent, DataTable table) at Microsoft.SqlServer.Management.UI.RSUserInterface.RptSvrEnum.GetData(EnumResult erParent) at Microsoft.SqlServer.Management.Smo.Environment.GetData() at Microsoft.SqlServer.Management.Smo.Environment.GetData(Request req, Object ci) at Microsoft.SqlServer.Management.Smo.Enumerator.GetData(Object connectionInfo, Request request) at Microsoft.SqlServer.Management.Smo.Enumerator.Process(Object connectionInfo, Request request)
===================================
An internal error occurred on the report server. See the error log for more details. (rsInternalError) (ReportingServicesLibrary)
------------------------------For help, click: http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsInternalError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=9.00.1399.00
===================================
For more information about this error navigate to the report server on the local server machine, or enable remote errors ()
February 1st, 2008 11:05pm
The following error is received when trying to establish a subscription using "windows file share"Failure writing file xxxxxx : the report server has encountered a configuration error. see the report server log files for more informationOn examining the files I note that it may be related to Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file.but surely this would just mean that it uses sql server for storage instead of the file system?
Free Windows Admin Tool Kit Click here and download it now
February 26th, 2008 2:40pm
HI Virat,
Can you please provide me the code to Implement own data delivery extension. I need to create custom delivery extension where I need to save the PDF output of report to Relational Database.
I am using sql server 2008R2.
Your help will be appreciated.
Thanks
July 13th, 2011 5:29am