Tue 18 Aug 2009

If you get following exception while uploading / creating new report using Source Report Type -> Exising file

==============
[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
==============

The issue lay with our RS permissions.
In addition to failing to upload reports, we tried downloading them from CRM too. This gave us an NT permissions error.
So, we opened up (localhost)/reports, navigated to the CRM datasource (typcially 'Organization_MSCRM), then properties, then security,
and then added a user / group called NT AUTHORITY\NETWORK SERVICE,
and gave them the permissions of CRM Publisher.
After that it all worked fine.

Thanks to Lee/Ronald

 

Comments here
Tue 18 Aug 2009

If you get following exception while uploading / creating new report using Source Report Type -> Exising file

=============
Stack Trace Info: [NullReferenceException: Object reference not set to an instance of an object.]
   at Microsoft.Crm.Reporting.SRSReport.convertDataSource()
   at Microsoft.Crm.Reporting.SRSReport..ctor(String xmlContent, String originalFilter, Boolean convertReportToCrm, ExecutionContext context)
   at Microsoft.Crm.ObjectModel.ReportService.CreateInternal(IBusinessEntity entity, Boolean isScheduledReport, ExecutionContext context)
   at Microsoft.Crm.ObjectModel.ReportService.Create(IBusinessEntity entity, ExecutionContext context)
=============

The reason can be the Shared Datasource used while creating Report in Visual Studio 2005.

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>.

13. Try to upload it again. This time it should load.

 Thanks to mennotk

 

Comments here
Fri 20 Jun 2008

Today I tried to find out which table is taking much space in DB or to find the numbers of columns and rows in all tables of DB

Following query will return the required result

=========

USE DatabaseName
GO
CREATE TABLE #temp (
                table_name sysname ,
                row_count INT,
                reserved_size VARCHAR(50),
                data_size VARCHAR(50),
                index_size VARCHAR(50),
                unused_size VARCHAR(50))
    SET NOCOUNT ON
INSERT     #temp
    EXEC       sp_msforeachtable 'sp_spaceused "?"'
SELECT     a.table_name,
            a.row_count,
            COUNT(*) AS col_count,
            a.data_size
    FROM       #temp a
            INNER JOIN information_schema.columns b
            ON a.table_name collate database_default
    = b.table_name collate database_default
    GROUP BY   a.table_name, a.row_count, a.data_size
    ORDER BY   CAST(REPLACE(a.data_size, 'KB', '') AS integer) DESC
DROP TABLE #temp

 

 

 

Comments here




Ads