I have many reports which use a set of the same report variables:
Is there any possibility not to insert them each time manually when creating a new report? Or may be there is a possibility to share these variables between reports as , for instance, DataSources?
Can be used for this purpose assemblies?
Based on your question it's seems you're looking for a subreport. Sub Report is a tool available in the toolbox in SSRS. It allows you to create a report that can in included in all your other reports without have to rebuild the structure.
Once you've created your report in the sub report properties just specify the report and include the parameters used for the report (if any) see below:
If that's not what you looking for, then maybe it's shared data sets you're looking for.
Let me know if it's something completely different and I may be able to provide alternative solutions.
Thanks
Gav
Related
Assuming a fairly conventional SSRS 2012 report (in Visual Studio 2012) with a main report, a set of sub-reports, a shared dataset that is populated at the start of the report, and a shared datasource.
Is there any simple way within a sub-report's custom code (this is VBA, right?) to access the shared dataset, either to read or update records locally? (No updates back to the database itself.) I'm seeing hints out there that this is possible but no clear examples yet.
And if the above is possible, assuming that a call in the sub-report changed a record in the shared dataset, could that record change be displayed in the main report body?
Yes and No.
I think the overall concept would work but a few points won't.
I don't think you'd be able to use the report dataset with VBA. The code won't have access to the report's datasource directly. You'd probably need to use ADO to access the db from VB.
The only way to see the updated data would be to refresh the report - either manually or automatically on the timer.
I don't see how the subreport is going to figure out what to update the value to. You might have some idea that I'm not seeing right now.
The easier way I see this working would be to use parameters that default to NULL. Then select the row to update with one parameter and the value with another. Then have an UPDATE in your main query that only runs if your parameters are populated.
I have a main report and 30 subreports under that report. I don't want to see all of the subs every time I call the main report, I only want to see the subreports that were selected in the application.
How do I only show selected subreports?
The comment from Martin K. is correct if you're only concerned about the display of the sub-reports. You can set the visibility property via an expression meaning it can also be controlled by the result set or a parameter.
However, the real issue is that even though the sub-reports are hidden they are still run. This is because SSRS retrieves all of the data for the report before it finalizes the rendering. There are a number of good options discussed in this TechNet posting. But basically it boils down to two options:
Parameters & WHERE clause filtering
You can set a hidden parameter on the sub-reports and modify the WHERE clause so that the SQL will not actually return any rows when the parameter isn't set to true. This won't stop the report rendering actions but it will stop the SQL commands from having much of an effect on the server.
Just setup a parameter on your sub-report named #ShowSubreport and use filtering similar to the following
WHERE #ShowSubReport=1
Report Definition Customization Extensions (RDCE)
I haven't actually used these but it sounds quite handy, but it isn't exactly simple or easy. Report definition customization extensions allow you to programatically alter a report definition file on the fly. It takes an RDL as input and outputs an altered RDL stream. You can read more about it in the MSDN article : What's New in Report Server Programmability
I'm new to SSRS and I need the ability to group multiple reports into a single report. I've searched around a lot but not found much. I currently have two reports (more to come) that users need to be able to view/save individually. The users also need the option to view both those reports as a single report. Essentially just a simple concatenation. Eventually, there will be several reports grouped and the user will be able to render all of them for viewing online or saving as a single PDF.
I tried two sub-reports in a master report but it causes a lot of hard to diagnose page-break problems. I was wondering if there was a more straight forward option here. Thanks.
Combining all the report elements into one report would work, but the users also need to be able to view them as individual reports as well. To avoid having to maintain both an master report and multiple individual reports, you have a couple of options:
Create a master report and insert the individual reports as sub-reports. If you get page break issues, check the report page height and widths versus the subreport container height and width.
(If you have SQL Server 2008 R2 or later) Consider publishing your individual reports as a set of Report Parts. You can then reuse these in a master report.
I'm not a fan of subreports either, they work well in Crystal but are not really necessary in reporting services.
Why don't you just combine the reports into one? Copy all the tablixes / other objects from each report onto a new report. You can select all and copy and paste very easily, you just need to set up the parameters, datasets and data sources if they aren't shared.
You can set pagebreaks to occur after each tablix or a good trick is to use rectangles because they will let you control page breaks in their properties.
I need to create a report(rdl) in SQL reporting services 2008. In that I need to create in runtime. The report has chart. I will specify the type of chart, font, alignment and all those stuff in runtime.
Is there any option for using this in SSRS 2008.
An rdlc is just an xml file so you can manipulate it at runtime, it's not a trivial undertaking though. You can find the rdl spec at http://download.microsoft.com/download/6/5/7/6575f1c8-4607-48d2-941d-c69622e11c32/RDL_spec_08.pdf.
There's a downloadable example of creating an rdlc for a table and a matrix dynamically, as well as lots of other useful report viewer info at http://www.gotreportviewer.com/.
You can generate the RDL however you want, it is just an XML file. But you will only be able to run the report locally. To run on the server you would need to deploy the report first, as the server does not run the RDL files directly.
I suppose this is still possible, but it would be pretty slow, and the report would not appear in the report manager or anything before hand.
However, your probably making this problem more complicated than it needs to be. I have work on projects where we generated the RDL and deployed daily with a custom application, and it is almost always not worth it. There is usually a better way.
You can set almost all the parameters of the chart using expressions. The only thing that can't be set is the chart type, but there are ways to get around that as well. Like having all the chart types you need created on the page, but making all except the one you want visible.
Yes...
to do so, you will need to either have an existing rdl file to modify, or you need to completely generate it from code.
All the SSRS xml is stored in the database in a table called catalog. You'll have to use the GUID of that report to access it, or insert a new row creating a new report.
once you're done swapping out your report server xml, the report server will have a "new" report that you can then call via your web page, or via SSRS url parameters.
past that clean up the catalog table if you see the need to.
I'll be honest with you though, this is very far from best practice, best practice that I'm aware of would be to embed the data you need to display in your web page in the form of a widget.
I've been working with SSRS 2005 reports for a little while now, and I've had a few requests come across asking for individual users to be able to save the parameters they use for the next time they run the report. Is this feasible? Is it a part of the "My Reports" role? Any thoughts?
I don't know if that can be done using the report manager, but you could always use URL parameters and pass through that way, then just give them the link to follow which will take them to their report (or render it as a PDF or other format if you wish) and already have the parameters passed in.
Here is a link that will take you to a lot of MSDN documentation about URL Access for your Reports.
I think you'll have to stop using the built-in UI and build your own report front-end to do that. I have always used RS this way and it is not all that complicated.