Help! A new CRM report….


Today i will posting something technical, since my last post was even described as pr0n..Yeah I also can’t believe it..maybe it’s jealousy….

I often see people having problems publishing/load new reports into Microsoft CRM.
They will get errors such as:

NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Crm.Reporting.SRSReport.convertDataSource(CrmContext context) +115
Microsoft.Crm.Reporting.SRSReport..ctor(String name, String description, String xmlContent, String showin, String relatedentity, String category, CrmContext context, String filename, String origFilter) +136
Microsoft.Crm.Reports.ReportCache.CreateSRSReport(String name, String description, String template, String showin, String relatedEntity, String category, String filename, Boolean isNewReport, String defaultFilter) +100
Microsoft.Crm.Application.Platform.Report.InternalCreate(String xml) +629
Microsoft.Crm.Application.Platform.Entity.Create() +109
Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId) +404
Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity) +56
Microsoft.Crm.Application.Forms.EndUserForm.Execute(Entity entity) +13
Microsoft.Crm.Web.Tools.ReportProperty.ReportPropertyPage.ConfigureForm() +202
Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +30
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Page.ProcessRequestMain() +1499

The steps below describe the way how to solve it when you are using Visual Studio 2005, i bet 2003 works kinda similair.

1. Create a new Report Project in Visual Studio 2005

2. Right click on Reports, choose to add Existing Item

3. Double Click on the report to open it.

4. Click on the Data (top tab) above the open report file.

5. Click the “…” button just to the right of Dataset to open Dataset Properties.

6. Click on the “…” button to the right of the Data Source drop down list.

7. Clear the “Use shared data source reference” option.

8. Click on the “Edit…” button to the right of Connection string.

9. Enter the correct SRS Server Name, enter the authentication method, and choose the correct database name.

10. Click OK, this will change the source for the entire report.

11. Click OK to the Visual Studio window again.

12. Choose, File, Save <Report> as…

13. Save the report on the
CRM Server and try to upload it again. This time it should load.

