ssrs derived Reports - reporting-services

I have a lot of reports which have the same parameters (datetime custom period forexample). For each new report I have to recreate list of parameters.
Is there any option to derive parameters from base report?
Or maybe it is possible to add similar parameters simpler?

You can make a template report with all the basics (params, headers etc).
Then in BIDS, choose to add an existing report item, browse and select the template report you created.
Reporting services will copy the template rld file to the project folder and add the report to the BIDS solution explorer.

Related

SSRS - Make Allow NULL shared dataset parameter not required in report parameters

I have a shared dataset that calls a stored procedure with optional parameters (they are defaulted to NULL). I have set them to "Allow NULL" in the shared dataset. Is there a way to set up the report that uses this shared dataset so I don't have to add every parameter to the parameter list? It seem redundant to have to add every one then hide and set to NULL.
You mean report parameters, not query parameters, right? Report parameters belong to the report, not the dataset. You best option would be a template based approach.
Create a Report Project Template for Visual Studio that includes the parameters.
Utilize the Reporting Service api within an internal tool and pull down the definition of a known (base) report and create a new .rdl file locally and include it in your project.
Tried and true copy and paste from a bare bones report that includes your dataset link and parameters.

Adding SSRS report through CRM2016: Prefiltering doesn't work?

I've created a custom Reporting Services report from within Visual Studio that is intended to use automatic prefiltering as described here.
So, I've created my query as follows:
select fullname, createdbyname, createdon
from FilteredContact as CRMAF_FilteredContact
order by createdon desc
However, once I add a new Report in CRM based on the report's .rdl file (as described under "Deploying the Report" here) it adds the report fine, but two things happen:
1) The shared data source for this report is initally invalid, both CRM and SSRS refuse to render it with the error:
"The report server cannot process the report or shared dataset. The shared data source 'MyOrg_MSCRM' for the report server or SharePoint site is not valid. Browse to the server or site and select a shared data source. (rsInvalidDataSourceReference)"
I have to manually set the DataSource from within SSRS to /MyOrg_MSCRM/CustomReports/MSCRM_DataSource to get it to work.
2) The report doesn't appear under "Run on Selected records" but under "Run on All Records", and doesn't perform any prefiltering.
Also, when I download the .rdl from SSRS it hasn't modified it, neither adding an extra parameter or changing the SQL query. as I would have expected based on this information.
What could I be doing wrong?
I'm using MS CRM 2016 update 1 (v8.1.0.359) on premise, with SQL Server 2014 Reporting Services and the SRS Data Connector installed on the same machine.
Apparently, you can use a shared data source reference, but you have to name it MSCRM_DataSource, just as the Data Source that MSCRM uses for its reports.
If you upload a Report in MSCRM like this, MSCRM recognizes this and automatically updates the data source to the valid /MyOrg_MSCRM/CustomReports/MSCRM_DataSource datasource, and also adds the prefiltering modifications.
You've created a Shared Data Source that you are using for multiple reports. When uploading reports through CRM this is not supported. Each report must have its own connection details embedded in the report.
I think the reason for this is, as you are trying to do, the report gets modified to add hidden CRM parameters and to alter the queries so that pre-filtering can take place.
To fix this, you have to modify each report and enter the Connection Details directly into the report rather than using a Shared Connection. Its a little annoying but should give you the results you are expecting to see

How to export SSRS report having linked reports in to excel

I have a main report main.rdl and 2 linked reports like linked1.rdl and linked2.rdl as a drill through report from the main report.
I have deployed all the reports under one folder in the report server.when i view the main report its working fine and drilling through the linked reports. but my question is how can i export to excel which contains main report as well as linked reports as separate tabs in the same excel?
thanks in advance.
The easiest way to do this would be to put a rectangle on your page and then add your linked report as a subreport inside the rectangle.
then hide the subreports unless exporting to excel by setting the visibility property on the rectangle to
=Globals!RenderFormat.Name<>"EXCEL"
or for ssrs2012
=Globals!RenderFormat.Name<>"EXCELOPENXML"
There are a few problems with this approach. (but these can be solved)
Headers and footers are not shown in sub-report
Performance. The sub reports will run each time you view the main report
the above assumes the drill through reports are only executed with a single set of parameters
imho SSRS is a presentation tool, Excel is also a presentation tool (in this case) so your chaining your presentation tools.
Why don't you call from excel your reports data source and drop it into each tab for each report..main sub whatever.
As your reports should be bound to a named data source (SQL\ view\ sp) for the report you would be calling that.
You can add your main report ....but you cannot add the 2 linked reports, they would show all records. So if you then make your linked reports, reports like main this would then work ie feeding them the key filter field...the children records for linked reports would filter and give you sub tab report you need.
If you cant do this then you have to rethink whole approach... if it was me I would code it so I got all three sets of data and then populated Excel with each tab...save n email spreadsheet

How can the CustomerRef field from SalesTable be added to the CustAccountStatementExt report?

In Microsoft Dynamics Ax2012 R2 I want a customization for report CustAccountStatementExt by adding the field CustomerRef from SalesTable
Location of report in the AOT :
SSRS Reports\Reports\CustAccountStatementExt
You have to open Visual studio 2010 (only supported version for AX 2012 R2) and open this repot from Application Explorer (View -> Application Explorer Ctrl+D,Enter).
MSDN:
Walkthrough: Customizing Existing Microsoft Dynamics AX Reports
How to: Customize a Report
Visual Studio Tools for AX must be installed from the AX Setup.
In addition to Matej's answer (which only covers the customization of the report layout) you also have to make the field available in the report data source. To do that you have to add a new field to table CustAccountStatementExtTmp that will hold the value of the CustomerRef field from table SalesTable.
You will also have to customize the creation of the CustAccountStatementExtTmp records which in this case is surprisingly done in the report controller class CustAccountStatementExtController (usually the report tables are filled in the data provider class). This will require some work, because you have no direct way to access the SalesTable record there. Basically you have to figure out how to determine the sales order from the CustTrans record that is available there.
After that, you still have to customize CustAccountStatementExtDP.insertNewRecords method because for some reason the records are copied from one instance of the (temporary) table CustAccountStatementExtTmp to another.
After that the new field should show up in the data set of the report in Visual Studio and you can then include it in the report layout (see Matej's answer on how to do that).
Here are the steps I followed to accomplish this:
Add field to the CustAccountStatementExtTmp table
Add code to CustAccountStatementExtController.insertCustAccountStatementExtTmp method to populate the new field.
Refresh the data source in the SSRS report, and in the report design (and then re-open the design).
Add the field to the report
At this point I also had to restart the AOS before the data would appear on the report. Apparently there was something cached in memory that prevented it from working.

how to create a new report using a shared dataset in BIDS

Is there a way to configure BIDS so that when you create a new report that you can select a previously created shared dataset instead of having to build a query and then subsituted the shared dataset after the wizard has completed?
currently I am creating the share dataset in BIDS, publishing to the server, and the starting the new report in report builder, downloading the report and then adding the report to my solution and fixing up the shared dataset afterwords. this is clunky to say the least.
What I do is create a "template" report with all of the datasets stored in it. Then, I simply add that "template" report to any project it is needed in. With this template I can also include commonly used fields such as runtime of the report, page number, report created by, as well as the company logo and a text box for the title of the report (with the formatting I prefer).
Does this accomplish what you are needing?