exporting data to Word with Coldfusion

Discussion in 'Programming' started by h_c, Aug 25, 2010.

  1. #1
    Saw the link at

    irt.org/articles/js154/index.htm which explains how to do it.


    But, my need is a bit more than what is shown.


    I have to run a query and based on results of it decide what should be a row title, then display its value. Something like


    <cfquery name="getDepartments" datasource="#Application.ds#">
    SELECT *
    FROM departments
    WHERE deptID = '#form_data.deptID#'
    </cfquery>


    then


    <table width="100%" border="1" rules="all" cellpadding="5px" cellspacing="0px" style="width:100%; font-family:Arial, Helvetica, sans-serif; font-size:12px;">
    <tr>
    <td style="font-family:Arial; font-size:12px;"><b>


    <cfif getDepartments.DEPT_TYPE is 'AP'>
    Corporate
    <cfelse>
    Retail
    </cfif>
    :</b>
    <br>


    This does not work using the method shown at the link irt.org/articles/js154/index.htm


    How can I achieve what I want? I am using Coldfusion 8 and we will not be getting version 9 in the near future.


    Any advice would be welcome.
     
    Last edited: Aug 25, 2010
    h_c, Aug 25, 2010 IP