B4J Library jJasperReports Library

amorosik

Expert
Licensed User
Using the jJasperReport 2.00 library I can't find a function to indicate as Firebird database
Using JasperSoft Studio 6.20.5 I can create the report and connect it correctly to the data, but then from B4J code I can't indicate the correct connection
Is there any other way to specifically point to Firebird or any odbc/jdbc data source?
 

Juan Marrero

Active Member
Licensed User
Longtime User
For that I havento make changes to the library and possibly use the latest version of Jasper Jar file which will take some time and honestly I don't have that time for now.
 
Hi Juan,
sorry for the delay in my reply.

I've tried moving the project folder to a shorter path (e.g. "C:\temp").
I've tried to log "File.DirApp" and it looks the same from both release mode and .jar, and i also tried moving the jrxml to an absolute path.
Nothing changes.
Report has no subreports or images.

I don't understand where the design XML file is compiled, is there any way to figure out where it is?

To work around this problem I tried to use this command:

B4X:
report=jasper.CompileXMLToFile2(design,File.DirApp & "/out")

but it doesn't work because it gives me this error: "cannot assign an empty value".

Do you have any idea about it?


Thanks a lot for your help,
Christian
 

amorosik

Expert
Licensed User
I have a report where, in the detail section
One db field is 'flag_congelato' a boolean db type
I would like an X to appear in the repot if the flag_congelato value is true (-1), or a null string if the flag_congelato value is false (0)
I used the formula
$F{flag_congelato}.equals(true) ? "X" : " "
inside a textbox on the report, but it doesn't work as expected in the sense that I don't see the X appear on any row, even if the flag_congelato value is true (-1)
What is the correct way to get the string 'X' if the value of the flag_congelato field is true?

(B4j 9.80, jdk 14.0.1, Jaspersoft Studio 6.20.5, jJasperReport 2.00)
 
Last edited:
Hi Juan,
i tried different ways to compile the .jrxml but always with the same result.
If I load a .jasper file it returns no errors, but any other variant doesn't work.
Do "compileXML" commands create a temporary file? And if so, where?
Is it possible there are missing libraries? Or other types of dependencies?
The alternative would be to modify from external the query in the .jrxml file, compile the .jasper file again from external and finally print the report from b4j.
Even though it's harder this way, by now I would like to understand what is not working now just out of curiosity. ?

Sorry to bother you again.

Thanks,
Christian
 

Juan Marrero

Active Member
Licensed User
Longtime User
I'm on vacation like 5000 miles from home. I return home on July. Then I can check the error.
 

Juan Marrero

Active Member
Licensed User
Longtime User
That is a jasper reports issue, not an issue with my library. And I know hoy to do this in Crystal Reports. Never donde this in Jasper Reports. Gonna have to wait till July when I get home to check it.
 
I'm on vacation like 5000 miles from home. I return home on July. Then I can check the error.
Hi Juan, no problem.

I probably found the error: if the .jar is run from a pc with only the jdk package installed and not the jre, the application works correctly.
If the jre package is also installed, however, it stops working.

I don't know if this will help you, at the moment I fixed it by uninstalling the jre package.

Anyway, have a good holiday!

Christian
 

Juan Marrero

Active Member
Licensed User
Longtime User
That piece of information is very useful.
 

syerif

Active Member
Licensed User
Longtime User
Hi,

Thank you for great library, but i get problem while make exe project with packager, any suggestion step to do it

best regrads
 

amorosik

Expert
Licensed User
Hi Juan, i saw that version 7 of Jasper Report Library and Jasper Report Studio was recently released
Is your library usable with reports generated using this version?
 

Juan Marrero

Active Member
Licensed User
Longtime User
Hi Juan, i saw that version 7 of Jasper Report Library and Jasper Report Studio was recently released
Is your library usable with reports generated using this version?
Honestly I don't know. You can try and see if it works. This project is practically abandoned by me. Anyone is welcome to take over.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…