frankfenghua / flexreport

Automatically exported from code.google.com/p/flexreport
0 stars 0 forks source link

load the report data form server #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have been looking around to add script for the httprequest and i couldn't
make it.
Please help me to get the server response data for DemoReport from the server

Original issue reported on code.google.com by subindon...@gmail.com on 27 Apr 2010 at 7:56

GoogleCodeExporter commented 8 years ago
I make it following:

in the template file i use a label function to render data:
<ReportDataGrid id="report1" sizeToPage="true" wordWrap="true" width="100%" 
fontSize="12" 
labelFunction="opener.report_labelFunc"/>

and I use a normal creationComplete handler to set the data provider.
private function creationCompleteHandler(event:FlexEvent):void {
    report1.dataProvider = report1DataProvider;
    //opener.report_init(report1);
}

the dataprovider is a normal HTTPService object and is fired on the caller page 
(so before DemoReport is 
shown):
<mx:HTTPService id="report1Srv" url="data/report1.xml" showBusyCursor="true" 
result="dataRequestResultHandler(event);" 
fault="dataRequestFaultHandler(event);"/>

cheers.

Original comment by gfvam...@gmail.com on 27 May 2010 at 8:44