Page 2 of 2

Re: JasperReports Plug In Now Available

PostPosted: Fri Mar 01, 2013 7:22 pm
by brasil
Thanks jasantana
All that you passed I had already set up, had an error in the SQL query that after I insert more data I got indentificar

Re: JasperReports Plug In Now Available

PostPosted: Thu Jan 27, 2022 1:02 am
by dlclark
I have viewed the Servoy webinar on Jasper Reports (2018 I believe)...

It was not clear how you link JasperSoft Reporting Design Tool to the Servoy Project/Data during design.

Hoping you can point me in the right direction.

Daryl()

Re: JasperReports Plug In Now Available

PostPosted: Thu Jan 27, 2022 12:03 pm
by omar
Hi Daryl(),

That is actually really easy nowadays thanks to the boys and girls behind the JasperSoft plugin. If you have the plugin in your plugins folder you can run a report like this:

Preview (shows an onscreen preview in smart client and downloads a pdf in NG-Client):
Code: Select all
plugins.jasperPluginRMI.runReport(datasource, 'myReport.jrxml', '', plugins.jasperPluginRMI.OUTPUT_FORMAT.VIEW, [])


The datasource can be a foundset, a dataset or a viewset. A viewset is very convenient when you need data from multiple tables. Define fields in your report that match the name of your data.

To output to a printer (SmartClient only) just change the output and if you want to print to a specific printer change the output options:
Code: Select all
plugins.jasperPluginRMI.runReport(reportDataSource, report, 'EPSON ET-2720', plugins.jasperPluginRMI.OUTPUT_FORMAT.PRINT, parameters)


You can output to CSV, DOC, XLS, XLSX, HTML, PDF, PRINT, RTF, TXT and XML.

Parameters are very convenient as well, just pass them in something like this (don' forget to define them in your report as a parameter as well using the same parameter name):
Code: Select all
parameters = {'userName': security.getUserName(), 'nameField': foundset.name, 'someVar': someVar}


To change the locale of your report you can add an extra locale parameter. In Servoy Admin under Server plugins specify where your reports are located in the dedicated field for that. That's it!

Re: JasperReports Plug In Now Available

PostPosted: Sat Jan 29, 2022 5:21 pm
by dlclark
Omar,

Thanks for your generous information!

I must not be stating this quite well enough: I am asking about how to configure JasperSoft - to communicate with a Servoy foundset or dataset - from within the JasperSoft IDE - e.g. how to configure the JasperSoft IDE to communicate with SERVOY whilst building the reports.

The execution environment inside SERVOY, seems well documented. It is the communication between JasperSoft whilst creating or modifying reports in JasperSoft that I am not finding out how to configure.

Hope this is clearer,

Thanks again for your patience.

Daryl

Re: JasperReports Plug In Now Available

PostPosted: Mon Jan 31, 2022 6:34 pm
by omar
Hi Daryl,

I understand. The way you describe, is the old way of doing it, which gave less control because you had to define long SQL statements to get your data. I guess if you really want to, you can still do that. In that way you don't communicate with Servoy, just with the database. In the way I described it, Servoy feeds the report the data connections it needs and you test it by running the report from Servoy and not from JasperSoft Studio. Can you explain why you want to do it this way or is your expectation pointing you in the wrong direction?

Re: JasperReports Plug In Now Available

PostPosted: Wed Feb 02, 2022 4:52 pm
by dlclark
Omar,

You seem to be intimating that you can connect to Jasper Soft from within SERVOY to CREATE/DESIGN a REPORT?

Is it through a PERSPECTIVE? OR?

Daryl

Re: JasperReports Plug In Now Available

PostPosted: Wed Feb 02, 2022 5:36 pm
by omar
Hi Daryl,

You don't need the connection with Servoy or the database to design the report. You just define the fields in your report by name and add them in your report wherever you need them. Then save the report. From Servoy run the report and if your datasource contains the fields that match the ones you defined in the report it will just work. The plugin makes sure that Servoy passes all necessary connection details in at runtime. Very cool is that you can use relations and calculations as well. It is almost like the JasperSoft report editor is a report editor integrated in the Servoy design environment. Try it, if you get stuck, let me know. Once you are used to it I think you will never want it otherwise.

Greetings,

Re: JasperReports Plug In Now Available

PostPosted: Wed Feb 02, 2022 6:34 pm
by dlclark
Omar,

Interesting, the DEMOS that I viewed online by the SERVOY TEAM seemed to have the DATASET visible in the JasperSoft Design IDE. That is what I was trying to accomplish. E.G. you could see in the IDE that data elements and select them and verify them as you were building the report.


I think there is a capability that is not very well documented here.

Daryl