New to Jasper Reports

Hi,

I have just purchased the Jasper report Plugin for servoy. and have successfully ran my first report with the help of provided tutorials and I now have a couple of questions.

Can I perform a find from within servoy and then just pass the resulting foundset to the jasper plugin?

Is it possible to view the resulting jasper report in a global html or rtf feild within servoy? instead of using the native JR viewer.

Can I perform a find from within servoy and then just pass the resulting foundset to the jasper plugin?

Unfortunately, this is not possible. But you can ask your foundset for the query that created it, along with the arguments. From that, you can create a full SQL statement and pass that as parameter to the report. In the report query you just put in that parameter.

Thanks Patrick,
Could I ask for some simple example code for me to build on for the following

But you can ask your foundset for the query that created it, along with the arguments. From that, you can create a full SQL statement and pass that as parameter to the report. In the report query you just put in that parameter.

Many thanks

Hi Patrick,

I think I may have found the answer to the previous post ??

//Get the internal SQL which defines a foundset
var sql = databaseManager.getSQL(foundset)
var vPara = databaseManager.getSQLParameters(foundset)

but how do I pass this to the jasper plugin?

For example you create a parameter called “query”. You can enter a query as default value. Then in the report query, you just put $P{query} (I think this is the syntax). So the report uses as query whatever is in the parameter “query”. Before you call the report, you get your foundset query and put it into the parameter hash map that you can pass to any report.

Hi All,

Do you think it would be possible to have the Jasper Viewer open within a servoy form rather than a form in dialog. I guess it would be nice to have it take the place of the current servoy print preview screen. Ideally like a bean that can be placed on a servoy form??

It’s not possible to embed the Jasper viewer into a form. You can run the report as PDF and use the JPedal bean to display the generated PDF inside a form.

Paul

OK,
Thanks Paul