Reporting Service URL Pass-through parameter application

Source: Internet
Author: User

Parameter delivery format:http://servername/reportserver?/rptcenter/hrreport&rs:format=excel&rs:command=render& Rp:requestno=applyno

Report receive: Opens the report data--parameters named "Requestno" for parameter-->done

More parameter Description ************************************************

After you publish SQL Server Reporting Services (SSRS) reports, you often need to customize the URL parameters of the report to restrict access to styles and content. This article is mainly for SSRS report URL parameters and related applications are elaborated and illustrated. structure of the report URL parameter:
Http://ServerName:7999/reportserver?/AdventureWorks/Product&rs:Command=Render parameter description: servername:7999, ServerName represents the server name, 7999 Port Reportfolder: Represents the published Report folder; ReportName represents the report name; & is the report parameter. Parameters is Rs:command=render.
Issues to be aware of before using the report URL parameters:

1. Escape characters: Commonly used escape characters are as follows:

Serial number

Character

Meaning

Hexadecimal value

1

+

The + sign in the URL denotes a space

+

2

Space

Spaces in the URL can be used with a + or code

3

/

Separating directories and subdirectories

/

4

?

Separating the actual URLs and parameters

?

5

%

Specify special characters

%

6

#

Represents a bookmark

#

7

&

Delimiter between the parameters specified in the URL

&

8

=

The value of the specified parameter in the URL

=

2, the transformation of Chinese characters: the URL itself can not directly identify Chinese characters, to transfer Chinese characters, the need to convert Chinese characters into Utf-8 code. A common approach is to convert Chinese characters that need to be converted by using the Httputility.urlencode method, which can be achieved by writing a small tool in code. Another more straightforward approach is to add a report with a report name that uses the kanji you want to convert, publish the report, and then view the report in ReportServer, where the link to the report contains the required Utf-8 code.

3, the report parameter is case-sensitive, so it must be the same as the case of the original parameter, otherwise it will cause parameter delivery failure.

4. Pass NULL parameter: format: Parametername:isnull=true, such as: Salesordernumber:isnull=true

Example:
According to the parameter type passed, there are parameters from the relational database, this class is relatively simple, according to the above to escape the special character and convert Chinese characters. Such as:
Http://ServerName:8080/reportserver?/AdventureWorks/Product&rs:Command=Render&rp:StartDate=2003-1-2
Where StartDate is the report parameter and its value is "2003-1-2".
Note:Report parameters in the report is composed of names and prompts, the display of the name is actually a hint, such as the above report parameter name "StarDate" and Prompt for "Start Date", the delivery process needs to use the actual name in order to ensure the correct delivery.
When the report parameter comes from cube, the situation changes slightly, such as:
& Regionregion=[office]. [Region].&[1]
The parameter name is "Regionregion", and the parameter value is "[Office]." [Region].&[1] ", the parameter value uses an MDX expression instead of the displayed value, which is different from the relational database. And the escape character is used here, "&" is escaped as "&".
Common URL Parameters:
1) &rc:parameters=collapsed
Collapsed indicates that the parameter bar is collapsed and is typically used for many parameters, as shown in Figure 1: parameters also has two additional values: True and False, where true indicates that the parameter bar is displayed, is the default value for the report, and False indicates that the parameter bar is hidden. The hidden effect is the portion of the red circle that is removed in Figure 1.
2) &rc:toolbar=false
Used to control toolbar display or hide, the default is display, and a value of False indicates toolbar hidden.
3) &rc:zoom=whole page
Sets the scale value of a report, expressed as an integer percentage or as a string constant. Standard string values include page Width and Whole page. Where page width indicates that the report is displayed on a page-wide basis, that is, the report presentation portion fills the width of a full page. Whole page is displayed by page length, that is, the report Presentation section appears exactly on one page.
4) &rs:format = PDF
Specifies the form of report rendering, including: HTML3.2, HTML4.0, MHTML, IMAGE, EXCEL, WORD, CSV, PDF, XML, and NULL.

Reporting Service URL Pass-through parameter application

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.