17
SQL Server User Group Meeting Reporting Services Tips & Tricks Presented by Jason Buck of Custom Business Solutions. [email protected]

SQL Server User Group Meeting Reporting Services Tips & Tricks

Embed Size (px)

DESCRIPTION

SQL Server User Group Meeting Reporting Services Tips & Tricks. Presented by Jason Buck of Custom Business Solutions. [email protected]. Keys for a successful RS solution. Need good design Report writers need to appreciate business Find commonalities between reports for Reuse. - PowerPoint PPT Presentation

Citation preview

Page 1: SQL Server User Group Meeting  Reporting Services Tips & Tricks

SQL Server User Group Meeting Reporting Services Tips & Tricks

Presented by Jason Buck of Custom Business Solutions.

[email protected]

Page 2: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Keys for a successful RS solution

• Need good design

• Report writers need to appreciate business

• Find commonalities between reports for Reuse

Page 3: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Reporting Requirements

• 4 Parts to a report:– Data Source– Data Set– Parameters– Report Object

Page 4: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Coding Tricks

• Think in terms of building a template.

• No true interface inheritance, so determine look and feel early

• Use meaningful names

• Use short names

• Use consistent casing structure (camelCasing or PascalCasing)

Page 5: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Gotchas

• Only use VB for expressions

• Case sensitive dataset item names

• Don’t use EXEC SP, use SP command type

• SQL Server needs to be on W/S

• Data driven subscriptions require Enterprise Edition

Page 6: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Report Manager

• Difficult to brand

• Easy to work

• Complex to manage directory security inheritance

Page 7: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Deployment

• Options : • Use Report Manager• Use Visual Studio• Use Web Service• Use a RSScript and run with RS.EXE

Page 8: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Limitations

• PDF exports have issues – Hidden fields show as blank cells in PDF

• Need to use VS (until 3rd party market – MS Activeviews and Cizer)

Page 9: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Security

• Encryption Keys – Cannot simply restore RS DB on another server.– Secures

– Credentials used to access data in reports– Connection information (RS APP to RS DB)– User Account Information– Other keys used by client applications

• Snapshot and historical data is not encrypted and may be read by a user who can access the chunkdata table. (its serialized, but not encrypted)

Page 10: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Strengths

• Works with MDX and TSQL queries for SQL Server data source• Uses standard ADO.NET data comms• Caching• Reduced network traffic• SQL Server backend• Reduced purchase costs• Security model build on W2K security• Strong Intranet/Internet model• Uses open standards (SOAP/XML/WS/RDL)• Extensibility• Use of multiple development tools• Use of multiple front ends• Build my own custom delivery mechanisms and formats.• Lots of excitement out there about RS• VSS development provides a consistent interface

Page 11: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Tips• Use Visual Source Safe• Use Store Procedures to:

– reduce risk of SQL Server Injection Statements– Increase performance– Reduce maintenance effort.

• Use views when giving end-users access to building reports.

• Consider SSL for secure data• Create an SQL user with low access rights i.e.:

“reportexecution” with read only rights on the given databases)

• Backup Encryption Keys after installation• Backup ReportServer DB regularly.

Page 12: SQL Server User Group Meeting  Reporting Services Tips & Tricks

RS Utilities

• rsConfig – Connection between RS APP and RS DB.

• rsKeyMgmt – To manage Encryption Key backup and recovery.

• rsActivate – Allows us to manage encryption keys across a web farm of RS servers.

• rs – runs scripted operations.

Page 13: SQL Server User Group Meeting  Reporting Services Tips & Tricks

RS.EXE• Uses VB.Net script to run automated tasks on a

Report Server.• Great for deployment packages.• Uses a familiar programming language.• Use it to:

– Copy data between servers– Publish Reports– Create server items (folders/datasources/schedules)– Create subscriptions– Automate deployment (good for test and production)– And more

Page 14: SQL Server User Group Meeting  Reporting Services Tips & Tricks

RS Script file• RSS file is the vb.net script file.• Picture RS.exe as the command line compiler

for RSS files.• Uses the RS Webservice.• RSS file can have User Procedures, and

module level variables• Must have a main() method (this is the starting

point)• RS.exe automatically creates reference to the

webservice and creates variable called rs.• Can uses exception handling

Page 15: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Execution with RS.EXE

• Parameters• -i ->input filename• -s -> server name• -v -> global variables• -b -> execute as a batch – All or nothing approach

• Using Integrated SecurityRs –i script.rss –s http://servername/reportserver

• Passing a global parameter inRs –i script.rss –s http://servername/reportserver -v report=“Company Sales”

Page 16: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Quick Demo

Page 17: SQL Server User Group Meeting  Reporting Services Tips & Tricks

Thanks• Meetings will be on the 3rd Tuesday of each month

(except December/January???)

• Next months meeting will be on Log Shipping and real world stories.

• Comments and Questions: [email protected]

• Ideas on future topics• Evaluation forms.

• Slides available at www.custombizsolutions.com/MaySUG.ZIP