Problems linking Input Control with Parameter

0

Hi,

I'm new using Jasper Server, and I'll need to use a Remote XML DataSource, so I decide to do a test before, I'm trying to use a simple Input Control passing an String and retrieve at the report. But it doesn't work.

My versions:
Jasper Server 6.4.2
Jaspersoft Java Rest Client: 6.3.1

This is my parameter "Teste" in my JRXML:

<parameter name="Teste" class="java.lang.String" isForPrompting="false"/>

And I already test the input control Listing, Setting and Getting the value in my Bean. Everything works fine.

This is the way I'm setting the Input Control:

OperationResult<InputControlStateListWrapper> operationResult =
        session
        .inputControlsService()
        .inputControls()
        .container("/reports/TestJasperReport")
        .values()
        .parameter("Teste", moedas.get(0).getNome())
        .run();
 
InputControlStateListWrapper teste2 = operationResult.getEntity();

And this is the way I'm calling the report:

OperationResult<InputStream> result =
        session
        .reportingService()
        .report("/reports/TestJasperReport")
        .prepareForRun(ReportOutputFormat.PDF, 1)
        .run();
 
InputStream inputStream = result.getEntity();

And that's my input control configuration:

https://imgur.com/a/6FQFu

But in my report the "Teste" parameter is always NULL. What I'm doing wrong?

Thanks in advance.

gui.bernardi09's picture
Joined: Mar 13 2018 - 8:22am
Last seen: 5 months 3 weeks ago

0 Answers:

No answers yet
Feedback
randomness