Display Image of Items from CompanyImage Table into Crystal Reports

This question is answered

Hi Guys,

I have an assignment to make a price list of items in Crystal Reports. Been looking up for answers from google but could find the right ones.

Any idea how to display image that stored in CompanyImage Table (ref to InventTable) in Crystal Reports? All fields are shown, only image is remaining. For your information, i'm using CR 11.

Thank you.

Verified Answer
  • Hi

    In my past i had created a .NET DLL called by AX.

    So, on a class i was reading the AX tables data and for each records i called a .net DLL where i serialized the data. Finally call the Crystal report.

    I think you can use the same method.

    Alternatively, you can read also this post blogs.msdn.com/.../working-with-images-blobs-between-ax-and-external-applications.aspx

    Could be another idea.

    Regards

    Thanks & Regards

    Denis Macchinetti

    Senior Technical Architect

  • HI

    I think that you should convert the base64 string to byte array and then move to Crystal Report.

    You can arrange the convertion from SQL side or with a Crystal report function.

    Honestly, I never tried it before.

    However, I'll try on my local and I will let you know

    Regards

    Thanks & Regards

    Denis Macchinetti

    Senior Technical Architect

All Replies
  • Hi

    Here community.dynamics.com/.../244414.aspx you can find many tips.

    Regards

    Thanks & Regards

    Denis Macchinetti

    Senior Technical Architect

  • Hi

    I've seen that page and the code didn't work. I am designing my report in Crystal Reports 11 and accessing InventTable + CompanyImage to display the content. All fields are displayed but only image didn't show.

    Googled and still didn't get the answer.

    But thanks for the link. :)

  • Hi

    In my past i had created a .NET DLL called by AX.

    So, on a class i was reading the AX tables data and for each records i called a .net DLL where i serialized the data. Finally call the Crystal report.

    I think you can use the same method.

    Alternatively, you can read also this post blogs.msdn.com/.../working-with-images-blobs-between-ax-and-external-applications.aspx

    Could be another idea.

    Regards

    Thanks & Regards

    Denis Macchinetti

    Senior Technical Architect

  • Hi Denis,

    That's a bit confusing.

    But if you still can bear with me. I have done this:

    I end up converting the image to base64String (successfully) but next problem occurs. How to use this encoded base64 string that needs to be converted into image in Crystal Reports?

    I know how to convert base64 string to image in VB Net but i don't know how to display it in Crystal Report.

    Help please?

  • HI

    I think that you should convert the base64 string to byte array and then move to Crystal Report.

    You can arrange the convertion from SQL side or with a Crystal report function.

    Honestly, I never tried it before.

    However, I'll try on my local and I will let you know

    Regards

    Thanks & Regards

    Denis Macchinetti

    Senior Technical Architect

  • Problem solved. Thanks Denis.

  • Hi

    Great Yoki.

    Please, remember to set the answer as verified.

    Thanks much

    Have a nice day.

    Thanks & Regards

    Denis Macchinetti

    Senior Technical Architect