Skip to main content

Notifications

Announcements

No record found.

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

  • Vilmos Kintera Profile Picture
    46,149 on at
    RE: Why display method is not returning Image ?

    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?

  • Sohaib Cheema Profile Picture
    46,614 User Group Leader on at
    RE: Why display method is not returning Image ?

    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.

  • Majid Hafeez Profile Picture
    40 on at
    RE: Why display method is not returning Image ?

    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

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: Why display method is not returning Image ?

    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
    RE: Why display method is not returning Image ?

    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. 

  • Martin Dráb Profile Picture
    233,553 Most Valuable Professional on at
    RE: Why display method is not returning Image ?

    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.

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: Why display method is not returning Image ?

    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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans