Page 1 of 1

JASPER REPORTS PLUGIN and JASPER SOFT

PostPosted: Thu Jan 27, 2022 9:00 pm
by dlclark
Trying to determine how to setup JASPERSOFT STUDIO connection to SERVOY Developer; not intuitive to me on how that is accomplished within JASPERSOFT.

I did view the 2018 Webinar on using JASPERSOFT and the invocation of Jasper RMI . The documentation in GITHUB appears to be oriented to an older product IREPORTS.

Any assistance would be much appreciated.

Daryl()

P.S. Great forum! :roll:

Re: JASPER REPORTS PLUGIN and JASPER SOFT

PostPosted: Fri Jan 28, 2022 11:21 am
by omar
Hi Daryl(),

I agree, the GitHub site is a big puzzle and could be much clearer. All the information is there however. On the main GitHub page on the right you see a small section 'Releases' if you click on it, it will bring you to the plugin download section: https://github.com/Servoy/servoy_jasperreports/releases/tag/v6.17.0_1. Here, as is explained in Getting Started, you can choose between three versions. The Wiki says most people use the ChartNScript version so I went with that but the Basic version should be fine as well. Download the zipfile, unpack it and drop the contents in your Servoy application_server/plugins folder. If you haven't done so, download JasperSoft Studio Community Edtion from https://community.jaspersoft.com/download.

Re: JASPER REPORTS PLUGIN and JASPER SOFT

PostPosted: Mon Jan 31, 2022 5:47 pm
by dlclark
Omar,


My question is not how to invoke a Jasper Reports RMI call to JasperSoft; my question is when installing JasperSoft:

How to configure JasperSoft to communicate with Servoy Developer/Server to be able to use Foundsets or Datasets to DESIGN and TEST a JasperSoft report?

Thanks,

Daryl

Re: JASPER REPORTS PLUGIN and JASPER SOFT

PostPosted: Sun Feb 20, 2022 10:04 pm
by dlclark
I was able to create the connection the hard way, e.g. by creating a mysql connection and then create a query. I can create a report that way just fine.

But, the SERVOY WEBINARS indicated a method to use a forms FOUNDSET to drive the connection and available components to create the Jasper REPORT.

So, still looking for some help on that, thanks!

Everyone has been very helpful!

Daryl

Re: JASPER REPORTS PLUGIN and JASPER SOFT

PostPosted: Sun Feb 20, 2022 10:41 pm
by omar
Hi Daryl,

You may want to check out Sean's webinar on the servoy jaspersoft plugin which explains the foundset route in more detail. Here's a link:
https://youtu.be/afbjnsBt0PM

Kind regards,
Omar

Re: JASPER REPORTS PLUGIN and JASPER SOFT

PostPosted: Mon Feb 21, 2022 4:40 pm
by dlclark
Omar,

Yes, been there and reviewed webinar several times. It does not provide any information on how to access FOUNDSETS within JASPERSOFT REPORTS.

I am thinking there must be an either an XML file that gets generated somehow or a JAR that I need to reference in Servoy. Just guessing though...

I have been able to create the dataset using a direct connect to the MYSQL database and creating a query for the data I need.

But, FOUNDSETS seem so much more of an ELEGANT solution. (Hate to constantly reinvent the wheel here....)

Daryl

Re: JASPER REPORTS PLUGIN and JASPER SOFT

PostPosted: Mon Feb 21, 2022 8:06 pm
by robert.edelmann
We define our reports in Jaspersoft as "one empty record", define the fields of the foundset and the related fields as fields (avoid using $ in relationnames, jasper hates that), like this:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.17.0.final using JasperReports Library version 6.4.0  -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Mangelbericht" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="28" bottomMargin="20" whenResourceMissingType="Key" uuid="a4789c80-6fc3-49d3-8140-bc4c4f49b721">
   <property name="com.jaspersoft.studio.unit." value="mm"/>
   <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
   <queryString language="SQL">
      <![CDATA[]]>
   </queryString>
   <field name="anzeige_lfd_nummer" class="java.lang.String"/>
   <field name="auftraege_id" class="java.lang.String"/>
....


To create the report we invoke the report with the foundset as a parameter:

Code: Select all
reportBytes = plugins.jasperPluginRMI.runReport(dataSourceOrFs, report.path + "/" + report.fileName, '', plugins.jasperPluginRMI.OUTPUT_FORMAT.PDF, report.reportParameters);


dataSourceOrFs is the foundset, report is an object with the name / path / additional parameters for the the report.

Re: JASPER REPORTS PLUGIN and JASPER SOFT

PostPosted: Wed Mar 02, 2022 4:56 pm
by omar
dlclark wrote:Omar,

Yes, been there and reviewed webinar several times. It does not provide any information on how to access FOUNDSETS within JASPERSOFT REPORTS.

I am thinking there must be an either an XML file that gets generated somehow or a JAR that I need to reference in Servoy. Just guessing though...

I have been able to create the dataset using a direct connect to the MYSQL database and creating a query for the data I need.

But, FOUNDSETS seem so much more of an ELEGANT solution. (Hate to constantly reinvent the wheel here....)

Daryl


Hi Daryl,

JasperSoft does not have any knowledge of Servoy internals such as foundsets. It is the JasperSoft plugin (written by Servoy developers) that negotiates between Servoy and the JasperSoft engine. This plugin is loaded into Servoy and operates in only 1 direction, from Servoy to JasperSoft.

So you have two options:

1. Access the database you are using from JasperSoft directly without using foundsets (old style)
2. Or you can simply define the needed fields in your report (including fields through relations) and trust on the plugin to map your Foundset data to those fields (new style)

Re: JASPER REPORTS PLUGIN and JASPER SOFT

PostPosted: Wed Mar 09, 2022 2:13 am
by dlclark
I must have misunderstood Sean's Webinar then. Thanks for responding. Would have been nice to be able to somehow tap into the SERVOY DATAMODEL definition, through XML or something.

Thanks for the assistance.

Daryl

Re: JASPER REPORTS PLUGIN and JASPER SOFT

PostPosted: Thu Mar 10, 2022 11:51 am
by mboegem
Hi Daryl,

in the past I've created reports based on XML data, because we needed portable data.
So Servoy would build the XML structure and send it to JR.
When developing the report, you can use the XML using a file containing the XML.

It will depend on your report though, in this case we only needed documents like invoices, where the XML holds relative small amount of data.