How to using it in PHP?

Hello to you

I'm using VB6 with FastReport for COM/ActiveX

In VB6, I Write simple code as shown below :
Dim report As TfrxReport
Dim export As IfrxBuiltinExports

Private Sub Form_Load()
Set report = CreateObject("FastReport.TfrxReport")
End Sub

Private Sub Command1_Click()
report.LoadReportFromFile ("d:/rptmember.fr3")
report.PrepareReport (True)
Set export = report
export.ExportToPDF "d:/demo.pdf", False, False, False, False, "", ""

End Sub

The above code is work well in VB6

My questions is How to translate it into PHP?

I tried but still not works, as shown
<?php
$report= New COM("FastReport.TfrxReport");
$export= New COM("FastReport.TfrxDispatchableExports");

$report->LoadReportFromFile("d:/rptmember.fr3");
$report->PrepareReport(True);
Set export = report
$export->ExportToPDF("d:/demo.pdf", False, False, False, False, "", "");


$len = filesize("d:/demo.pdf");
header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=d:/demo.pdf");
readfile("d:/demo.pdf");
?>

Please advice and correct my code

Thanks & Regards,
Steven

Comments

  • edited 8:19AM
    Is it possible to build the page tables are fixed, and the table reports the number of fields is not? >

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.