Jasper Report Tabel Element: passing foundset to dataset

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

Jasper Report Tabel Element: passing foundset to dataset

Postby alexander.sternadel » Fri Dec 27, 2024 12:43 pm

Hi everyone,

I'm trying to get the jasper element "table" running. These tables require a dataset to get their data from.
I tried the same way as with normal variables and just passed the foundset from servoy which is based in a DB table and the parameters.
Code: Select all
function onActionReportTable(event) {
   plugins.jasperPluginRMI.runReport(foundset,'Report_A4_Landscape.jrxml',null,'view',vParameters)
}

This however does not work for tabel elements in jasper. Neither the foundset nor the parameters make it to jasper.
Is there a way to convert the servoy foundset into a jasper dataset or to pass it in another way without getting the data directly from the database?

Cheers
Alexander
alexander.sternadel
 
Posts: 20
Joined: Fri Nov 22, 2024 1:33 pm

Re: Jasper Report Tabel Element: passing foundset to dataset

Postby mboegem » Fri Dec 27, 2024 2:04 pm

Hi Alexander,

For a table I normally use a subreport.
The subreport consists of a header (column titles), body (just one row height containing dataproviders) and optionally a footer.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

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

Re: Jasper Report Tabel Element: passing foundset to dataset

Postby alexander.sternadel » Mon Dec 30, 2024 7:10 am

Hi Marc,

I'm not sure if I can make it work with just variables in a subreport. The reason is, that the table in the DB is created dynamically, so I don't know the amount or names of columns in every situation. According to the guides in jasper this can be solved by tables/crosstabs as they can build based on whats in the jasper dataset. But the problem remains of how to pass the foundset into the dataset without accessing the DB directly.
alexander.sternadel
 
Posts: 20
Joined: Fri Nov 22, 2024 1:33 pm


Return to Plugins and Beans

Who is online

Users browsing this forum: Bing [Bot] and 3 guests