Pages

Monday, October 24, 2011

Pass parameters from main report to table's data source in iReport

Following steps help to pass parameters from main report to table data source in iReport (3.6.7 or 4.1.2)
  1. Create required parameters in the main report
    • right clicking on the parameters section of main report
    • add parameter
    • set the properties (data type)
    • set default expression (optional)
  1. Create parameters within the sub data source
    • Set name , data type as same as main report parameters
  1. Map the parameters in main report and data set
    • Right click on the table and click on Edit Table Dataset
    • Select the parameters
    • Click on add
    • Choose the parameter (created in dataset) from upper combo
    • Assign value expression (parameter which added in step 1)

9 comments:

  1. Thank you, i was looking for an example like that for two days! didn't know the parameters i had inside the dataset need to be mapped into main report parameters. Thank you!

    ReplyDelete
  2. AMIGO MUCHISISISISIMAS GRACIAS ME ACABAS DE SALVAR EL SEMESTRE

    ReplyDelete
  3. THANK YOUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
    VERY MUCH!!!!!!

    ReplyDelete
  4. Thank you so much :),i was getting 'parameter not found' exception on defining parameter in main dataset without defining in table dataset,saved my time :)

    ReplyDelete
  5. Big thanks! It helps me a lot!

    ReplyDelete
  6. I have a session Table and when i add this command :

    > {
    > collectionName : 'sessions',
    > findQuery : {
    > "_id" : {
    > "$oid": "$P!{P_SESSION_ID}"
    > } }}
    >
    > Query Params not found:P_SESSION_ID

    ReplyDelete