Author Topic: Show an image as derived from a database (url shortcut)  (Read 15283 times)

Offline sr345

  • Associate
  • **
  • Join Date: Apr 2021
  • Posts: 3
  • Forum Citizenship: +0/-0
Re: Show an image as derived from a database (url shortcut)
« Reply #15 on: 20 May 2021 02:44:51 pm »
Hi Everyone,

Sorry for dragging an old thread back to life. Below is a URL I'm placing into a Query Calculation. When I add it to a list, I just get the URL. Under is an example of the completed URL that shows an image of a barcode. Any insight on how I can insert the barcode into my report instead of the URL? Not sure what I'm missing.

Query Calculation:
Code: [Select]
'https://www.bcgen.com/demo/linear-dbgs.aspx?D=' + [Resource ID] + '&S=1'*If I enter it without the single quotes it errors out.

Example:
https://www.bcgen.com/demo/linear-dbgs.aspx?D=P00020&S=1

Online MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 11,377
  • Forum Citizenship: +665/-10
  • Cognos Software Muppet
Re: Show an image as derived from a database (url shortcut)
« Reply #16 on: 21 May 2021 07:31:21 am »
Hi Everyone,

Sorry for dragging an old thread back to life. Below is a URL I'm placing into a Query Calculation. When I add it to a list, I just get the URL. Under is an example of the completed URL that shows an image of a barcode. Any insight on how I can insert the barcode into my report instead of the URL? Not sure what I'm missing.

Query Calculation:
Code: [Select]
'https://www.bcgen.com/demo/linear-dbgs.aspx?D=' + [Resource ID] + '&S=1'*If I enter it without the single quotes it errors out.

Example:
https://www.bcgen.com/demo/linear-dbgs.aspx?D=P00020&S=1

Hi,

First, make sure you have your query calculation defined in your list query with an expression as you posted above:
Code: [Select]
'https://www.bcgen.com/demo/linear-dbgs.aspx?D=' + [Resource ID] + '&S=1'
If you want a clickable URL for this in your report, the trick is to find the Hyperlink object in the toolbox and drag this into your list as the list column. From the Properties pane, you can then use the query calculation as the URL source and also as the text source if you wish.

If you want to display the image directly in the list column in your report, find an Image object in the toolbox and drag this into your list as a list column. In the properties pane, find the URL Source section and set the Source Type property to Data Item Value, and then set the Data Item Value property to be your query calculation.

Cheers!

MF.
Meep!

Offline sr345

  • Associate
  • **
  • Join Date: Apr 2021
  • Posts: 3
  • Forum Citizenship: +0/-0
Re: Show an image as derived from a database (url shortcut)
« Reply #17 on: 21 May 2021 10:14:17 am »
Hi,

First, make sure you have your query calculation defined in your list query with an expression as you posted above:
Code: [Select]
'https://www.bcgen.com/demo/linear-dbgs.aspx?D=' + [Resource ID] + '&S=1'
If you want a clickable URL for this in your report, the trick is to find the Hyperlink object in the toolbox and drag this into your list as the list column. From the Properties pane, you can then use the query calculation as the URL source and also as the text source if you wish.

If you want to display the image directly in the list column in your report, find an Image object in the toolbox and drag this into your list as a list column. In the properties pane, find the URL Source section and set the Source Type property to Data Item Value, and then set the Data Item Value property to be your query calculation.

Cheers!

MF.

Thank you for responding! This solution worked perfectly to display the image.