Showing posts with label SRS Reports. Show all posts
Showing posts with label SRS Reports. Show all posts

Saturday, May 26, 2012

Solutions to issues with Reports in Dynamics CRM 2011

OK I am having a real hard time getting reports to work after installing CRM in recent times. This is an attempt to compile all SQL reports related errors and solutions that have worked for community in general. I have not checked each of the solutions but since I am experiencing issues with reports pretty often I am create this as a quick reference source. The solutions and errors have been picked up from queries posted on community forums and other blog posts.

1. Reports dont work after upgrade to CRM 2011 not even in the new organization added.

I have a separate post on that. But if that does not resolve your problem. It could be that the CRM 4 reports are still being referenced and the new CRM 2011 reports are not being published. The reports do not work in any of the CRM organizations. The Reports are stored in Shared Reports\5.0 folder on Report Server. You can go ahead and delete the Shared Reports folder and then execute the publishreports.exe to publish the reports.

2. Reports do not work with the following error recorded in the log files.

You can access the log files at Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles

Cannot create a connection to data source 'CRM'. ---> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: Immediate caller DOMAIN\crm has insufficient privilege to run report as user S-1-5-21-1756635634-....

There are a couple of solutions available for this.

Open Reporting Services Configuration Manager and uncheck the credentials provided in the Execution Account


Another solution available on this blog.

3. Another common reason for reports not working is the user running the reports is not a part of the following groups






4. Check your Datasource settings in SSRS.

There are 2 datasource created within each CRM organization as well in the Shared Reports folder.

MSCRM_FetchDataSource - This is used by Fetch based Reports

MSCRM_DataSource - This is used by SQL queries based Reports


This is not a comprehensive list and suggestions to include other problems/solutions related to reports in this post are most welcome.

Note: These solutions should be used at your own risk.

Thursday, July 22, 2010

How to display fixed number of rows in a table using SRS Report

There are times when you would like to restrict the number of rows that are being displayed on one page in a table. By default if you add a table to a report and set the datasource to a dataset, it will list out all the rows of the dataset in there and if the table data exceeds the report page then it moves to the next page.

Suppose now you want to make sure that there should be note more than 3 rows on each page in the table, you can achieve this by making the following changes to your report.
Say the default query being used to retrieve data is the following

SELECT productdescription, quantity, priceperunit, extendedamount FROM FilteredQuoteDetail

And it will display the following result set.


To fix the rows of the page you need to change the Query to create a custom column in the query that you can use for grouping the rows on a page. Lets call that the page number for each of the record.
We have used the Row_Number() function to group the rows so that there are only 3 rows on each page.

SELECT productdescription, quantity, priceperunit, extendedamount, page = (CASE WHEN (Row_Number()
OVER (ORDER BY productdescription) % 3 = 0) THEN (Row_Number() OVER (ORDER BY productdescription) / 3) - 1 ELSE (Row_Number() OVER (ORDER BY productdescription)
/ 3) END)
FROM FilteredQuoteDetail


It displays the following result set.



Now you need to add the list the on the report page and Group this list by the page column as shown in the below screenshot.


Now add the table under this list. As shown in the below screenshot.


Now you run this report then data display in 2 pages.

There you are!!!

Friday, September 25, 2009

Designing Simple Dashboards with SRS reports and web parts

At the very basic level, you can design an HTML page with multiple IFRAMES added. Each IFRAME includes the path to the SRS report or one of the CRM views or another html page, probably the URL of a another website… You can place the IFRAME in an HTML table and design the layout of your Dashboard.

<html>
<body bgcolor="#E3EFFF" leftmargin="0" topmargin="0">
<table border ="1">
<tr height="100%">
<td>
<iframe height="550" width="500" src="
http://ad01/ReportServer?%2fINOGIC_MSCRM%2f4.0%2f%7bec3b0bf7-0ab5-dc11-94ac-000c29b366df%7d&rs:Command=Render" />
</td>
<td>
<iframe height="550" width="300" src="
http://ad01:5555/Inogic/_root/homepage.aspx?etc=4&viewid=00000000-0000-0000-00aa-000010001006" />
</td>
</tr>
</table>
</body>
</html>

And


The issue with this one could be that it is a static dashboard and the users do not have much control over the presentation.

This can be taken a step forward by giving more control to the user by using the concept of Web Parts.


Briefly the steps would be

1. Design a web form and add the Web Part Zone control. The Web Part Zone allows you to design the layout of your page i.e whether the reports added appear Horizontally aligned or Vertically aligned or a combination of both.

2. Once the layout is defined. You add the Web Part control. This control will hold your reports.

3. You can add an IFRAME within the Web Part and set the URL to the report/page that needs to be displayed.

The benefit of using Web Parts is that it stores the personalization information of each individual user automatically. So if the user had changed the position of one of the reports in the layout from the left to the right, this change is stored and next time when the user logs on their individual preference is read and displayed accordingly.

Additionally you can provide the drag and drop capabilities



Or even minimize one of the reports to save space.


Well designing Dashboards using web parts is definitely worth exploring further.

Monday, May 11, 2009

Error "Sub reports within table/matrix cells are ignored" when exporting SRS Reports to Excel

If you make an SRS report that uses Data table and has sub-reports included, you will see the below error when the report is exported to Excel.



Export to PDF format works just fine but when you export to Excel the excel file will not show the details included in the sub-report. Instead the sub-report will be replaced with a single line error "Sub reports within table/matrix cells are ignored".

To be able to export SRS reports using Sub-reports to Excel, it is advisable to use List controls instead of Data Table. Once you have made this little change, the export to excel is just perfect. Infact it will automatically even freeze the rows in the page header so that when you scroll through the data that was included in the report header stays static.

Hope this helps!

Wednesday, February 25, 2009

Add SRS report to CRM Form

In course of implementation of Dynamics CRM, a number of clients have asked us to display reports designed using Sql Reporting Services (SRS) within CRM as a tab or may be as a option to the Main Menu. This helps the user to quickly check reporting. I have described a simple way to achieve this in Dynamics CRM
This can be done using following steps.
- Create SRS report.
- Get the rdl file from the project.
- Open IE and type
http://servername/reports without port number as shown below



- Click on “Upload File” each time for each of the “.rdl” files which we are sending you with this mail and then click OK.
- Do not change its “Name” attribute, as shown below.


- Open IE and type
http://servername/reportserver without port number
- Here you will find the report with the same name as of above.
- Click on the page which will open the report in IE.


- Copy this url and use where ever you want i.e. in IFrame or aspx page which would look like:

"http://servername/reportserver?%2fcrmorg1_MSCRM%TestReport&rs:Command=Render"
- Just pass this url and you can see the reports.

You can also append "&rc:Toolbar=false" to the above url if you dont want the toolbar to be seen in the reports(refer the above image below the address bar) and "&rs:ClearSession=true" to ensure that everytime you can see fresh reports.So that the modified url will look like:

"http://servername/reportserver?%2fcrmorg1_MSCRM%TestReport&rs:Command=Render&rc:Toolbar=false&rs:ClearSession=true">

With this you can now design a dashboard report in CRM and have it added as item under Workplace and set it as the Default item to be displayed. So each time you login you see the dashboard.