web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Why display method is not returning Image ?

(1) ShareShare
ReportReport
Posted on by 40

I have developed a Query based report. I want to display Images for relevant Item. Hierarchy of query is SalesTable and SalesLine Table and I have written Display method on SalesLine Table.

22600.Capture.JPG  

On SSRS report, I have mapped a source type is Database and Image type is jpeg.

CaptureReport.JPG

If some have solution please provide.

Thanks,

Majid Hafeez

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Display methods are not going to work.

    Here is the documentation on providing images for SSRS reports in AX 2012:

    technet.microsoft.com/.../cc622140.aspx

    Here is a practical example on how to use images for a Query based report. They also mention how would it look like if you would use a Data Provider class such as SalesInvoiceDP.insertIntoSalesInvoiceTmp.

    blogs.msdn.microsoft.com/.../dynamics-ax-2012-reporting-how-to-add-company-logo-into-query-based-report

  • Martin Dráb Profile Picture
    239,364 Most Valuable Professional on at

    First of all, you code doesn't do what you want. As I understand, you want an image related to the item on the sales line, but your code never look at the line; it selects *some* record from ProductBranchImage table (if I ignore the missing semicolon, which makes the code even incompilable).

    By the way, using a join would be more efficient than executing a separate query to database for every line.

  • Majid Hafeez Profile Picture
    40 on at

    Martin, I have provided just sample code to view an image for Item. I can move to my actual code once it get fixed . I just need a solution against my issue.  If you have idea, how to add image to report using display method, please share it.

    Thanks. 

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Try the way in the already linked solution. You will not be able to do it via display methods.

  • Majid Hafeez Profile Picture
    40 on at

    Vilmos thanks for comments. But I need some solution or work around, I don't want to convert the query datasource to RDP because I have to change whole structure for the report. If you some work around please share it.

    Thanks

  • Sohaib Cheema Profile Picture
    49,679 Super User 2026 Season 1 on at

    I cannot see anything wrong with your approach(on ssrs only)

    so I would verdict martin comments, here. I am very suspicious and wondering if your method is returning something. as I said, nothing seems wrong with adopted approach otherwise.

  • Vilmos Kintera Profile Picture
    46,149 on at

    The second link does exactly what you would like to do without data providers, I even made it bold that it is for Query based report, what you have. Did you read it?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans