Solved

writing cfquery resultset to file

Posted on 2004-04-06
13
410 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
 
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now