COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: aolmo on 27 Jul 2015 04:20:17 AM

Title: Html button creation from sql result (2 rows)
Post by: aolmo on 27 Jul 2015 04:20:17 AM
Hi all,

I need to create 2 buttons, but this button have to be the current year and the last year.  I have a query in report studio that show result (now) 2015, 2014.  I need the html code to create button from this result.

Can anyone help me?

Thanks.
Title: Re: Html button creation from sql result (2 rows)
Post by: technomorph on 27 Jul 2015 11:28:59 AM
Assuming you're trying to populate the cells of a list, and if I've understood your question correctly, you can unlock the list, drop an html item into one of the columns, set the Source Type to Report Expression and use something like this:

'<button type="button">' + [Query1].[YEAR] + '</button>'