Databases Reference
In-Depth Information
Now that you have seen how to pass report parameters to the URL, let's look at passing snapshot IDs to
render historical execution snapshots.
Rendering Snapshot History
One of the major features of Reporting Services is the ability to create execution snapshots of reports. Say
you have a report where the data updates on a monthly basis. Once the data is updated, it does not
change for another month. A perfect example of this would be monthly financial statements. If your data
changes only once a month, there is no reason to query your database every time you need a report. So,
you can use execution snapshots to store this information after the query has been executed. Going
along the same lines as a monthly report, what should happen when your data updates from, say,
January to February? You don't want to lose the January snapshot once the February information is
available. That is where historical snapshots come into play. When you create the February snapshot,
you go and add January to the snapshot history and so on for each subsequent month.
Now that you have execution snapshots stored in history, you need some way to access them. Reporting
Services gives you a very easy way to do this. As you have already seen, each report has a report path that
can be used to render the report. To render a historical snapshot, you simply need to add a parameter for
the historical snapshot ID.
The syntax to pass your snapshot ID is as follows:
http://server/virtualroot?[/pathinfo]&rs:Snapshot=snapshotid
The snapshot ID for your historical snapshot will be the time and date stamp of when the report was
added to the history. The time is adjusted to GMT based on the time zone where the historical snapshot
was added.
URL Rendering Summary
Through URL rendering, you have seen the various commands that can be passed to Reporting Services
that can be used to control the report item display, the format to use, and snapshot information using the
rs prefix. Once you have created your commands for the Report Server, you can pass parameters specific
to the output format. Using the rc prefix and the device information parameters, you can specify things
such as encoding and what items to display in the HTML viewer. After you have specified the report item,
you need to know how to output it. You can pass parameters to your report by simply passing the
parameter name and value combination.
In the next section, let's take a look at the second part of rendering Reporting Service reports. You can use
URLs for simple web applications and web portals, but sometimes you need finer control over report
access and rendering. To achieve this, we'll use the Reporting Service Web service to programmatically
render your reports.
Programmatic Rendering
There are several ways that reports may be integrated into custom Windows forms and web applications.
These include:
Search WWH ::




Custom Search