<< Click to Display Table of Contents >> Navigation: Using script in HTML document > AJAX |
* HTML Report Library is required
Script inside HTML page can execute HTML Report using RunHtReport function.
function RunHTReport(Report, ContexXML: string): string;
Report parameter contains report text and ContextXML can be used for passing additional parameters to report.
Example:
s:='<report-objects><object name="cust" '+
'sql="select * from customer where upper(company) like ''%%{{SEARCH}}%%'' order by company"/>'+
'</report-objects>'+
'{{#cust.ROWDATA}}'+
'<p><i class="fa fa-user"/> <a href="#">{{COMPANY}}</a></p>'+
'{{/cust.ROWDATA}}';
Res := RunHtReport(s, '<CONTEXT SEARCH="ab"/>');