Forum Discussion

Tengmin123's avatar
Tengmin123
Frequent Visitor
5 years ago
Solved

cannot display image in paginated report.

I want to display an image in paginated report. the data source is a shared data source in power BI report server, which is a cassandra database. the image is saved as text in cassandra which was transfered from sql database as varbinary(max).  I cannot change its format in query. I want to ask how to show the picture in paginated report. for now I use the expression: CByte(Fields!FULL_GRAPHIC.Value). But it display a red X when i run the report. anyone knows can help to solve this problem. Thank you.

v-easonf-msft 

  • Hi, Tengmin123 

     

    Now you say that the data type is blob, obviously, this data type doesn't support transform to pictures. Can you change the format to text in Casssandra?

    If it doesn't work, then it is a software adaptation problem. We can't solve it. We can only think of some workarounds, just import them directly as I said. Or you can use sql server.

    Or you can connect the data in powerbi, and then you can change the format to text. After publishing to the service, you can connect to the dataset in report builder, and then it can be displayed normally.

    Reference:Author and Share Power BI Reports on Real-Time Cassandra Data (cdata.com)

    I tried my best to help you, hope you can understand what I mean.

     

    Best Regards

    Janey Guo

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

7 Replies

  • v-janeyg-msft's avatar
    v-janeyg-msft
    Icon for Community Support rankCommunity Support

    Hi, Tengmin123 

     

    Can you download the images, and then add it directly by adding image? It may be the most convenient way.

     

    If it doesn’t solve your problem, please feel free to ask me.

     

    Best Regards

    Janey Guo

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Tengmin123's avatar
      Tengmin123
      Frequent Visitor

      This solution not work for me, cuz the picture is selected by parameter. For now, I already transform the pic data in cassandra databse to 'blob' but still cannot display. do you have any idea to solve this?

      • v-janeyg-msft's avatar
        v-janeyg-msft
        Icon for Community Support rankCommunity Support

        Hi, Tengmin123 

         

        I tried my best to reproduce your scene and found it can be displayed. I create it in SQL and connect it ,then choose add image and make the setting, like this:

        sql:

        report builder:

        Reference:How to upload multiple images to SQL Server (sqlshack.com)

         

        Best Regards

        Janey Guo

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • AbhiSSRS's avatar
    AbhiSSRS
    Icon for Solution Sage rankSolution Sage

    Please try using Base64 conversion! you may do it in a calculated field in your dataset. Click "Add" and add a new calaculated field in your dataset to try this.

     

     

     

    =System.Convert.FromBase64String(Fields!ImageFieldName.Value)