Decrypting data for use with SQL Reporting Services 2008 - sql

I have recently started to look at sql reporting services.
I have data stored in a database which has been encrypted with an AES cypher before being stored away.
I've had a look at building some reports using Microsoft Report Builder 2.0 and it seems quite nice and simple for knocking together some simple reports.
My question is: Can I decrypt this data before displaying it on a report? Is there anyway to run code with these reports?

Use a RDLC (C is for Client), and then look at the Microsoft.Reporting.WebForms and Microsoft.Reporting.WinForms namespaces.
This allows you to use code to generate your data, for example get your data from SQL Server then decrypt it as required before presenting it to the ReportViewer control.

Related

Is there a way to use datasets from custom assemblies to populate SSRS datasets?

I am tasked with converting some RDLC files to RDL that define their datasource with compiled VB.NET. Translating the code to TSQL is complicated for some of them, and it would be prudent to use the assemblies that are already developed if that is possible.
Probably best option would be to make a host for assemblies which exposes data as xml webservice, then in a report to use xml data source.
Usually there is no way to access the SSRS report dataset from Code Behind, you have to write queries for your Reports. But there is a kinda work-around . But it may have some performance issues..
Performance issues (Pros):
When you write your queries for the report, they are handled by ReportServer
and when you write stored procedures, they are handled by your Database server, in case your reporting server and database server are different
Performance issues (Cons):
When you don't want to go the above way and in the case you are developing the web application, you can surely make use of passing data to SSRS rdl from code behind through XML
and the Cons is that your data processing at the moment is not done by Database server but by the Server in which your application lies

SQL Server Reporting Services VS rdlc and the ReportViewer

We are planning on creating reports to be run on the same computer that the database application is running on.
Can you tell me which of these is the best approach? (SQL Server Reporting Services or creating a rdlc ReportViewer report)
Also I tried to locate detailed rdlc ReportViewer report tutorials both in books and online and found none. It's probably because I'm looking in the wrong places.
We are also using VB.Net as the language.
All help will be appreciated.
In a nutshell, .rdlc is the client version. You cannot host these on the report server. These reports do not know how to fetch the data, you MUST get the data yourself and pass it to the report. For this reason, you cannot even preview the report while designing. ReportViewer.ProccessingMode = Local
The .rdl or server reports know how to fetch the data. You configure the datasource and upload them to the report server. Because of this, you can preview the reports while designing them. You can use the web/desktop ReportViewer control to run the reports from inside your app...like a proxy between your application and the report server.ReportViewer.ProccessingMode = Remote
I prefer rdl for any sql datasource, but rdlc is also good for cases where your datasource is very complex or can only be built through the application code. I think there might be ways to configure an object datasource for rdl but I haven't looked into that yet.

Crystal Reports

I have installed Crystal Reports and am using it in Visual Studio 2005.
Can anyone help me as to how i can use SQL Server 2000 to generate reports using Stored Procedures.
Im not sure i have understood the question. if you want SPs to write the RPT file for you then I cant answer.
What i have done for years is use Stored Procedures to do the heavy-lifting for the report. Simply create an sp with parameters. When you create your crystal report and adding data definitions in make sure that stored procedures are included. Then add parameters to the report which are inserted into the SP paramaters at runtime.
Using Views is also a good way to put all the data massaging work back onto the db server instead of the client. Send parameters from crystal to return a filtered dataset back to your report for printing.
Crystal Reports: Tutorials and Sample Code
http://msdn.microsoft.com/en-us/library/ms227881%28VS.80%29.aspx
Google search of "Crystal Reports Visual Studio Tutorial" returned that as the top result.
Start by creating a data source type of OLE DB, and choose your SQL Server Native Client. This option will be there for a new report, or if you set the data source; note that if you set a different data source for an existing report, your existing data fields may disappear from the report. Using integrated security is nice because you can control access to the data in the report in SQL Server.
Then in your database expert, click "Add Command", where you can call the shared procedure, add SQL, select your fields, etc.

List reports with inline SQL in SQL Server Reporting Services?

I have a couple of inline SQL in many of our reports on the report manager.
Now I need to do some code change for all of them, is there a way to list all those reports based on the inline SQL and not any SP?
Thanks,
D
You can use the reporting services API to get the report from the web service and do a search for the appropriate tags in the XML. The MSDN documentation for the report definition XML schema and diagrams can be found here and a diagram of the data source related parts here. The API documentation can be found here.
You can write .Net programs that upload and download reports from the Reporting Services API, using ReportingService.GetReportDefinition and SetReportDefinition. You can upload or download the report definition into a buffer, which can be read or written to disk. Somewhere I have an Ironpython prototype that does this, which I'll post if I find it.
To use this, you need to query the WSDL and generate a stub. The tool to do this is called WSDL.EXE. If I can find it I'll post it here, but you could just as easily use C#.
There is also a tool called rs.exe that comes with BIDS which takes a VB.net program and tops and tails it with includes for the Reporting Services API. You can use this to execute a VB.Net script from the command line - essentially it tops and tails the program, compiles it behind the scenes and runs it against a report server.
You can either do what NXC suggested or if this is a one time activity, you can simply open the RDL file for the report in a text editor and search for common SQL strings like "select", "delete" etc in order to find the reports which have inline SQL

Password protected PDF/Excel reports using SQL Reporting services

I am generating a reports using SQL Reporting services 2005. I need to protect the protect the reports(pdf and excel) with the password while the user is exporting the report to to excel or pdf.
Is there any way to protect the report.
The short answer is that you can't do this from the provided PDF rendering extension from SSRS 2005 (either from the web UI or programmatically from the SSRS web services). You can, however, create your own rendering extension that could provide this functionality. Here are some links that might help get you started:
Introducing Rendering Extensions
Microsoft SQL Server 2005: Reporting Services
You could take a COTS library, some open-source code, or your own custom code that can create password-protected PDF files, then wrap that into a custom rendering extension for SSRS 2005. In my opinion, however, this would be a relatively difficult task. A quick Google search didn't give me any obvious rendering extensions for sale that might provide the functionality you're looking for.