B4J Library jJasperReports Library

Xfood

Well-Known Member
Licensed User
yes, he shows them to me, but he doesn't let me download the files., I downloaded the single files by searching on google, do you have any sample reports to start with? I find this tool truly fantastic
 

Juan Marrero

Active Member
Licensed User
I'll be changing the links to dropbox or something. Apparently there is a download limit of shared files in google drive free. I'll let you know when I'm done.
 

Xfood

Well-Known Member
Licensed User
I could but they will be useless for you. The reports are linked to my databases so you won't be able to use them.
an example with a small sqlite db, and a report similar to that?
it would be very useful to learn how to manage reports better
Thanks so much

p.s. the add-on library links from the first post still don't work for me.
 

Juan Marrero

Active Member
Licensed User
an example with a small sqlite db, and a report similar to that?
it would be very useful to learn how to manage reports better
Thanks so much
I don't remember if in the sample code there was a sqlite database. Will check.

p.s. the add-on library links from the first post still don't work for me.
I wrote about changing links to dropbox. Download times have been exceeded.
 

Juan Marrero

Active Member
Licensed User
great, it works Thanks. it would be nice to have some examples in b4j, I find this tool really good and professional
Just need to create a sqlite database with a single table with 2 or 3 columns. In JasperSoft you need to create a Data Adapter pointing to that sqlite database and then you will be able to add fields to the report and do a preview. Couldn't find the reports.
 

focus330

Member
Licensed User
Hello!

Very good work. I'm appreciating. But I have a problem: I have a report with an image. It may contain an image if a boolean field is true and another if false, This is the code in Jasper report
B4X:
$F{level}.toString().equals("true") ? $P{checkboxOK} : $P{checkboxNOK}
It works fine with Preview but when I call from B4j I have this error:

B4X:
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
value = ((java.lang.Object)field_level.getValue()).toString().equals("true") ? ((java.lang.String)parameter_checkboxOK.getValue()) : ((java.lang.String)parameter_checkboxNOK.getValue()); //$JR_EXPR_ID=16$
what can I do? It seems a class is necessary.

Thanks
 

Juan Marrero

Active Member
Licensed User
Hello!

Very good work. I'm appreciating. But I have a problem: I have a report with an image. It may contain an image if a boolean field is true and another if false, This is the code in Jasper report
B4X:
$F{level}.toString().equals("true") ? $P{checkboxOK} : $P{checkboxNOK}
It works fine with Preview but when I call from B4j I have this error:

B4X:
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
value = ((java.lang.Object)field_level.getValue()).toString().equals("true") ? ((java.lang.String)parameter_checkboxOK.getValue()) : ((java.lang.String)parameter_checkboxNOK.getValue()); //$JR_EXPR_ID=16$
what can I do? It seems a class is necessary.

Thanks
What are checkboxOK and checkboxNOK? Are those parameters for what? For images to appear in report, you need to specify the full path of the image. I'm going to need more info on this. Java version, JasperSoft version (if using iReport can't help you there), the report itself, etc..
 
Last edited:

Juan Marrero

Active Member
Licensed User
Hello!

Very good work. I'm appreciating. But I have a problem: I have a report with an image. It may contain an image if a boolean field is true and another if false, This is the code in Jasper report
B4X:
$F{level}.toString().equals("true") ? $P{checkboxOK} : $P{checkboxNOK}
It works fine with Preview but when I call from B4j I have this error:

B4X:
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
value = ((java.lang.Object)field_level.getValue()).toString().equals("true") ? ((java.lang.String)parameter_checkboxOK.getValue()) : ((java.lang.String)parameter_checkboxNOK.getValue()); //$JR_EXPR_ID=16$
what can I do? It seems a class is necessary.

Thanks
Or maybe try this:
B4X:
($F{level}.equals(Boolean.TRUE.toString())) ? $P{checkboxOK} : $P{checkboxNOK}
But remember to create a parameter for the path of the image and use the function in JasperReports Library to assign the image's path to that parameter.
 

focus330

Member
Licensed User
1 Yes: CheckboxOK and CheckboxNOK are parameters for images.
2 TIBCO Jaspersoft® Studio 6.16.0
3 Using the grammar you suggested ...
B4X:
($F{level}.equals(Boolean.TRUE.toString())) ? $P{checkboxOK} : $P{checkboxNOK}
it runs fine. Thanks very much
SOLVED
 

Juan Marrero

Active Member
Licensed User
1 Yes: CheckboxOK and CheckboxNOK are parameters for images.
2 TIBCO Jaspersoft® Studio 6.16.0
3 Using the grammar you suggested ...
B4X:
($F{level}.equals(Boolean.TRUE.toString())) ? $P{checkboxOK} : $P{checkboxNOK}
it runs fine. Thanks very much
SOLVED
Perfect. I spent some time looking in forums about your error and found that suggestion. Glad it worked.
 

Num3

Member
Licensed User
Any chance this library can be updated to use the latest jasperreports_6.17.0.final.jar build?
It is already 10 revisions behind :\

And the:
B4X:
<textField textAdjust="StretchHeight">
Is not supported in this old version

I tried the renaming trick, but there are conflicts...
 
Last edited:

Juan Marrero

Active Member
Licensed User
Any chance this library can be updated to use the latest jasperreports_6.17.0.final.jar build?
It is already 10 revisions behind :\

And the:
B4X:
<textField textAdjust="StretchHeight">
Is not supported in this old version

I tried the renaming trick, but there are conflicts...
Will put it on schedule. Don't have an estimate date. My 3yr old consumes most of my free time.
 
Top