I wrote an enhancement to my reporting using DynamicJasper. I built a limited java wrapper specific to my purposes and deployed it to B4J as a library using the B4J_LibraryCompiler.exe. I have done this before with Jasper Reports which has been successfully deployed to Windows, Mac, and Linux.
This new wrapper works well within the B4J development environment in both Debug and Release modes. However, when I deploy it as a B4J application run it in Windows - I have not tested other environments - I get the following error. Other than the first line below, which I included for context, this error is coming from the DynamicJasper jar that I wrapped for my library.
Here is a code snippet of how I am using it withing B4J:
{code}
Private Sub Button_Print_Page_Click
Try
Dim sqlConnectionString As String = File.Combine(File.DirData("nmcollector"),"nmcswDB.sqlite")
Dim printPageReportWrapper As PrintPageReportWrapper
'arg[0] = sqlConnectionString
'arg[1] = Collection ID
'arg[2] = Item ID
'arg[3] = Tab ID
'arg[4] = Report Title
printPageReportWrapper.openPrintPageReport(Array As String(sqlConnectionString, MainPage.selectedCollectionId, MainPage.selectedItemId, MainPage.selectedTab, MainPage.tabLabelsList.Get(MainPage.selectedTab) & ": " & B4XFloatTextFieldItemListValue.text))
Catch
Dim sf As Object = xui.Msgbox2Async(LastException, "Error", "OK", "", "", Null)
Wait For (sf) Msgbox_Result (Result As Int)
End Try
End Sub
{/code}
Here is a screen capture snippet of it's reverence as a B4J Library:
I am in the process of troubleshooting this myself but any ideas are welcome. Since it does not seem to be anything obvious I am going to look at the Dynamic Jasper source code for hints.
As a side note, I have a similar java wrapper for jasper reports (not Dynamic Jasper) that I was able to build and deploy successfully.
Thanks!
This new wrapper works well within the B4J development environment in both Debug and Release modes. However, when I deploy it as a B4J application run it in Windows - I have not tested other environments - I get the following error. Other than the first line below, which I included for context, this error is coming from the DynamicJasper jar that I wrapped for my library.
net.nmcollector.PrintPageReportWrapper openPrintPageReport JasperPrint finalReport = DynamicJasperHelper.generateJasperPrint(dynamicReport, ...
Nov 11, 2021 9:28:08 AM ar.com.fdvs.dj.core.DynamicJasperHelper generateJasperPrint
INFO: generating JasperPrint
Nov 11, 2021 9:28:08 AM ar.com.fdvs.dj.core.DynamicJasperHelper generateJasperReport
INFO: generating JasperReport (DynamicReport dr, LayoutManager layoutManager, Map generatedParams)
Nov 11, 2021 9:28:08 AM ar.com.fdvs.dj.core.DynamicJasperHelper generateJasperReport
INFO: generating JasperReport with prefix: r
Nov 11, 2021 9:28:08 AM ar.com.fdvs.dj.core.DJJRDesignHelper getNewDesign
INFO: Creating DynamicJasperDesign
Errors were encountered when compiling report expressions class file:
error: no source files
Here is a code snippet of how I am using it withing B4J:
{code}
Private Sub Button_Print_Page_Click
Try
Dim sqlConnectionString As String = File.Combine(File.DirData("nmcollector"),"nmcswDB.sqlite")
Dim printPageReportWrapper As PrintPageReportWrapper
'arg[0] = sqlConnectionString
'arg[1] = Collection ID
'arg[2] = Item ID
'arg[3] = Tab ID
'arg[4] = Report Title
printPageReportWrapper.openPrintPageReport(Array As String(sqlConnectionString, MainPage.selectedCollectionId, MainPage.selectedItemId, MainPage.selectedTab, MainPage.tabLabelsList.Get(MainPage.selectedTab) & ": " & B4XFloatTextFieldItemListValue.text))
Catch
Dim sf As Object = xui.Msgbox2Async(LastException, "Error", "OK", "", "", Null)
Wait For (sf) Msgbox_Result (Result As Int)
End Try
End Sub
{/code}
Here is a screen capture snippet of it's reverence as a B4J Library:
I am in the process of troubleshooting this myself but any ideas are welcome. Since it does not seem to be anything obvious I am going to look at the Dynamic Jasper source code for hints.
As a side note, I have a similar java wrapper for jasper reports (not Dynamic Jasper) that I was able to build and deploy successfully.
Thanks!
Last edited: