To deploy a report, follow these steps:
1. Back in the Windows Azure Management Portal, select the Reporting option in the Navigation pane, and then select the report server created earlier.
2. Highlight and copy the Web service URL from the Server Information section of the portal. 3. Back in SSDT, right-click the report solution, and select Properties from the context menu. 4. In the Property Pages dialog, the only thing you need to enter is the TargetServerURL,
shown in Figure 6-14. Notice also the name of the TargetReportFolder, which in this case is AzureReport—the name of your Visual Studio solution.
CHAPTER 6 ■ SQL REPoRTing
Figure 6-15. The report shown in Management Portal Figure 6-14. The Solution Property page
5. Click OK on the Properties page.
6. Right-click the solution in Solution Explorer, and select Deploy from the context menu.
After several seconds you will be prompted for the Reporting Services Login. This is the administrator username and password you entered when provisioning your server.
7. Once the report has been deployed, go back to the Windows Azure Management Portal and click the Refresh button on the ribbon. Your report will then show in the Items List section of the portal, as seen in Figure 6-15.
8. Open your browser, and navigate to
https://[servername].reporting.windows.net/reportserver/AzureReport/Report1 9. You should be presented with your SQL Reporting Service Home folder and the
AzureReport folder listed. In the AzureReport folder is your newly created report. To view the report, click the report link.
You’ve just walked through a simple example of creating a report that pulls data from SQL Database. However, before we close this discussion of SQL Reporting, we also need to talk about security.
Security
This section contains some guidelines and best practices for managing the security of your SQL Reporting server and reports.
When embedding reports into your application, secure your connection string to the •
report server.
Because reports can only use SQL Database instance as a data source, the recommended way •
to provide access to shared data sources is to create and deploy shared data sources for reports to a folder on the report server. Store the credentials for each shared data source on the report server.
By default, report items inherit security based on report folder permissions. Thus, the folder •
to which you deploy your report items matters greatly. By assigning specific permissions to a folder, you break the inheritance for permissions in the folder hierarchy.
SQL Reporting requires not only a username and password to access reports, but a URL as well. These three pieces of information are the URL, username, and password to the report server account. However, you can create users in the Management Portal and assign them to roles that grant permissions. You can then provide the report readers with those usernames and passwords.
When creating new users, you assign them to Item roles, and optionally, System roles.
Roles
As part of creating new users, you also assign them to an Item role and, optionally, a System role. The Item roles and System roles are similar to those available on a native mode report server:
Item roles: Browser, Content Manager, My Reports, Publisher, and Report Builder. •
System roles: System Admin and System User. •
Roles are a concept that helps organize in terms of functions or goals. Roles represent one or more people who perform one or more functions or tasks that require specific permissions. For SQL Reporting, the preceding roles help determine which users can perform specific functions such as viewing or editing reports, publishing reports, creating and managing additional users, and managing database objects.
For example, the Browser role can run reports, subscribe to reports, and navigate through the folder structure. The My Reports role can manage a personal workspace for storing and using reports and other items.
It should be noted that these roles are not specific to Windows Azure SQL Database, but to the underlying SQL Server Reporting service. More information about these roles can be found here:
CHAPTER 6 ■ SQL REPoRTing
Figure 6-16. The Manage Users dialog
Take the following steps to create a user and assign it a role:
1. In the Management Portal for SQL Reporting, click the Manage button on the ribbon. This will display the Manage Users dialog shown in Figure 6-16.
2. To add a user, click the Create User button to open the Create User dialog, as seen in Figure 6-17.
3. In the Create User dialog, enter a username and password. Select an Item role and an optional System role. Click OK.
4. Click OK on the Manager Users dialog.
Even though both My Reports and Report Builder are listed in the Item role drop-down list on the Create User dialog, they are not available nor supported in SQL Reporting. However, depending on role assignments, users can perform different tasks on the server. By granting users the Browser role, you give those users permission to read reports. You can assign users to multiple roles, and via the combination of roles and permission create users who have the appropriate permissions for our reporting environment.