Wednesday, March 25, 2009

How to develop Standard and Data driven subscription?

Creating standard subscription is fairly simple
  • Go to report manager
  • Open report properties
  • Select subscription
  • Create new subscription
  • Select your delivery method (Windows Share/Email/Sharepoint library)
  • Define required parameters
  • Define schedule (Custom/Shared)
  • Click OK.
You are all set!!!

Creating Data driven subscription is somewhat tricky,
  • First of define one table in your database for your subscription paramter (e.g. tblSubParameter), like
- Email To
- Subject
- Render Format (PDF/Excel etc)
- Include report link etc...
  • Once you are ready with your report table, go to report manager
  • Select report and open report properties
  • Go to Subscription
  • Create a new data driven subscription
  • Give some name for subscription
  • Select datasource (Shared/Custom) where your subscription parameter table exists.
  • Click Next
  • Write the query to fetch the parameters (E.g. select * from tblSubParameter)
  • Validate your query
  • On successful validation, click Next
  • In place of giving static values for each parameter like, Email to, render format. etc... ; Select parameter which is coming from database
  • Select all required database parameters, click next
  • Select report level parameters, click next
  • Select schedule, click FINISH.
You are all set!! now at scheduled time, subscription event will fire and it will bring subscription parameter information from database and based on your table information, report server will send the report subscription...





No comments: