Showing posts with label SSRS Reports. Show all posts
Showing posts with label SSRS Reports. Show all posts

Sunday, 30 August 2020

#Error on Preview - SSRS Report new field

Hi Everyone,

Today I was working on the report and the requirement was to add one more field in the existing table and show it. I have modified the data source accordingly and mapped the field in the table of SSRS report. When I tried to preview the same, it was showing the value as #Error.

I was little surprised and checked the mapping and data source. Everything seems to be correct and somehow the report is not showing the fields value in preview mode. 

After some search came to know that it seems to a bug/by design in SSRS. For every report, you will see a .data file in your report project and it is basically caching the data. Just deleting that file and running the report again fixed the issue.

You can also just do refresh in the preview by the clicking on the button highlighted below.

Hope this helps.

--
Happy Reporting
Gopinath

Thursday, 19 March 2015

Show logged in or current Username in Report CRM 2011, 2013 and 2015

It is always good to show to user name who is running the report on it.

We can achieve it by creating one more dataset exclusively for getting username from CRM. You use this dataset to display fullname in the report.

SQL Report

select fullname
from FilteredSystemUser
where systemuserid = dbo.fn_FindUserGuid()
 

Fetch XML Report


<fetch version="1.0" output-format="xml-platform"

       mapping="logical" distinct="false">

   <entity name="systemuser">

      <attribute name="fullname" />
      <attribute name="systemuserid" />
      <order attribute="fullname" descending="false" />
      <filter type="and">
         <condition attribute="systemuserid"
                    operator="eq-userid" />
      </filter>
   </entity>
</fetch>
 
 
--

Happy CRM'img
Gopinath