[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [birt-report-designer-dev] Trouble with Scripted datasource:JavaAPI getting invoked multiple times

Title: Trouble with Scripted data source: Java API getting invoked multiple times

Hi,

 

What is your BIRT runtime version? Starting from BIRT 2.3.0 RC builds the execution of a script data set which shared by multi tables should result with only one script execution.

 

Thanks.

Lin

 


From: birt-report-designer-dev-bounces@xxxxxxxxxxx [mailto:birt-report-designer-dev-bounces@xxxxxxxxxxx] On Behalf Of John, Abhilash
Sent: 2008
616 17:46
To: For developers on the BIRT Report Designer project
Subject: RE: [birt-report-designer-dev] Trouble with Scripted datasource:JavaAPI getting invoked multiple times

 

Thanks for the quick response!

I guess you are right....

I have

            <property name="dataSet">Data Set</property>
in multiple places. That's what you meant right?

Is there any way I can define the dataset at one place, and access the same in 3-4 tables/ data columns? Please advice

 

Regards,
Abhilash John

 

 


From: birt-report-designer-dev-bounces@xxxxxxxxxxx [mailto:birt-report-designer-dev-bounces@xxxxxxxxxxx] On Behalf Of Tiwari_Vivek@xxxxxxx
Sent: Monday, June 16, 2008 3:00 PM
To: birt-report-designer-dev@xxxxxxxxxxx
Subject: RE: [birt-report-designer-dev] Trouble with Scripted data source:JavaAPI getting invoked multiple times

You might have used same dataset more than once. So for every appearance of corresponding dataset it is calling this api again and again.

 

With Regards

Vivek Nath Tiwari

0522 4051203


From: birt-report-designer-dev-bounces@xxxxxxxxxxx [mailto:birt-report-designer-dev-bounces@xxxxxxxxxxx] On Behalf Of John, Abhilash
Sent: Monday, June 16, 2008 2:49 PM
To: birt-report-designer-dev@xxxxxxxxxxx; birt-report-engine-dev@xxxxxxxxxxx
Subject: [birt-report-designer-dev] Trouble with Scripted data source: JavaAPI getting invoked multiple times

 

Hi All,
I am using a scripted datasource to talk to the Hibernate layer via a Java API. I noticed that the call from the reportengine to the Java API happens more than once, before the data is displayed completely. This leads to a performance bottleneck for the reports. Can you please guide me what am I doing wrong here?

The following is my environment:
birt-runtime-2_3_0
Hibernate 3.2
And here is my code:

 <method name="open">
 <![CDATA[reportGenerator = new Packages.com.xxx.BirtReportGenerator();
reportData = reportGenerator.getPublishedApprovals(params["AAA"].value, params["BBB"].value,params["CCC"].value);
iter = reportData.iterator();]]></method>

<method name="fetch">
<![CDATA[if(!iter.hasNext()){
        return false
}
else{
        report = iter.next();
        dataSetRow["analystHeader"]=report.getAnalystHeader();
        dataSetRow["securityHeader"]=report.getSecurityHeader();
        dataSetRow["sortHeader"]=report.getSortOrder();
        dataSetRow["genHeader"]=report.getGenerated();

        dataSetRow["expiry"]=report.getPublishedDate();
        dataSetRow["security"]=report.getSecurity();
        if(report.getDetails()!=null){
                detailsIterator = report.getDetails().iterator();
                if(detailsIterator==null||!detailsIterator.hasNext()){
                        return false;
                }else{
                        var detailInfo = detailsIterator.next();
                        dataSetRow["type"] = detailInfo[0];
                        dataSetRow["from"] = detailInfo[1];
                        dataSetRow["to"] = detailInfo[2];
                        dataSetRow["comments"] = detailInfo[3];
                }
        }
        return true;
}]]></method>
<method name="close">
<![CDATA[iter = null;
reportData =null;
reportGenerator =null;]]>
</method>
</script-data-set>

 

Regards,
Abhilash John