[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[birt-report-engine-dev] Re : PERFORMANCE
|
Hi,
that is my code :
ByteArrayOutputStream outStream = null;
IReportRunnable design =
engine.openReportDesign(reportPhysicalPath);
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
setReportParameterValues(task, design, paramValueList);
RenderOptionBase options = new RenderOptionBase();
outStream = new ByteArrayOutputStream();
options.setOutputStream(outStream);
options.setOutputFormat("pdf");
task.setRenderOption(options);
task.run();
outStream.close();
byte [] bytes = null;
if ( outStream != null)
bytes = outStream.toByteArray();
return bytes;
Then, I send the bytes to HTTPResponse in order to display the report.
My request to db :
select it.id, it.available, it.at, it.destination, d.id AS dvdId, d.title
from item it INNER JOIN item_information it_i
ON (it.item_info_fk = it_i.id)
INNER JOIN dvd d ON (d.item_info_fk = it_i.id)
where (it.machine_fk = ?)
I add 3 columns in order to calculate how much there is DVD group by
their titles (in the table to show : available, in transit, and rented)
table : group -> name : groupage key expression : row["title"]
In the head on group I have 4 expression (for each title):
- Total.sum(row["dvdAvailable"])
- Total.sum(row["dvdRented"])
- Total.sum(row["dvdMoving"])
-
Total.sum(row["dvdAvailable"])+Total.sum(row["dvdRented"])+Total.sum(row["dvdMoving"])
And in footer of the table there are the same expression for all dvd.
I take runtime-2.0.1, jboss 4.0.2. Is runtime_RC3 better ?
So sorry if my english is bad