-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Resources in report #99
Comments
Hi @Azariil , i use images as parameter, see how to do... yourReport.jrxml <parameter name="image" class="java.lang.String"/>
<image>
<reportElement key="" x="7" y="2" width="69" height="76" uuid="3dd59614-b0b3-4034-a9c5-7a936d36e79a"/>
<imageExpression><![CDATA[$P{image}]]></imageExpression>
</image> yourController.php $input = '/home/geekcom/projects/project1/reports/yourReport.jrxml';
$output = '/tmp';
$options = [
'format' => ['pdf'],
'locale' => 'pt_BR',
'params' => [
'image' => '/home/geekcom/projects/project1/public/images/image.png',
],
];
$jasper = new PHPJasper;
$jasper->process(
$input,
$output,
$options
)->execute(); |
Hi @geekcom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi.
I use the image in the report for the logo.
But I had one problem. If I use only parameters in the report, the report is not generated, because the parameter "-r" is missing. This happens because in this code section this parameter is added only if there is a connection to the database or another resource.
I somehow incorrectly use this parameter? How can you add photos to the report differently?
Thanks!
The text was updated successfully, but these errors were encountered: