Solved

writing cfquery resultset to file

Posted on 2004-04-06
13
412 Views
Last Modified: 2013-12-24
Hello CFML Developers..
Iam using cfml for generating reports for my application.
Some of the reports return huge number of records which I cant display on browser for printing.(above 20k).So, I was trying to write the cfquery resultset to a pdf file..for which I could not find any tool to do so.
Now..Iam thinking if I could send the cfquery resultset to a html file.
so that I could conver to pdf format later..
Could someone please help me in doing this..
thanks in advance..

0
Comment
Question by:sridhar_don
  • 3
  • 3
  • 2
  • +3
13 Comments
 
LVL 17

Expert Comment

by:Tacobell777
ID: 10771895
If your using MS SQL use DTS to export the result to an Excel file or CSV file.

If you want to write the query result to a file you would want to use wddx and convert it to a WDDX package, or you could create an XML file out of it and transform it with XSL.

Do these reports need to be run by the user or just you the developer? if just you, why not run the query in Query Analyzer and from there save the result to a CSV file?

0
 
LVL 17

Accepted Solution

by:
anandkp earned 20 total points
ID: 10772513
u cld use

1. HTML2PDF [http://www.downseek.com/download/24150.asp]
2. CFX_PDF   [http://devscripts.com/viewscript.php?sId=2399]

hth

K'Rgds
Anand
0
 

Author Comment

by:sridhar_don
ID: 10772616
Thanks bell,
the database Iam using is Oracle9i and reports are run by user,
Could u be more clear...plz.


Thanks Mr.Anand but..
The URL for  HTML2PDF is not found
The URL for CFX_PDF says "Script not found go back"
Please help me in this regard..
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 17

Expert Comment

by:anandkp
ID: 10773009
well thats weird ... i had confirmed the links ...

do one thing -

search for the keywords [HTML2PDF + Download] & [CFX_PDF + Download] in google from ur place ... it shld give u the links to download.

let me know ...
0
 
LVL 6

Expert Comment

by:PE_CF_DEV
ID: 10774478
The links are puting a ] at the end just copy the shortcut into a new window and delete the ] :)
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10775950
A good idea when posting links is to put a space before and after the link so it is separated from other characters...
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 10778699
if you are still wanting to "write to html"


you can do something like this


template.cfm
<cfinclude template="../qry/qry_MyQuery.cfm">
<CFPROCESSINGDIRECTIVE SUPPRESSWHITESPACE="Yes">
<cfoutput query="MyQuery">
#MyQuery.Value1#<br>
#MyQuery.value2#<br>
#MyQuery.value3#<br>
<!--- and what ever else html formatting you want --->
</cfoutput>
</CFPROCESSINGDIRECTIVE>

PageGen.cfm

<cfhttp url="http://10.10.10.180/PageGen/template/template.cfm" method="GET" path="C:\Pages\" file="MyReport.html">

<cfdirectory action="LIST" directory="C:\Pages\" name="MynewFiles" filter="*.html">       
<cfoutput query="myNewfiles">
<div align="center"><font size="+1">Processed File:<strong> #mynewfiles.name#....</strong></font></font></div>
</cfoutput>







0
 

Author Comment

by:sridhar_don
ID: 10790803
thanks everyone for the response..
I found a tool called cfx_pdf which does the job for me.
But Iam facing problem with placing headers,footers and page breaks for each printed page.It seems there is no direct tag available in the API given.
Could anybody who have used cfx_pdf  help me in this regard.
Thanks in advance.
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10793463
Here is a link to the user guide for CFX_PDF.

Maybe it will help : http://www.easel2.com/CFXPDFUserGuide.pdf
0
 

Author Comment

by:sridhar_don
ID: 10795522
hello rich,
yah..I referred it already.. It seems currently they dont provide any headers/footers and pagebreaks.
Could u suggest any alternatives to do that..
thanks in advance.
regards
sridhar
0
 
LVL 35

Assisted Solution

by:mrichmon
mrichmon earned 20 total points
ID: 10802053
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question