web
You’re offline. This is a read only version of the page.
close
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

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
    237,972 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,438 User Group Leader 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans