Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Field with Data Type "File" in SSRS Report

Posted on by 282

Hi everyone,

I am building an SSRS report in Dynamics 365 customer engagement.

In the DataSet of this report i am calling a fetchxml query and my report is displayed correctly.

Now i am trying to introduce in my query a field present in the entity with data type : File. It seems that the query is not accepted.

pastedimage1599238880131v1.png

The idea is to make the signature of the SSRS report configurable. I used a field with data type file.

Any suggestion?

  • Suggested answer
    saad nadir Profile Picture
    saad nadir 282 on at
    RE: Field with Data Type "File" in SSRS Report

    i try to avoid having any dataset calling Odata since the report is escalated from DEV>SIT>UAT>Prod.

    I am trying to include only fetchxml datasets.

    The workaround i found is to introduce a second field multiple line text with the maximum length authorized :1,048,576 called pfx_filebase64.

    With a plugin whenever the field pfx_file is upated i am encoding the file in base 64 string and storing it in the new field of the same entity.

    this multipe text line field can be called with fetchxml, and be part of the dataset in the report.

    And in the SSRS report i am converting it like this :

    entityimage_2D00_crm_2D00_online_2D00_report_2D00_2.png

  • Pankaj Gogoi Profile Picture
    Pankaj Gogoi 3,177 on at
    RE: Field with Data Type "File" in SSRS Report

    Hello Saad,

    Were you able to resolve the issue? Please mark the question as closed if it is resolved.

    Best Regards

    PG

  • Verified answer
    Pankaj Gogoi Profile Picture
    Pankaj Gogoi 3,177 on at
    RE: Field with Data Type "File" in SSRS Report

    I would suggest, have another dataset and get the value using the URL

    ../api/data/v9.0/pfx_settings(69ECB615-5BEE-EA11-A815-000D3AF42C56)/pfx_file

    Once you get the value then use an Image Control to your report. Refer the second link that I shared. It talks about displaying image from notes attachment.

    =Lookup("Image_UserSIgnature",Fields!l_po_label.Value,Fields!pfx_file.Value, "LocalizationImages")

    Hope this helps

    Best Regards

    PG

  • saad nadir Profile Picture
    saad nadir 282 on at
    RE: Field with Data Type "File" in SSRS Report

    I am completely lost. i am working with online version of Dynamics.

    The schema name of my field is : pfx_file.

    i am able to download the file with the URL from the entity pfx_setting : 

    ../api/data/v9.0/pfx_settings(69ECB615-5BEE-EA11-A815-000D3AF42C56)/pfx_file/$value

    But the thing is that i need to retreive this file as a image in SSRS Report. the only way i know to retreive data from Dynamics online is FetchXML.

    So i need to include the file in my fetchxml query that i am calling in my SSRS Report.

    i tried the following query :

      
       
        
        
          
        
      
    

    I noticed that pfx_file and pfx_file_name are just retreiving the name of the file : signature.png.

    How can i retreive the image from the file field in the SSRS report and use it as an image ?

     

  • Pankaj Gogoi Profile Picture
    Pankaj Gogoi 3,177 on at
    RE: Field with Data Type "File" in SSRS Report

    Hi Saad,

    What error or execption you are getting. Are you able to execute the FetchXM in FetXMLBuilder?

    I think the actual files in the file data type are stored in File Storage and not in CDS. What I suggest is that you download the file using using Web API and store it in your database and use an external link. Below I am getting the value from contact entity.

    ../api/data/v9.0/contacts(19a2e5b9-88df-e311-b8e5-6c3be5a8b200)/new_filefield/$value

    You can also store the Signature in note entity. Here is link for your reference.

    https://powerobjects.com/2018/02/06/quotes-how-to-display-an-image-stored-in-dynamics-365-on-an-ssrs-report/

    File Type

    Hope this helps

    Best Regards

    PG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans