Retrieve value other then Value Column from an inputcontrol in iReport

0

I've an inputcontrol with Value Column:Value1. In visible Query Columns I've added Value1 and Value2. In the Report title I've added $P{[inputcontrol]} to the band and obviously Value1 is returned when I run the report. But I need Value2, how can I do this?

Thnx Remco

 

rtiel's picture
19
Joined: May 23 2013 - 1:07am
Last seen: 3 weeks 18 hours ago

1 Answer:

1

$P{[inputcontrol]} shows nothing else than the value, which is passed from the executing environment to your report. For normal, you use this value i.e. as a unique id for a query or sth. else.

so, if you need value2 in your report, just create the input control with value column: value2 and visible columns whatever you like.

if you need both values in your report, either create two input controls, or select value1 and value2 as a concatenated column (seperated by a uniqe character or sth. similar), and strip them in your report (you can do this with 3 parameters, or String-split, or sth similar)

Cheers, Thomas

http://www.thomaszimmer.net

Thomas Zimmer's picture
Joined: Oct 2 2012 - 1:35am
Last seen: 5 days 11 hours ago

Thnx, I succesfully used your first solution.

Remco

rtiel - 6 years 5 months ago
Feedback