“Insights for Microsoft Dyanmics CRM Online” Solution for CRM 2016 – Quick Overview.

To configure it –

Go to CRM Admin – Manage your Solutions and Install “Insights for Microsoft Dynamics CRM Online”

Once installed it will add a Web Resource to the forms for Lead, Contact, Account and Opportunity entity.

Click on Insights Organizational Settings in Insights Pane.

Configure the field mapping which can be used to update the CRM records.

Once done with Organization Settings, on opening an Account Record for e.g. Microsoft

Clicking on Show Firmographics brings company details.

Sync or Update allows to update the CRM record.

Edit button lets to select the correct contact\account etc. if incorrect

Flag can be used to report any incorrect information

Clicking on Insights or any other options opens up a new page.

Insights: –


Find Contacts:-

Selecting a contact, gives an option to add the selected contact as either contact or lead inside CRM.

In next blog posts, would try covering all the other aspects \ features of Insights solution.

Hope it helps..

Hiding Tool Bar from the SSRS Report while using them in Dashboard (CRM 2011)


We were showing a custom SSRS report inside an iframe in one of our CRM 2011 Dashboards. We wanted to hide the Tool Bar from the report.

To achieve that we need to pass the &rc:Toolbar=false parameter to our report’s URL, which we set for the IFrame.


This hides the tool bar.

Now in one of our other SSRS reports, we were doing filtering based on a report parameter. So we wanted to show only the Parameter toolbar to appear and hide the other toolbar that shows Export, Zoom, Print etc. option.

To do so we first figured out the CSS class being used for it,

this turned out to be ToolBarButtonsCell

Now what we did next was to create a simple CSS file with the following content to hide the tool bar

.ToolBarButtonsCell{display: none;}

And placed that file at the following location of the server

C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\Styles

Now next we had to use the rc:stylesheet parameter for our report’s URL and pass the name of the above CSS file just created ( for e.g. hideToolBar.css)

So our new URL was like this


After applying the new style sheet parameter to the report’s URL

Check out the following link

http://msdn.microsoft.com/en-us/library/ms152835.aspx (URL Access Parameter Reference)

Hope it helps.

Hiding Rectangle in SSRS

In one of our reports we were using List Control to show information related to Account(Business) and its related Task and Appointments. The information was being shown in three different Tablix respectively and if there were no Task and Appointments then we were hiding the Account (Business) Tablix and Rectangle by setting their Hidden Property.

Fig. Three Tablix inside the List Control.

However after running the report we realized that Rectangles although were hiding properly but were still consuming the white space. Because of this we had blank white spaces in our report.

So to display the reports properly we had to set the Hidden Property of the Row also.

Select the Row and Right click it.

Select Row Visibility and set its property using the same expression used for Rectangle’s Visiblity property.

After making this change report started showing up properly.

The helpful thread


Hope it helps.

DateTime Parameter Issue in SSRS (The date/time format is not valid)


In one of our SSRS Report we had 2 Report Parameters, one for “From Date” and other for “To Date”.

On selecting values for them through calendar control, the value was being displayed in the proper format (mm/dd/yyyy). However the value being passed to the query was in the format (dd-mm-yyyy), because of which we were getting “The date/time format is not valid” error.

The following was the regional setting in the server.

We changed it to English (United States)

We tried running the report, but we again got the same issue.

Next we tried by changing the Language Settings of Internet Explorer.

This also didn’t solve the issue.

Finally thought of restarting the server, in case if the settings might not have got reflected properly.

After restarting the system, again tried running the report and it ran successfully J

Hope it helps.

Creating a master detail report in SSRS without using Sub report.

Suppose we have simple master (Person) and detail (Favorite
Actor and Favorite
Movie) tables in our database .

To write a report that doesn’t make use of sub reports we need to have a single dataset as shown below

Create a new report project and drag the List control for Master table and two Tablix inside List for the detail records.

Select the list and set Group Properties for the Row Groups as shown below.

Select the row for the first tablix that shows Favorite Actor information, right click it and specify group properties as FAID (i.e. primary key for that table)

Do the same for the other tablix (Movie table).

Run the report, it will show the following output

To hide the tablix if there is no data, set its Hidden Property using the following expression

For tablix 1 à

For tablix 2 à

The DataSet query

select P.Id, P.FirstName, P.LastName,fa.Id as FAID,fa.firstname,fa.lastname, fm.Id as FMID,fm.Movie from Person P
left outer join FavoriteActor as FA on P.Id = FA.PersonId
left outer join FavoriteMovie as FM on P.Id = FM.PersonId

Hope it helps

Improve SSRS reports performance.


Found these helpful articles while looking for improving the performance of one of our reports.

Also check this video from Channel 9




Parameter Value not getting passed while using SetExecutionParameters method of ReportExecutionService