Comments (24)

  1. Followed your instructions under 2003 and still get the error. Interestingly it did not have use share datasource ticked (even though it did previously use a shared data source).

    Is there any way to edit the rdl file manually (since it is xml) or anything else you can recommend?

  2. Had a look and the error I am getting is slightly different:

    [CrmException: Exception of type Microsoft.Crm.CrmException was thrown.]

      Microsoft.Crm.Application.Platform.Report.InternalCreate(String xml) +721

      Microsoft.Crm.Application.Platform.Entity.Create() +109

      Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId) +408

      Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity) +57

      Microsoft.Crm.Application.Forms.EndUserForm.Execute(Entity entity) +13

      Microsoft.Crm.Web.Tools.ReportProperty.ReportPropertyPage.ConfigureForm() +202

      Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +30

      System.Web.UI.Control.PreRenderRecursiveInternal() +62

      System.Web.UI.Page.ProcessRequestMain() +1499

  3. Bayasgalan says:

    hi dear all!

    i have been developing MSCRM for 8 months. Maybe it’s too long for you. but i’m not good experienced programmer. i did one report on visual studio 2003 and i uploaded that rdl file to my CRM report server. But there is one problem. i don’t know how to fix it. that problem is i can see my report only on server computer by crm or report server. but i can’t see it from other computers, by crm or report server. i hope some one will help me. 😀

  4. Andrew_Fryer says:

    Hi,

    I am getting an error when trying to import the reports, which is slightly different:

    [CrmException: Exception of type Microsoft.Crm.CrmException was thrown.]

      Microsoft.Crm.Application.Platform.Report.InternalCreate(String xml) +722

      Microsoft.Crm.Application.Platform.Entity.Create() +109

      Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId) +408

      Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity) +57

      Microsoft.Crm.Application.Forms.EndUserForm.Execute(Entity entity) +13

      Microsoft.Crm.Web.Tools.ReportProperty.ReportPropertyPage.ConfigureForm() +208

      Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +30

      System.Web.UI.Control.PreRenderRecursiveInternal() +62

      System.Web.UI.Page.ProcessRequestMain() +1499

    Any ideas on this one?

    Thanks

  5. It worked for me! I was a bit frustrated, but then I found this post. I am using Visual Studio 2003. Thanks!

  6. mennotk says:

    I hope you can smile again Michael 🙂

  7. Beilei says:

    Your suggestion worked perfectly. Thanks a lot.

  8. Nithin says:

    How do I solve the problem with report upload..???

    I get the following info during a report upload through the CRM screen.

    ————————————————–

    Microsoft CRM Application Error Report:

    Error Description:

    Exception of type Microsoft.Crm.CrmException was thrown.

    Error Details:

    Exception of type Microsoft.Crm.CrmException was thrown.

    Error Number:

    0x80048298

    Source File:

    Not available

    Line Number:

    Not available

    Request URL:

    http://my-crm:5555/CRMReports/reportproperty.aspx

    THE STACK READ LIKE THIS…

    CrmException: Exception of type Microsoft.Crm.CrmException was thrown.]

      Microsoft.Crm.Application.Platform.Report.InternalCreate(String xml) +722

      Microsoft.Crm.Application.Platform.Report.InternalCreateAndRetrieve(String xml, String columnSet) +9

      Microsoft.Crm.Application.Platform.Entity.CreateAndRetrieve(String columnSet) +131

      Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId) +289

      Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity) +57

      Microsoft.Crm.Application.Forms.EndUserForm.Execute(Entity entity) +13

      Microsoft.Crm.Web.Tools.ReportProperty.ReportPropertyPage.ConfigureForm() +208

      Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +30

      System.Web.UI.Control.PreRenderRecursiveInternal() +62

      System.Web.UI.Page.ProcessRequestMain() +1545

  9. mennotk says:

    Nithin, try this and let me know how it works.

    1. Open Reporting Services Report Manager. In Internet Explorer, open http://localhost/Reports.

    2. Click Show Details.

    3. Click the icon in the Edit column next to the folder for your organization.

    4. Click Security.

    5. Click New Role Assignment.

    6. On the New Role Assignment page, in the Group or user name box, enter (domainnamecrmservername$)

    7. Select the checkbox next to Publisher for Microsoft CRM.

    11.Click OK.

  10. Ursula says:

    does anyone else think this application sucks?

  11. banhinc says:

    I’m noticing a very peculiar Reporting Services error with several CRM 3.0 Pro installations.  This doesn’t seem to happen to the Small Business version.  After installation, the Domain Admin can see the CRM reports fine but no other CRM users.   It’s probably a permission problem, but I haven’t have time to chase it down yet.  I did a quick comparison between the Pro and SB version but didn’t see any obvious differences with the Reporting Services permission.  I’ll have to bring it up the next I talk with a Microsoft CRM support engineer.  Anyone came across this problem?

  12. mennotk says:

    You might also want to check out the following post: http://blogs.msdn.com/mscrmfreak/archive/2007/08/07/error-0x80048298.aspx

  13. Andy says:

    We found another answer to the problem. This worked after doing what Mennotk suggested in the comment on this page from May 24th. For the process in the main post at the top of this page, I kept getting an connection string error saying that "… user isn’t associated with a sql privilege" (Unfortunately that’s not an exact quote, but that was the idea. The important part is the ellipses and the no priveleges part). My colleague was looking over  my shoulder trying to troubleshoot with me, and I was on the page where you enter the server name, the authentication method, and can test the connection to the database. As we were at a client using SQL authentication, he told me to check the box to remember my username and password. That worked! Apparently those credentials were being cleared as soon as I clicked the "OK" button to close the dialogue. I’m not sure why.

  14. Anthony Monsees says:

    We have 4 different CRM environments and the thought of hard-coding the connection information in each report didn’t make any sense.  So we did some trial and error hacking and came up with a work around.

    1. Upload the SRS Shared Data Source to the Report Server in the <org>_MSCRM folder

    2. Upload any CRM reports that use the shared data source to the <org>_MSCRM folder

    At this point, the reports are available in CRM, but you can’t edit the properties and categorize them.  When you do, you will receive a DateTime.Parse error message.  This is because reports uploaded directly to SRS are missing at XML element in the Property field of the Catalog table within the ReportServer databse.

    3. Run the following script replacing the Name=’New Report’ with your report name to add the missing ModifiedOnDateTime element to the Property Xml field  

    Update Catalog

    set Property = replace(Convert(varchar(max),Property), ‘</Properties>’,'<ModifiedOnDateTime>2007-08-17T16:16:22</ModifiedOnDateTime></Properties>’)

    where Name=’New Report’

    You can now open and set the report details within CRM including categorization, etc.

    It’s a hack, but it will save us a ton of time so i thought I would share

  15. mennotk says:

    Anthony, thank you for your feedback and "hack". I will give this a try!

  16. adamkaze18 says:

    mennotk – Your solution of adding CRM server to the roles in report manager worked perfectly.  Not sure how this got changed over the weekend but it is back to working and the world is right again… or atleast the CRM part of it.

  17. Nick says:

    I am looking for assistance as I am an extreme novice with CRM.  I just started using the program and made my first rookie mistake.  I imported all of our contact data in under contacts; including both Leads and current Customers.  Now I need to separate the two.  Is there a way to do this with out having to export the Leads and then import them back into the program in their proper location?

  18. mike175 says:

    For creating the report i followed the steps you have specified from 1 to 13.

    Still I am not able to solve the error i am getting.

    The error i am getting is when adding new report designed using VS 2005.

    Server Error in ‘/’ Application.

    ——————————————————————————–

    Exception of type Microsoft.Crm.CrmException was thrown.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Microsoft.Crm.CrmException: Exception of type Microsoft.Crm.CrmException was thrown.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

    Stack Trace:

    [CrmException: Exception of type Microsoft.Crm.CrmException was thrown.]

      Microsoft.Crm.Application.Platform.Report.InternalCreate(String xml) +722

      Microsoft.Crm.Application.Platform.Entity.Create() +109

      Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId) +405

      Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity) +56

      Microsoft.Crm.Application.Forms.EndUserForm.Execute(Entity entity) +13

      Microsoft.Crm.Web.Tools.ReportProperty.ReportPropertyPage.ConfigureForm() +208

      Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e) +30

      System.Web.UI.Control.PreRenderRecursiveInternal() +62

      System.Web.UI.Page.ProcessRequestMain() +1499

    Please help to solve this problem..

  19. mennotk says:

    Mike, please take a look at this post: http://blogs.msdn.com/mscrmfreak/archive/2007/08/07/error-0x80048298.aspx This should solve your problem!

  20. ratjungdb says:

    Hi all,

    I’m new in CRM Report developer.I’ve try to publish my custom report(MyReport.rdl) to the crm server. I did folow step.

    1.Setup Reporting Service on my local machince(in the same domain as CRM Server).

    2.Create report in VS Studio 2005 and save to MyReport.rdl

    3.Copy report.rdl to CRM Server as crm folder(CRMServerNamec:Program FilesMicrosoft CRMReportsMSCRM)

    4.Open Microsoft CRM, and in theWorkplace pane, under My Work, click Reports.

    5.Click New, click Browse, and then browse to the CRM Reports project on CRMServerNamec:Program FilesMicrosoft CRMReportsMSCRMMyReport.rdl file.

    6.When I clicked Save and Close I met error message "Error uploading Report. An error occurred while trying to add the report to Microsoft CRM. Try adding the report again. If this problem continues, contact your system administrator."

    I notice that when I copy existing report from Microsoft CRM and change the report name to another.I can added the report to CRM. But if i made change on that report I can’t add that report to CRM.

    Anybody can helpme what should i do to fix this problem?

    Thank you for advance,

    Rath:Avanade,Thailand

  21. nosredna says:

    Thanks!  Worked for me (very noob when it comes to CRM & SRS).  Now . . . . how to figure out making the report filter for account when it is opened from the account object . . . time for more searching . . .

  22. Nigel West says:

    The "real" key to this is that the database name on your dev environment must be the same database name as that on your testing and live environment.  For example, I have a database called CRM_Data on my dev (local) machine but my testing environment has a database called CRM_Test_Data, and my live working environment has one called CRM_Live_Data.  No matter what I did with datasource it didn’t work until I had unified my database names, they are now called CRM_Data on all environments and the above solution works perfectly.

Skip to main content