Search code examples
javapdfservletsjakarta-eebirt

Adding values to a BIRT report through servlet


Please before you say its repeated please understand my problem.

Im developing Java EE 8 application which makes use of BIRT to generate a pdf and send it on to client. I've already completed report design, and webpages to take the data, and also servlets to process render and send the generated pdf(generic).

But i want to add the data received from the request directly to the generated pdf ie without adding them to a database(so i cannot add the values by binding data source).Ive even added the names in report design to enable me to add values at run time.

Ive seen How do you set and pass a parameter to a BIRT report created by the BIRT Report Designer through the BIRT API? and understood idea there but my problem is i have date columns in my design which has to be set as well.

What im hoping with this question is

  1. A simple example to the provided solution in the linked post.Or a better solution if present.
  2. Which is the class which can populate the BIRT-date since java.util.Date is deprecated.
  3. And to know if BIRT api provides way to manuplate the report elements via name or id in a servlet or a model java class.

thankyou for your help forgiving me if i have bored you with a long question.

Ashwin


Solution

  • Why don't you just consider using a string representation of the date values instead?