Page 1 of 1
passing domain objects as inputs for the report
#5
Posted 12 April 2012 - 07:58 AM
Yes, something like this
Invoice invoice = new Invoice();
invoice.setInvoiceId(1);
invoice.setInvoiceMonth('1/1/2011');
List<Invoive> list = new ArrayList<Invoive>();
list.add(invoice);
The collection needs to be passed to the birt and displayed in the report(in the table format). Kindly let me know how to acheive this.
Invoice invoice = new Invoice();
invoice.setInvoiceId(1);
invoice.setInvoiceMonth('1/1/2011');
List<Invoive> list = new ArrayList<Invoive>();
list.add(invoice);
The collection needs to be passed to the birt and displayed in the report(in the table format). Kindly let me know how to acheive this.
#6
Posted 12 April 2012 - 11:12 AM
When you create the task to run the report you can add your object like
task.getAppContext().put("myarrlist", list);
Then in the report access the list like:
var arrlist = reportContext.getAppContext().get("myarrlist");
To handle array list look at the attached report. I use a beforeFactory event to load it up, while you will be doing this in your api code.
Jason
task.getAppContext().put("myarrlist", list);
Then in the report access the list like:
var arrlist = reportContext.getAppContext().get("myarrlist");
To handle array list look at the attached report. I use a beforeFactory event to load it up, while you will be doing this in your api code.
Jason
Attached File(s)
-
SDSArrayList.zip (1.59K)
Number of downloads: 10
Page 1 of 1






MultiQuote