I was recently working on generating pdf for a report deployed in CRM through code using ReportingExecution2005 web service.


While writing the code, we faced a very strange issue where values for certain ReportParameters were not getting passed.

I will try to explain the scenario using a very simple report.

Suppose I have report that has 4 report parameters and I am setting values for only 3 of the parameters through code. (Note:-ReportParameter4 is set as second parameter)

Suppose they all are Boolean parameter with default value as True.

Now I am using the following code to set their values as false.

 ParameterValue[] myPVArray = new ParameterValue[3];

ParameterValue myPV1 = new ParameterValue();
 myPV1.Name = "ReportParameter1";
 myPV1.Value = "False";
 myPVArray[0] = myPV1;

ParameterValue myPV2 = new ParameterValue();
 myPV2.Name = "ReportParameter3";
 myPV2.Value = "False";
 myPVArray[1] = myPV2;

ParameterValue myPV3 = new ParameterValue();
 myPV3.Name = "ReportParameter2";
 myPV3.Value = "False";
 myPVArray[2] = myPV3;

rs.SetExecutionParameters(myPVArray, "en-us");

This is the output of the pdf

i.e. the value appears properly for the ReportParameter 1 to 3 as set as false. For the report parameter 4 it comes as True (i.e. its default value as we are not setting it).

Now I go forward and make a small change instead of specifying default value for ReportParameter 4 as True, I modify it to take the value from the DataSet instead.



And Data Type from Boolean to Text.

Now I run the same code. This time again we would expect the value for ReportParameter 1 to 3 as False and ReportParameter4 to be whatever value there in the DataSet.

However we will get the following pdf output

For Report Parameter 2 and 3 we see the default value (i.e. True) instead of False as we are passing through code.

The solution to this that I found was to move the reportparameter 4 as the last parameter in the report.

Currently in our report it is set as the second one.


The output after running the code

i.e. the one we were expecting.

So one thing we need to remember over here is that if we have any of our report parameter taking its value from dataset then we should make it the last parameter or should put it after all the other report parameters whose value we are passing through code.

Hope it helps.

Sample Code to use ReportExecution2005.asmx to generate PDF in CRM 2011.


Just sharing a sample code that uses ReportExecution2005 web service of SSRS 2008, and generates pdf of one of the custom reports deployed in CRM.

Here we are also passing value to one of the report parameter.

 // Add web reference to following service
 // http://server/reportserver/ReportExecution2005.asmx

ReportExecutionService rs = new ReportExecutionService();
 rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Render arguments
 byte[] result = null;
 // Get the report path from the report server
 // http://reportserver/Reports/Pages/Folder.aspx?ViewMode=Detail

string reportPath = "/MyOrg_MSCRM/CustomReports/{837a8e7e-d949-e111-996a-00155d2a49c7}";
 string format = "PDF";
 string historyID = null;

string encoding;
 string mimeType;
 string extension;
 Warning[] warnings = null;
 string[] streamIDs = null;

 ExecutionHeader execHeader = new ExecutionHeader();
 rs.ExecutionHeaderValue = execHeader;
 rs.LoadReport(reportPath, historyID);

// Set DataSource Credentials
 // the user name is your userid and the password is the id of the organization
 // get more info here
 // http://ronaldlemmen.blogspot.com/2009/01/log-in-name-and-password-required-by.html
 DataSourceCredentials datasetCredential = new DataSourceCredentials();
 datasetCredential.DataSourceName = "DataSource1";
 datasetCredential.UserName = "F45D4E20-44DE-E011-8A08-005056860004";
 datasetCredential.Password = "D0E60C19-44DE-E011-8A08-005056860004";

// Set Report Parameter values
 ParameterValue[] myPVArray = new ParameterValue[1];
 ParameterValue myPV = new ParameterValue();
 myPV.Name = "ReportParameter1";
 myPV.Value = "True";
 myPVArray[0] = myPV;

rs.SetExecutionParameters(myPVArray, "en-us");

 DataSourceCredentials[] credentials = new DataSourceCredentials[1];
 credentials[0] = datasetCredential;

result = rs.Render(format, null, out extension, out encoding, out mimeType, out warnings, out streamIDs);

 MemoryStream ms = new MemoryStream(result);
 Response.ContentType = "application/pdf";
 Response.AddHeader("content-disposition", "attachment;filename=labtest.pdf");
 Response.Buffer = true;


“The CRL type does not exist or you do not have permissions to access it” error while refreshing dataset in Query Designer (SSRS 2008)

I was getting the below error while trying to refresh the dataset in the query designer.

The workaround was to refresh the dataset from Report Data panel

Right click the dataset and select Dataset properties

Click on Refresh Fields button and Ok to close the dialog box.

Hope this helps.

