I'm wanting to export the same result page to a flat file with out recreating the query to accomodate to ASCII formating.
First, some history on what I am doing:
I have a report that has an option to allow the individual to export the results to a flat file. What happens on the back end is that the same query is run BUT if the is_download is 1 executes the following two lines:
<cfheader name="content-disposition" value="Inline; filename=AddressLabels.txt">
<cfcontent type="application/unknown" reset="Yes">
I use the 'application/unknown' so that it brings up the 'save as' option instead of displaying the results on the page. Everything works fine.
Here is my dilemma:
I have now been given the task to repeat the process accross ALL our reports (over 50). This can take a long time in that I will now need to create an entire sepatate query in order to get the output to diplay in straight ASCII text. I'm wondering if there is an easier way to accomplish this rather than having me create a whole new query/format layout if the is_download option is selected.
Ideally, if I could just have the above two lines selected and then output the format with all backend html/cf logic code stripped/removed that would accomplish my task.
Otherwise, I'll be quite busy for the next few weeks tweaking this <cfoutput> to work !
If anyone could provide any examples, assistance or any other reference points that would help me I'd GREATLY appreciate it!!