note 68208 modified in ref.com by danbrown

From: Date: Mon, 21 Dec 2009 17:05:58 +0000
Subject: note 68208 modified in ref.com by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164198@lists.php.net to get a copy of this message
For use parameters with PHP this is a Code Example <?php $ObjectFactory= New COM("CrystalReports11.ObjectFactory.1"); $crapp = $ObjectFactory->CreateObject("CrystalDesignRunTime.Application"); $creport = $crapp->OpenReport("//report1.rpt", 1); $z= $creport->ParameterFields(1)->SetCurrentValue("Mango"); $z= $creport->ParameterFields(2)->SetCurrentValue(5000); $creport->ExportOptions->DiskFileName="reportin.pdf"; $creport->ExportOptions->PDFExportAllPages=true; $creport->ExportOptions->DestinationType=1; $creport->ExportOptions->FormatType=31; $creport->Export(false); $len = filesize("reportin.pdf"); header("Content-type: application/pdf"); header("Content-Length: $len"); header("Content-Disposition: inline; filename=reportin.pdf"); readfile("reportin.pdf"); ?> --was-- For use parameters with PHP this is a Code Example $ObjectFactory= New COM("CrystalReports11.ObjectFactory.1"); $crapp = $ObjectFactory->CreateObject("CrystalDesignRunTime.Application"); $creport = $crapp->OpenReport("//report1.rpt", 1); $z= $creport->ParameterFields(1)->SetCurrentValue("Mango"); $z= $creport->ParameterFields(2)->SetCurrentValue(5000); $creport->ExportOptions->DiskFileName="reportin.pdf"; $creport->ExportOptions->PDFExportAllPages=true; $creport->ExportOptions->DestinationType=1; $creport->ExportOptions->FormatType=31; $creport->Export(false); $len = filesize("reportin.pdf"); header("Content-type: application/pdf"); header("Content-Length: $len"); header("Content-Disposition: inline; filename=reportin.pdf"); readfile("reportin.pdf"); http://php.net/manual/en/ref.com.php

« previous php.notes (#164198) next »