Solved

writing cfquery resultset to file

Posted on 2004-04-06
13
421 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

687 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