The rendering of <cfdocument format="pdf"> takes FOREVER.
I have tried using a progressbar and <cfflush> but the document just doesn't render fast enough.
Any suggestions?
<!--- Code Begins --->
<cfquery name="qryClassDetail" datasource="#session.connString#">
SELECT tblParts.PartID, tblParts.Description, tblParts.Price, tblParts.Unitofmeasure, tblParts.resale, tblParts.NetPricing, tblClass.class AS Class,
tblClass.Description AS classDescription
FROM tblParts INNER JOIN
tblClass ON tblParts.class = tblClass.class
WHERE (tblParts.resale = 'y') AND (tblParts.Price <> '0') AND (tblParts.PartID NOT LIKE '%BLANK%') AND (tblParts.class NOT LIKE '%2') AND (tblParts.class <> 'DBME') AND (tblParts.class <> 'ELE') AND
(tblParts.class <> 'RMB') AND (tblParts.class <> 'SCC') AND (tblParts.class <> 'TP') AND (tblParts.class <> 'MISC') AND (tblParts.class <> 'M&C')
GROUP BY tblClass.class, tblParts.PartID, tblParts.Description, tblParts.Price, tblParts.Unitofmeasure, tblParts.resale, tblParts.NetPricing,
tblClass.Description
ORDER BY tblClass.class
</cfquery>
<body bgcolor="#FFFFFF" leftmargin="65">
<h3>Please Wait</h3><br>
The pages are loading...<br>
<img name="meter" width="200" height="16" src="../images/progressbar/PercentBlank.gif" border="0" alt="">
<cfflush>
<cfloop from="0" to="100" step="25" index="i">
<cfdocument format="pdf">
<table cellpadding="1" cellspacing="0" border="0" width="620">
<cfoutput query="qryClassDetail" group="Class">
<tr><td colspan="4"> </td></tr>
<tr bgcolor="##4E8FD1">
<td colspan="4"><font color="##F2F2F2"><h3> #classDescription#</h3></font></td>
</tr>
<tr bgcolor="##CCCCCC">
<td width="140"><strong> Image</strong></td>
<td width="100"><strong>PartID</strong></td>
<td width="328"><strong>Description</strong></td>
<td align="center" width="52"><strong>Retail</strong></td>
</tr>
<cfoutput>
<cfif qryClassDetail.resale NEQ "n">
<cfset PartID = trim(qryClassDetail.PartID)>
<cfset netPrice=qryClassDetail.netPricing>
<tr>
<td align="left">
<img height="40" src="../images/parts/#trim(PartID)#.jpg" border="0">
</td>
<td> #PartID#</font></td>
<td>
#qryClassDetail.Description# (#trim(qryClassDetail.UnitofMeasure)#)
</td>
<td align="right">
#NumberFormat(qryClassDetail.price,'______.__')#
<cfif netPrice EQ "n">
<br />
<font style="text-align:right">(net)</font>
</cfif>
</td>
</tr>
</cfif>
</cfoutput>
</cfoutput>
</table>
</cfdocument>
<cfoutput>
<script language="javascript">
document.images["meter"].src = '../images/progressbar/Percent#i#.gif';
</script>
</cfoutput>
<cfflush>
</cfloop>
Our community of experts have been thoroughly vetted for their expertise and industry experience.