118
edits
Changes
Created page with '==Function Overview== This function is used to retrieve report data. reportdata_find(flag,callbackfunc,reportid,usetemplate,start,end) {| border="1" !Parameter !Description…'
==Function Overview==
This function is used to retrieve report data.
reportdata_find(flag,callbackfunc,reportid,usetemplate,start,end)
{| border="1"
!Parameter
!Description
|-
|'''Flag'''|| Asynchronous or Synchronous.
|-
|'''Callbackfunc''' || Callback function.
|-
|'''Reportid''' || Id of the report.
|-
|'''Usetemplate'''|| 0 - return report data in recordset; 1 - return report with its template, return the same look and feel as if you are running the report normally.
|-
|'''Start'''||The starting record number in query.
|-
|'''End'''||The ending record number in query.
|}
==Example==
var rs=reportdata_find(false,"",12345,0,0,20); // get report data in a ssRecordSet object with the first 20 records from the report query. You can get the columns using the report column headings (eg. if you have “First Name” as a column heading in the report, you can use rs.getfieldbyname(row,”First Name”) to get the data in that column.
var rs=reportdata_find(false,"",12345,1,0,20); // get report with its template
rs.getfieldbyname(1,"rowcount"); // this will return the number of records in the report
rs.getfieldbyname(1,"msg"); // this will return the html code for the report generated
[[Category: Pandora]]
This function is used to retrieve report data.
reportdata_find(flag,callbackfunc,reportid,usetemplate,start,end)
{| border="1"
!Parameter
!Description
|-
|'''Flag'''|| Asynchronous or Synchronous.
|-
|'''Callbackfunc''' || Callback function.
|-
|'''Reportid''' || Id of the report.
|-
|'''Usetemplate'''|| 0 - return report data in recordset; 1 - return report with its template, return the same look and feel as if you are running the report normally.
|-
|'''Start'''||The starting record number in query.
|-
|'''End'''||The ending record number in query.
|}
==Example==
var rs=reportdata_find(false,"",12345,0,0,20); // get report data in a ssRecordSet object with the first 20 records from the report query. You can get the columns using the report column headings (eg. if you have “First Name” as a column heading in the report, you can use rs.getfieldbyname(row,”First Name”) to get the data in that column.
var rs=reportdata_find(false,"",12345,1,0,20); // get report with its template
rs.getfieldbyname(1,"rowcount"); // this will return the number of records in the report
rs.getfieldbyname(1,"msg"); // this will return the html code for the report generated
[[Category: Pandora]]