Archive
Host a SSRS report which gets data from external Data Source – CRM on-premise
We got a requirement to host a SSRS report in CRM, which gets data from external data source (i.e., Data Base from another SQL server).
CRM normally uses Shared Data Source when you upload any SSRS report which pulls data from CRM.
In our case we had to
- Create a new Data Source
- Override the CRM Shared Data Source with a new Data Source
Below are the steps.
Develop and Deploy Report in CRM
- Design the report with Data Source connected to external Database.
- Preview and make sure you are getting data properly.
- Save the .rdl
- Open CRM application
- Create a new report and upload the .rdl
Configure the Report’s DB Connection
Now we got report in CRM and we need to point the report to Custom DataBase by following steps below
- Connect to the SSRS server
- Open the browser and type (http://servername/Reports) (You can also get URL from “Reporting Services Configuration Manager à Report Manager URL” tab)
- In the Home page, click on ‘New Data Source’
- Provide the Connection String and Credentials and Save
- Go back to the report server home page.
- Open the folder by name (YourCRMORG_MSCRM)
- Go to ‘CustomeReports’ folder and select your report (Refer ‘Description’ column for Report Name)
- Choose Manage from context menu
- Choose ‘Data Sources’ tab and select newly created ‘Data Source’
- Click on ‘Apply’
- Close and re-run the report to get the changes.
🙂
Executing Informix DB Stored Procedure in SSRS
Recently we got a requirement to pull the data from IBM Informix DB and prepare report using SSRS.
For who does not know what is Informix, refer here
Below are Stored Procedure details
Name: sp_getcustomersbycity
Description: Accepts date range and City codes as parameters and returns Customer result set.
Query Execution Syntax in SSRS:
{
call sp_getcustomersbycity(‘2015-09-30 20:00:00′,’2015-10-31 19:59:59′,’0′,’HYD,BLR’,null)
}
🙂
ReportProcessingException: Cannot create a connection to data source ‘CRM’
Recently, when we deployed our CRM managed solution with reports on our testing environment, we were getting “rsProcessingAborted” error while accessing the reports.
When we check the event viewer for more error details, we found below “Caller has insufficient privilege to run report” exception
Data source ‘CRM’: An error has occurred. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException:
Cannot create a connection to data source ‘CRM’. —> Microsoft.Crm.Reporting.DataExtensionShim.Common.ReportExecutionException: Caller has insufficient privilege to run report as user
Reason
- In our scenario, SQL Server report service was running under a separate “Service Account”
- The service account under which report service was running does not have required privileges to establish connection and access filtered views
Below fix worked for us
Fix
- Since the Report Service’s “service account” was unable to access CRM filtered views,
- We added the “service account” as a member of the AD’s “PrivReportingGroup {Org_guid}” and “PrivUserGroup {Org_guid}” groups
- Provided “service account” SQL Server login with permissions to ReportServer and ReportServerTempDB (db_owner, RSExecRole)
Getting logged in user’s GUID in CRM reports
We can get the logged in user GUID in the custom reports deployed in CRM using “fn_FindUserGuid()” function
Below is the sample query for the same
DECLARE @currUserId UNIQUEIDENTIFIER
SELECT @currUserId=dbo.fn_FindUserGuid()
PRINT @currUserId
🙂
Fix – Unable to add custom Report to the Solution in CRM 2011
I have a custom SSRS report “ABC Report” in my CRM application.
And, I wanted to include this report in my solution “My Reports” and export to another CRM organization
But to my surprise, I did not find “ABC Report” when I choose “Solution -> Reports -> Add existing”
Fix :-
- Go to “Work Place -> Reports”
- Choose “ABC Report” and click “Edit”
- In the report window go to “Administration” tab
- Set Report “Viewable By” option to “Organization” and Save
- Open the solution and click “Reports à Add existing reports”
🙂
Report cannot be displayed – rsProcessingAborted
Hi,
This is the most common error we get when you run a custom report from CRM.
Though there could be many reasons below are the ways to know the reason for issue
To debug:-
- Connect to the machine where your SSRS server installed and open the event viewer
- Run –> eventvwr –> Windows –> Application
- For detailed error description, open the SQL Reporting logs from below path
- C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\LogFiles
🙂