I have a custom CRM 4.0 report that has been modified in VS 2005. When I run it directly in VS 2005 it gives the correct result. However when I then deploy the rdl file to CRM and run it the results are still as they were for the previous report.
Has any one experienced this?
Could you try:
1. Delete the existing report in MSCRM (ensure it does not exists)
2. Create a new report and browse to the newly created report > upload
If that fails, can you tell me how you know the old report is being viewed? Is it the same data or are there cosmetic differences between the reports?
Sure although deleting the report within the CRM gui only seems to set the deletionstatecode = 2 and does not appear to physically delete the record. Do you know how I can delete the record without having to resort to a delete sql statement? I was expecting the asynchronous service to take care of this but it doesn't appear to...
Are you talking about deleting the report or record? If the MSCRM Async Service has been started, it will eventually delete the record. Personally I didn't even know a report had to be deleted through the Async Service.
Alternately create a new report with a different name from the previous report. Now you should have two different reports. Can you see a difference?
Thanks although I have tried this. Just to be clear when I delete the report using the GUI a matching record can still be seen in the reportbase SQL table with deletionstatecode = 2. However this record never seems to get physically deleted.
When, on the other hand, I've tried creating a brand new report with an entirely different name but using the new (correct) rdl file, the filter from the previous report still gets applied and if I examine the data record, specifically the BodyText field, I see that once again the old filter is present within the ReportParameter node. Weird! I'm guessing that because the rdataSourceId matches a previous report, albeit a 'deleted' one, then that filter gets reapplied regardless.
I'm left wondering if I'm going to have to do a manual SQL Update to correct the filter....
The Microsoft CRM Asynchronous Processing Service runs once a day. You cannot manually run any deletion service like MS CRM 3.0, instead, you can modify the setting in the MSCRM_Config table:Code SnippetUSE MSCRM_CONFIG
UPDATE dbo.ScaleGroupOrganizationMaintenanceJobs SET
NextRunTime = getdate() -- Now
WHERE OperationType = 14 -- Operation Type 14 is the Deletion Service
Regarding the report, did you deploy from VS 2005 directly or through CRM UI? It will fail if you deploy directly from VS 2005. you have to go through the CRM UI for to deploy reports.
Thanks. I've checked the ScaleGroupOrganizationMaintenanceJobs table and I see that its set to run this afternoon at 15:35 - I'll wait until then to see if it will actually delete the relevant records. If not then I'll try what you suggest.
As for deployment I use the CRM UI to deploy - the load from existing file option I believe. Of course any modifications to the report are done through VS 2005.
I'll let this post know what happens after (and if) the old reports are deleted.