|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Using ColdFusion variable in cfdocument filename
Hello everyone,Dirk Dinnewet 07/03/08 08:37 A Yep ;)Dominic Watson 07/03/08 08:51 A Dominic, thanks for the quick and concise answer. One learnsDirk Dinnewet 07/04/08 05:10 A Hello everyone, Maybe it's obvious, but I'd like to include the #URL.klopper# variable in my filename atribute when using cfdocument, so as to generate a document for this specific page. (Pseudo) could would be something like filename="c:\<cfoutput>#klopper#</cfoutput>.pdf" Is this doable ? Fyi I'm using MX7 not CF8 so, filesaveas is not (yet) an option. Regards, Dirk ---------------------------------------------------------------------- <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html> <head> <cfset klopper = #URL.klopper#> <cfset slachtdatum = #URL.slachtdatum#> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <cfdocument format="pdf" backgroundvisible="yes" unit="cm" fontembed="yes" filename="c:\slachtresultaten.pdf" overwrite="yes"> <cfinclude template="leveringen_detail_print.cfm"> </cfdocument> </head> <body> </body> </html> <cfdump var="#klopper#"> ------------------------------------------------------------------------------ Yep ;) <cfset VARIABLES.klopper = URL.klopper> <cfset VARIABLES.slachtdatum = URL.slachtdatum> <cfset VARIABLES.dateiname = "C:\#URL.klopper#.pdf"> <cfdocument format="pdf" backgroundvisible="yes" unit="cm" fontembed="yes" filename="#VARIABLES.dateiname#" overwrite="yes"> <cfinclude template="leveringen_detail_print.cfm"> </cfdocument> Have a search for tutorials on using variables in ColdFusion; there are several ways to do this and they are all fundamental to programming in CF (the problem is very easy when you have a solid understanding of how CF uses variables). HTH (and that dateiname = filename, my German sucksen) Dominic -- Blog it up: http://fusion.dominicwatson.co.uk Dominic, thanks for the quick and concise answer. One learns every day. ----- Excess quoted text cut - see Original Post for more -----
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||