Common URL parameters for Reporting services reports

Source: Internet
Author: User

Http://blog.sina.com.cn/s/blog_5ef7acf5010118a5.html

Common URL parameters for Reporting services reports (2012-03-01 20:57:33) reproduced
Tags: gossip Category: Technical Archives
http://www.erpgear.com/2011/0728/1704.htmlCommon URL parameters for Reporting services reports2011-07-28 09:38:40Admin Source: Browse Times:User Comments 0 articleAfter 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/reportserver?/ReportFolder/ReportName&Parameters Where: ServerName represents the server name, if the port is not 80 also need to add a port number, such as Servername:8080;reportfolder represents the published Report folder; ReportName represents the report name; & is the report parameter. The following is a full report URL link:
Http://ServerName:8080/reportserver?/AdventureWorks+Sample+Reports/Product+Line+Sales&rs:Command=Render
Reportfolder: AdventureWorks Sample Reports, the middle of the space with "+" connection;
The escape character of "/" is required after ReportServer is used;
ReportName is product line Sales;
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+Sample+Reports/Product+Line+Sales&rs:Command=Render &startdate=2003-1-2
Where StartDate is the report parameter and its value is "2003-1-2".
Note:Report parameters in the report consists of a name and a hint, the display of the name is actually a hint, such as the above report parameter name "StarDate" and prompted "StartDate", 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 PageWidth indicates that the report is displayed on a page-wide basis, that is, the report presentation portion fills a full page width. Wholepage 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.

Common URL parameters for Reporting services reports

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.