?
Solved

writing cfquery resultset to file

Posted on 2004-04-06
13
Medium Priority
?
423 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 80 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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 80 total points
ID: 10802053
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

777 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