1 Reply Latest reply on Dec 17, 2009 9:11 AM by Mats Ekström

    Passing parameter to Birt reporting

    Roy Abu Bakar Newbie

      Hi,


      I had birt report which have 1 parameter to filter department field.
      In my xhtml page, i had input text h:inputText to passing parameter to birt.


      Question: How to get value from h:inputText and passing that value to birt reporting?


      Thanks before.

        • 1. Re: Passing parameter to Birt reporting
          Mats Ekström Newbie

          Hi, I guess you already solved this - but maybe it can help someone else..


          I use the reportEngine to generate my reports as pdf, xls and doc.
          BIRT version 2.5.1


          Send the parameter from your action class to your where you generate the report. Set the parameter with task.setParameterValue(..):




          ...
          IReportRunnable runnable = reportEngine.openReportDesign(reportPath);
          ...
          IRunAndRenderTask task = reportEngine.createRunAndRenderTask(runnable);
          ...
          task.setParameterValue(key, reportParams.get(key));