Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter list #303

Open
schmidtkropp opened this issue Nov 22, 2021 · 1 comment
Open

Parameter list #303

schmidtkropp opened this issue Nov 22, 2021 · 1 comment

Comments

@schmidtkropp
Copy link

schmidtkropp commented Nov 22, 2021

Hello, everyone,

I cannot give PHPJasper an array as a list in the parameters.

Can someone help?

`
$params = ["Kurstypen" => ['22'], "Kurse" => ['72','62'], 'vonDatum' => '2021-01-01', 'bisDatum' => '2021-12-31'];

$options = [ 
		'format' => [strtolower($report['exportformat'])],
		'params' => $params,
		'db_connection' => [
			'driver' => 'mysql', 
			'username' => db_user,
			'password' => db_pass,
			'host' => db_host,
			'database' => db_name,
			'port' => db_port
		]
	];

`

error message:
Parameter 'Kurstypen' of type 'java.util.List with value 'Array' is not supported by JasperStarter!

@Xint0-elab
Copy link

There is no support for passing array parameters to the report using JasperStarter which is the java program used by phpjasper to process the reports.

Maybe you can pass values as a string and depending on your particular use case either parse the value in the report or pass it as-is into the query of the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants