JASPER REPORTS PLUGIN and JASPER SOFT

Questions and answers on developing, deploying and using plugins and JavaBeans

JASPER REPORTS PLUGIN and JASPER SOFT

Postby dlclark » Thu Jan 27, 2022 9:00 pm

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:
dlclark
 
Posts: 38
Joined: Sat Jan 08, 2022 5:39 pm

Re: JASPER REPORTS PLUGIN and JASPER SOFT

Postby omar » Fri Jan 28, 2022 11:21 am

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.
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 377
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: JASPER REPORTS PLUGIN and JASPER SOFT

Postby dlclark » Mon Jan 31, 2022 5:47 pm

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
dlclark
 
Posts: 38
Joined: Sat Jan 08, 2022 5:39 pm

Re: JASPER REPORTS PLUGIN and JASPER SOFT

Postby dlclark » Sun Feb 20, 2022 10:04 pm

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
dlclark
 
Posts: 38
Joined: Sat Jan 08, 2022 5:39 pm

Re: JASPER REPORTS PLUGIN and JASPER SOFT

Postby omar » Sun Feb 20, 2022 10:41 pm

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
omar
 
Posts: 377
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: JASPER REPORTS PLUGIN and JASPER SOFT

Postby dlclark » Mon Feb 21, 2022 4:40 pm

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
dlclark
 
Posts: 38
Joined: Sat Jan 08, 2022 5:39 pm

Re: JASPER REPORTS PLUGIN and JASPER SOFT

Postby robert.edelmann » Mon Feb 21, 2022 8:06 pm

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.
mit freundlichen Grüßen
Robert Stefan Edelmann
User avatar
robert.edelmann
 
Posts: 92
Joined: Wed Aug 14, 2013 6:12 pm

Re: JASPER REPORTS PLUGIN and JASPER SOFT

Postby omar » Wed Mar 02, 2022 4:56 pm

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)
Intrasoft, Founder
Omar van Galen
omar@intrasoft.nl
+31-(0)6-21234586
Servoy Developer
omar
 
Posts: 377
Joined: Sat Feb 12, 2011 4:51 pm
Location: Intrasoft, The Netherlands

Re: JASPER REPORTS PLUGIN and JASPER SOFT

Postby dlclark » Wed Mar 09, 2022 2:13 am

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
dlclark
 
Posts: 38
Joined: Sat Jan 08, 2022 5:39 pm

Re: JASPER REPORTS PLUGIN and JASPER SOFT

Postby mboegem » Thu Mar 10, 2022 11:51 am

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.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1748
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 7 guests

cron