B4J Question [Solved] Next Reports - jNxtReportsB4j library

atiaust

Active Member
Licensed User
Longtime User
Hi All,

I am trying to get Next Reports working using the jNxtReportsB4j library.

My issue is (as far as I can work out) that the current Next Reports Designer V9.1 formats reports to be used with the Next Reports 9.1 engine and the generated reports are not backward compatible with the older 8.1 engine as used with the jNxtReportsB4j library.

Waiting for debugger to connect...
Program started.
DBConnect :: Start = 192.168.20.128, ccshuttles, xxxx, xxxx
DBConnect :: End = true
Oct 21, 2016 9:09:09 AM ro.nextreports.engine.util.ReportUtil loadReport
SEVERE: percentLineSpacing : percentLineSpacing : percentLineSpacing : percentLineSpacing
---- Debugging information ----
message : percentLineSpacing : percentLineSpacing
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : percentLineSpacing : percentLineSpacing
class : ro.nextreports.engine.Report
required-type : ro.nextreports.engine.band.BandElement
-------------------------------
com.thoughtworks.xstream.converters.ConversionException: percentLineSpacing : percentLineSpacing : percentLineSpacing : percentLineSpacing
---- Debugging information ----
message : percentLineSpacing : percentLineSpacing
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : percentLineSpacing : percentLineSpacing
class : ro.nextreports.engine.Report
required-type : ro.nextreports.engine.band.BandElement
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)

B4X:
#Region  Project Attributes
    #MainFormWidth: 600
    #MainFormHeight: 400
   
    'This jar file must be present in the B4J Additional Libraries folder
    #AdditionalJar:nextreports-engine-8.1
    '#AdditionalJar:nextreports-engine-9.1
   
    'Don't forget to add jNxtReportsB4J in the B4J IDE Libraries tab
   
    'Download these jar files to the B4J Libraries folder
    #AdditionalJar:commons-jexl-2.1.1
    #AdditionalJar:commons-logging-1.1.1
    #AdditionalJar:itext-2.1.7
    #AdditionalJar:itext-rtf-2.1.7
    #AdditionalJar:itextpdf-5.0.6
    #AdditionalJar:xstream-1.3.1
    #AdditionalJar:xstream-1.4.7
    #AdditionalJar:poi-3.7
'   
    'replace this by your applicable database jar file
    '#AdditionalJar:jtds-1.3.1  
    #AdditionalJar:mysql-connector-java-5.1.39.jar
    '#AdditionalJar:mysql-connector-java-5.1.27.jar
'   
#End Region

When I use the above configuration I get the error generated in the spoiler above.
If I change the engine to 9.1, I get an error
"java.sql.SQLException: No suitable driver found for
at java.sql.DriverManager.getConnection(DriverManager.java:689)
etc....

Can the library be changed to use the newer Next Reports 9.1 engine? or is there another way around this.

Thanks
 

atiaust

Active Member
Licensed User
Longtime User
Hi All,

The error I was experiencing was to do with the jdbc:mysql url incorrect format.

The url should be:
url="jdbc:mysql://localhost:port/DBname?user=user_name&password=pw"

in my case : url="jdbc:mysql://192.168.20.128:3306/testDB?user=user1&password=pass"

The jNxtReportsB4j library is working with Next Reports Designer 9.1 and Reports Engine 9.1 reading from a Mysql DB running on Raspberry Pi.

Thanks
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Hi All,

The error I was experiencing was to do with the jdbc:mysql url incorrect format.

The url should be:
url="jdbc:mysql://localhost:port/DBname?user=user_name&password=pw"

in my case : url="jdbc:mysql://192.168.20.128:3306/testDB?user=user1&password=pass"

The jNxtReportsB4j library is working with Next Reports Designer 9.1 and Reports Engine 9.1 reading from a Mysql DB running on Raspberry Pi.

Thanks
Are you using Community or Open Source of Next?
The last time I conversed with them, for my project, it was a ridiculous sum to host on a server.
Just wondering, since the product was (somewhat) usable and easy to code.

Thanks
 
Upvote 0

atiaust

Active Member
Licensed User
Longtime User
I am using the 'Free' versions from their web. Designer 9.1 and Engine 9.1.

Haven't tried setting up the server yet. May get to it later.

The designer seems OK. The few reports I have created so far work. Still playing with the designer.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Thanks, pls keep us date with your success. As a JasperSoft user, and investigated the NextReports system (extensively), I wonder how these compare - price, implementation, and performance wise.

Reports (dashboards) are a big part of any real world project. Which one to (affordably) pick?

Thanks
 
Upvote 0

atiaust

Active Member
Licensed User
Longtime User
It seems to be working well although I can't figure out how to pass a date value as a parameter for the report.

I can get reports without selection criteria to work from B4j but not reports where I need the report within a date range.

Will keep working on it.

Building reports and queries in the report writer is quite good.
 
Upvote 0

BigBoss123

Member
Licensed User
Longtime User
Looking at the 'NextReportServer' web site is appears the server is now Open Source.
Other Items such as Analysis Module costs some $25.00.

Looks very interesting at this price.
 
Upvote 0
Top