How to Add check box in Birt Report DEsigner
Answers
-
This displays a checkbox and if the parameter is = 1 the checkbox is checked
<form name="tasks"> <input type="checkbox" name="taskcheckbox" <VALUE-OF>if( params["checkit"].value==1){ "checked"; }else{ ""; }</VALUE-OF>>Task Complete</input> </form>
I re-purposed some code from Jason Weathersby
0 -
You beat me to the answer, wwilliams. I'll attach the example I created anyway and list the steps I followed:
:
1. Create a computed column in the data set to randomly generate Boolean values (just for testing).
2. Create a second computed column in the data set to generate the checkbox state.
3. Add a table to display the computed columns.
4. Replace the second Data element in the table with a Text element.
5. Change the Text element type to HTML and add HTML code to display a checkbox.
6. Insert the row value containing the checkbox state in the HTML using thetag. An HTML tag will be generated for each row of the table and the computed state for that row will be inserted into the tag to set the box's checked state to the Boolean value.
I don't think PDF's support functional checkboxes, and the emitter would need to support them as well, so this is just for web. Even for web, it isn't a functioning form. This is just a report.
Warning No formatter is installed for the format ipb0 -
Hi,
I have tried this solution but Checkbox is not working in PDF Export, Please find the attachment. Could you please help me to resolve this.Thanks,
Bose0 -
Hi Jeff,
I have modified the version to 4.8 in the xml but it is not working, I got error "org.eclipse.birt.report.exception.ViewerException: There is no report design object available." . After that I downloaded eclipse 4.8 version then try the same report (version="3.2.23") then there is no error but Checkbox is not displayed on exported PDF file. Please help me if it is working in latest version, then how can I modify the older .rptdesign file.
Please find the attachment.
0 -
Hi,
First, I recommend against modifying the XML for any reason.
Regarding the new report, it displays correctly as a PDF for me. Here is a screenshot that includes the font settings:
I would expect the fonts to be the same, but maybe something related to your environment is affecting them.
Warning No formatter is installed for the format ipb0 -
Hi,
Sorry, I am not getting your point. as per design font is Sans Serif. Where can I need to modify?
0 -
When I look at the same property on your report, I see "serif", not "sans serif". I tested both fonts as well as some others I selected at random. They all render the check boxes correctly in PDF for me.
What do you see for the fonts in your PDF viewer?
Warning No formatter is installed for the format ipb0 -
I have free Acrobat Reader DC, it can be view the PDF file only, not able to edit. there I can't see the font option which is mentioned earlier in the screen shot.
How do I resolve the issue?
0 -
My testing shows that the BIRT Designer is evaluating the characters in question correctly, I am testing with an out-of-the-box Designer. I did not need to change any configuration settings to render the characters in PDF. This points to an issue with your environment.
As a workaround, you could try a different code and see if displays correctly. For example,
Replace:
String.fromCharCode(10003);
With:
"\u2714"
Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 117 Developer Announcements
- 52 Articles
- 145 General Questions
- 133 Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 912 Cloud Fax and Notifications
- 81 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 167 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 4 XM Fax