AndrewLe
6 years agoQrew Trainee
Displaying images on reports
Hello all,
I have a question regarding getting images to display on reports. I am currently trying to get images that are uploaded to quickbase to also display in reports as regular images. However, I am having difficulty getting the code to properly work.
-----
I've found that the code works if I code the field such that a specific image address is hard coded into the rich text field, I can get an image to display, but since it's hard coded to a specific image, all the rows display the single image that was hard coded.
What I really want is for the code in the "Photo" field to dynamically look at that record's "Photo File" address and display the image connected to that record's photo file.
This is the code that I currently have in the Formula - Rich Text code for the "Photo" field:
"<img src=https://xxxxxxxxx-####.quickbase.com/up/xxxxxxxxxx/g/rc/ej/va/"&Right([Photo File],"va/")
I did notice that the > symbol is missing, but the only place that quickbase will allow it is at the end of va/, which just cases it to behave like the example lines of code below. Additionally, when I try to put it on the end like in the second example line of code that I've shown below, quickbase returns a syntax error.
This is the code that works when I hard code a specific image:
"<img src=https://xxxxxxxxx-####.quickbase.com/up/xxxxxxxxxx/g/rc/ej/va/IMG_2294.jpg"&"height=100>"
Note: if I were to also hard code the following line of code, I can get the same behavior:
"<img src=https://xxxxxxxxx-####.quickbase.com/up/xxxxxxxxxx/g/rc/ej/va>"
Note: I've removed some private identifying information from the code.
What should I be doing to get the images to display properly? Thank for you help and suggestions.
------
I have also included a screenshot of the what I'm hoping to achieve from this report:
I have a question regarding getting images to display on reports. I am currently trying to get images that are uploaded to quickbase to also display in reports as regular images. However, I am having difficulty getting the code to properly work.
-----
I've found that the code works if I code the field such that a specific image address is hard coded into the rich text field, I can get an image to display, but since it's hard coded to a specific image, all the rows display the single image that was hard coded.
What I really want is for the code in the "Photo" field to dynamically look at that record's "Photo File" address and display the image connected to that record's photo file.
This is the code that I currently have in the Formula - Rich Text code for the "Photo" field:
"<img src=https://xxxxxxxxx-####.quickbase.com/up/xxxxxxxxxx/g/rc/ej/va/"&Right([Photo File],"va/")
I did notice that the > symbol is missing, but the only place that quickbase will allow it is at the end of va/, which just cases it to behave like the example lines of code below. Additionally, when I try to put it on the end like in the second example line of code that I've shown below, quickbase returns a syntax error.
This is the code that works when I hard code a specific image:
"<img src=https://xxxxxxxxx-####.quickbase.com/up/xxxxxxxxxx/g/rc/ej/va/IMG_2294.jpg"&"height=100>"
Note: if I were to also hard code the following line of code, I can get the same behavior:
"<img src=https://xxxxxxxxx-####.quickbase.com/up/xxxxxxxxxx/g/rc/ej/va>"
Note: I've removed some private identifying information from the code.
What should I be doing to get the images to display properly? Thank for you help and suggestions.
------
I have also included a screenshot of the what I'm hoping to achieve from this report:
------------------------------
Andrew Le
------------------------------