Have any questions?
+44 1234 567 890
In this post we have a look at how ReportServer exposes reports via the URL and how this can be used to implement drilling.
Exporting Reports via the URL
http://SERVER:PORT/reportserverbasedir/reportserver/reportexport
which, for example, allows to incorporate reports into external applications.
The export is controlled using the following parameters:
- id: The id of the to exported report. Alternatively you can use the parameter key to identify the report
- key: The key of the to exported report. Can be used as an alternative to id. Note that, one of the two needs to be present
- format: The export format: for example, html, pdf, csv, excel, png
- p_: Can be used to set parameter values. Assume you have a parameter with key customernr then you can set the parameter by specifying p_customernr=123. If the parameter takes multiple values these are separated by the pipe character “|”.
- c_i: Defines the i-th column. The column is specified using its technical name. Additionally, you can provide an alias for the column. A possible configuration could look like: c_2=ID|fooID. That is, the second column is the column with name ID and its alias is set to fooID.
- allcolumns: Can be used instead of c_ to simply select all available columns. Note that then it is not possible to further configure the individual columns.
- agg_i: Configures an aggregation for the i-th column. Possible values are: AVG, COUNT, MAX, MIN, SUM, VARIANCE, COUNT_DISTINCT
- h_i: Hides the i-th column.
- or_i: Defines the order of the i-th column. Possible values are: ASC (ascending), DESC (descending).
- fi_i: Sets an inclusion filter for the i-th column. Multiple filter values are separated by a pipe “|”. For example: fi_1=FILTER_A|FILTER_B|FILTER_C
- fri_i: Defines an inclusion range filter for the i-th column. Multiple ranges are separated using the pipe character “|” and the range itself is separated using ” – “.
- fe_i: Defines exclusion filters similar to fi_i.
- fre_i: Defines exclusion range filter similar to fi_i.
http://127.0.0.1:8888/reportserver/reportexport?id=4&c_1=ENTITY_ID|FOO_ID&fri_1=2%20-%205|-%207&c_2=action&c_3=key_field&h_1&or_1=DESC&format=pdf