How to create user editable Text Object in Jasperreport?

0

Hello,

 I have created a Jasperreport. It is connected with the database . Now I want one extra column, which can have value on per row basis. Other columns will display the values from the database, but this column will not contain any values after it is being displayed to user. For any perticular row, If user want that this column should have value, user can type the value. So how can I add such field/column in JasperReport, so that user can change it's value at any time. In short I want such Text Box which can be edit by user.

Please, help if anybody already worked on it?

 -Thanks in advance.

tahsin.tisha's picture
Joined: Apr 18 2018 - 2:15am
Last seen: 1 year 11 months ago

joseng62 thanks for the answer.Do you solve this kind of problem or implemented it?If you then please told me how can I implemented it to iReport Designer.

tahsin.tisha - 2 years 12 months ago

4 Answers:

0

I think that cannot be done.

Mariano

mlopez_1's picture
975
Joined: Oct 21 2013 - 8:08am
Last seen: 1 month 1 week ago
0

This is quite interestng. 
Will be great to se eif someone has implemeted this already and how ? 

From java point of view the report object has been created and the object is displayed as is, so not interaction from user will be possible, beside predefined elements like hyperlink, bookmarks, anchors and html charts. 

Also ones approach would be different if working with community or pro edition. The pro edition has it own libarary to interact with report called visualise.js. There might be a way to achieve what you looking for through clever structuring of your design and making use of given elements.

In comuunity edition you would need to dig a bit deep and experiment with trail and error. What I can tel lyou is that you can set jasperstudio to compile the report in javascipt.
This might be your best way forward. One can also intoduce a custom html element. One can also add 3 party js libraries. If you can improve your understanding in these areas, you would be in a better position to come to a suitable conclusion for a solution. 

Also you could just generate report in a container and just add you own container next to report container that have the columns rows with html text boxes. The figure away to map the jasper report rows with the html text box rows, then when user select maybe a update button, you could take all these values and pass them as a parameter array via jasper rest api and regenerate the report with given values. The user can double check if correct, before saving or exporting the report.  
​​​​​​
 

joseng62's picture
776
Joined: Dec 5 2014 - 2:43am
Last seen: 3 months 4 weeks ago
0

Hi Tisha,

This won't be possible while just staying within jasper since reports do not allow dynamic input except for parameters but even the input parameter would show up as a prompt and once per report and  not per row. What you need is possible but needs a lot of  tweaking and adjustment. Perhaps the most likely approach (as suggested by joseng62) is to use visualize.js, pull in all report resources, controls and ouput and then attach a text-box to each row. 

And if you are working within a CMS to integrate Jasper reports, making use of iframe elements and adjusting the input component could be another way to go but again it wonn't be a quick job.

Thanks. 

m.kamran's picture
140
Joined: Nov 3 2017 - 3:11am
Last seen: 2 years 11 months ago
0

Hi Tisha,

Did you have any luck with implementation?

hgothankar's picture
Joined: May 30 2018 - 11:32am
Last seen: 1 month 1 day ago
Feedback
randomness