IReport “parameter Not Found” when adding a parameter

0

i'm using IReport 4.8.0. i created a dataset and using it for a table and a chart and everything works fine.

now i want to add a string parameter so the user can insert a name of city.

so i added a new string parameter inside the dataset and dragged it into Page Header. i also updated the Dataset query so it will receive the value from the parameter:

SELECT
 COUNT(leads.`status`) AS Number_Of_Status,
 leads.`status` AS leads_status,
 leads.`primary_address_city` AS leads_primary_address_city
FROM
 `leads` leads
WHERE
 leads.`primary_address_city` = $P{city_to_choose}
GROUP BY
 leads.`status`

but all i get when pushing the "preview" is "Parameter Not Found: city_to_choose" what did i miss?

 

rodnikosh's picture
Joined: Nov 6 2012 - 12:56am
Last seen: 6 years 3 months ago

2 Answers:

3

Add paratemer city_to_choose in Report  (not in a Dataset). After that you can pass it into New Dataset 1 (for example if you want to display this parameter in table header)

sanbez's picture
834
Joined: Jan 11 2011 - 2:06am
Last seen: 3 months 2 days ago
2

Thank you,

There is much more detailed example here::http://isura777.blogspot.co.il/2011/10/pass-parameters-from-main-report-to.html

as you said, The parameters from inside the dataset , need to be mapped into the master report parameters. only then the master report recognizes the parameter defined inside the dataset.

rodnikosh's picture
Joined: Nov 6 2012 - 12:56am
Last seen: 6 years 3 months ago
Feedback