Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Checkbox displaying value from SQL?
WorkerDerrick
<p>Hello I am new in using BIRT.</p>
<p> </p>
<p>Not sure is this possible. As I am working on an application which generate report showing the data from the SQL database.</p>
<p> </p>
<p>I got a problem is that the report need to show the SQL data value by checkbox which the data is string "T"</p>
<p> </p>
<p>I know that checkboxes can be make by using HTML code, but I have no idea how to code the checkboxes to show the value from SQL database.</p>
<p> </p>
<p>Also is it possible to use if statement to control the checkbox? like this (I am using c# trying to show what I want to code as I don't know how to code correctly on BIRT)</p>
<p> </p>
<p>if (sqldatavalue == T){</p>
<p> checkbox.checked = true;</p>
<p>}</p>
<p>else{</p>
<p>checkbox.checked = false;</p>
<p>}</p>
<p> </p>
<p>many thanks,</p>
Find more posts tagged with
Comments
JFreeman
<p>What version of BIRT are you using?</p>
<p> </p>
<p>It should be possible to achieve but I am not clear on exactly what you are needing.</p>
<p>Can you provide additional details?</p>
<p>Can you provide a sample screenshot of what you trying to accomplish?</p>
WorkerDerrick
<p>Hello Freeman</p>
<p> </p>
<p>I think I had solved the problem by myself, thanks.</p>
<p> </p>
<p>First In SQL I had use the case statement to turn the string letter "T" to "checked", then I use <value-of> to apply the dataset row to the text item using HTML.</p>
<p> </p>
<p>like this:</p>
<p> </p>
<p><input type="checkbox" <value-of>datasetrow.somekindofSQLdata</value-of></input></p>
<p>(may not correct as I don't have the original code in my current PC)</p>
<p> </p>
<p>The checkbox will change to "checked" when the SQL database has a "T" value</p>
JFreeman
<p>Thanks for the update.</p>
<p>I'm glad to hear you got it figured out.</p>
<p> </p>
<p>Let us know if you have additional questions.</p>