Hiding and shrinking the width of the Column in SSRS 2008


 We recently had a requirement wherein we were hiding few columns of our SSRS report dynamically based on value of a parameter.

The problem was that the hidden column although not visible was still consuming the space.

To solve this issue

  • Select Advanced Mode in the report Column Groups

  • Select the static column referring to the column we want to hide and set its Hidden property

The helpful post



Showing SSRS report in a single page


We had a requirement to show one of our SSRS report (in CRM 2011) in a single page so that users don’t have to click on Previous Page and Next Page buttons.


Setting InteractiveSize’s Height property of the report to 0 solved the issue.

The helpful posts



Error :- ‘ConvertUtcToLocalTime’ is not a member of ‘Microsoft.Crm.Reporting.RdlHelper.DateTimeUtility” while creating report using Report Wizard – CRM 2011


I got the following error while creating report using report wizard

“Web service request CreateReport to Report Server http://servername/ReportServer/ReportService2005.asmx failed with SoapException. Error: The Value expression for the textrun ‘txtExecutionDateTimeLabel.Paragraphs[0].TextRuns[0]’ contains an error: [BC30456] ‘ConvertUtcToLocalTime’ is not a member of ‘Microsoft.Crm.Reporting.RdlHelper.DateTimeUtility'”

Re installing Reporting Extensions resolved the issue.


Hope it helps.

Using List control to show 1 to n related information in a repeated manner in SSRS report.


Suppose these are our two tables, Person and Person Details, having one to many relationships to each other.


Person details:-

Now here we would like the report to show data in the following format (in repeated fashion)

1st record of Person Table

All details of that record

2nd record of Person Table

All details of that record

Now first create a report having following simple query for the data set

SELECT Id, [First Name], [Last Name], Email FROM Person

Now create one more report which we would be using as a Subreport with the following query

SELECT Hobby FROM [Person Details] WHERE (Id = @Id)

Now go to our main report,

Add a List Control to the report.

Drag the fields from the DataSet of the main Person table to the report.

Next drag the Subreport control inside the list control of the report.

Specify properties for the Subreport.

Refer to my previous post for that (little lazy to put those stuffs again)


Our final report would look like this.

Hope it is helpful.

Using Subreport control to show 1 to n related information in SSRS report.

Suppose these are our two tables, Person and Person Details, having one to many relationships to each other.


Person details:-

Now first create a report having following simple query for the data set

SELECT Id, [First Name], [Last Name], Email FROM Person

Now create one more report which we would be using as a Subreport with the following query

SELECT Hobby FROM [Person Details] WHERE (Id = @Id)

Now go to our main report, select id column, right click it and select add column to the right.

Drag Subreport control from the toolbox there in the new column added

Next right click it and select Subreport properties

Specify the detail report as Subreport.

For visibility specify the following options (report would be auto expanded and we will have + sign in front of our id column through which we can toggle the visibility of the subreport)

For Parameters specify value for the id to be passed from the main report.

That’s it. We are done J

Hope it is helpful.

Export SSRS report as a proper PDF file

After we have created a report in SSRS, if we try to export it in PDF, we could find that our report might not be properly getting rendered in PDF. Instead of fitting in a single page, some part of the report may show up as a second page of the PDF.

These are things we need to keep in mind if we want to render our report properly in a single page

1. Click on Report > Report Properties > Layout tab
2. Make a note of the values for Page width, Left margin, Right margin
3. Close and go back to the design surface
4. In the Properties window, select Body
5. Click the + symbol to expand the Size node
6. Make a note of the value for Width
To render in PDF correctly Body Width + Left margin + Right margin must be less than or equal to Page width. When you see blank pages being rendered it is almost always because the body width plus margins is greater than the page width.
Remember: (Body Width + Left margin + Right margin) <= (Page width)

Below is the link where I got the solution.


Hope it helps.

Reporting error. Report cannot be displayed. (rsProcessingAborted)

I was getting the above error while running one of the custom SSRS report inside CRM 2011.

To resolve this issue I had to follow these steps

  1. Start SQL Server Management Studio
  2. Expand Security, then expand Logins
  3. Select and right click the account under which the SQL Server Reporting Services is running.
  4. Select User Mapping and select YouOrg_MSCRM database and specify following role membership
  • CRMReaderRole,
  • db_owner
  • public.

Hope it helps.

Query for finding Team and it’s member in MS DYNAMICS CRM


We can use this query to retrieve different teams and the users belonging to that team within Microsoft Dyanmics CRM

Select FT.name TeamName,FSU.Fullname UserName, FSU.Systemuserid from
dbo.FilteredSystemUser FSU
inner Join
dbo.FilteredTeamMembership FTM  
on FSU.Systemuserid = FTM.Systemuserid
Inner join  dbo.FilteredTeam FT
on FT.TeamID = FTM.TeamID