CF8 bug - cfswitch/cfcase

I've come across a coldfusion bug with some existing code
after upgrading to coldfusion 8. I have 5 pages each with a set of
cfcase's inside a cfswitch. Right after upgrading to cf 8 they all
gave me the following error: Context validation error for the
cfcase tag.
The cfswitch tag has a duplicate cfcase tag for value {ts
'1900-01-04 00:00:00'}.
ColdFusion cannot determine the line of the template that
caused this error. This is often caused by an error in the
exception handling subsystem.
I started troubleshooting by commenting out certain cfcase
statements and found that in every case it was caused by a cfcase
that had a value of "5f" or "3f" or "22f" - always the one with "f"
in it. All I have to do to fix it and get my pages running again is
change that cfcase value to "5g" or basically anything other than
"f". Its really annoying because I have to run back through all my
code and change the mode variables which are passing the "f" values
around, but I was wondering if anyone had any clue how to fix this?
Thanks,
Davey

This works fine here:
<cfparam name="URL.test" default="1" type="any">
<cfswitch expression="#URL.test#">
<cfcase value="1">
<p>it was one</p>
</cfcase>
<cfcase value="2">
<p>it was two</p>
</cfcase>
<cfcase value="3f">
<p>it was 3f</p>
</cfcase>
</cfswitch>
<p><a
href="test.cfm?test=1">One</a></p>
<p><a
href="test.cfm?test=2">Two</a></p>
<p><a href="test.cfm?test=3f">Three
F</a></p>
Ken Ford
Adobe Community Expert - Dreamweaver
Fordwebs, LLC
http://www.fordwebs.com
"Dstharding" <[email protected]> wrote in
message
news:fnfv5s$p3o$[email protected]..
> I've come across a coldfusion bug with some existing
code after upgrading
> to
> coldfusion 8. I have 5 pages each with a set of cfcase's
inside a
> cfswitch.
> Right after upgrading to cf 8 they all gave me the
following error:
> Context
> validation error for the cfcase tag.
> The cfswitch tag has a duplicate cfcase tag for value
{ts '1900-01-04
> 00:00:00'}.
>
> ColdFusion cannot determine the line of the template
that caused this
> error.
> This is often caused by an error in the exception
handling subsystem.
>
> I started troubleshooting by commenting out certain
cfcase statements and
> found that in every case it was caused by a cfcase that
had a value of
> "5f" or
> "3f" or "22f" - always the one with "f" in it. All I
have to do to fix it
> and
> get my pages running again is change that cfcase value
to "5g" or
> basically
> anything other than "f". Its really annoying because I
have to run back
> through
> all my code and change the mode variables which are
passing the "f" values
> around, but I was wondering if anyone had any clue how
to fix this?
>
> Thanks,
> Davey
>

Similar Messages

  • CF8 with JBoss JNDI datasource

    After installing and configuring a CF8 for J2EE running on
    JBoss 4.2.2.GA with Java 6, I have created a JNDI datasource for
    Oracle 10g in the oracle-ds.xml file. I have configured a CF8
    datasource that uses the JNDI resource.
    Any query that is NOT using cfqueryparam works quite well.
    As soon as cfqueryparam is used, I get an "Error casting an
    object of type org.jboss.resource.adapter.jdbc.WrappedConnection
    cannot be cast to coldfusion.server.j2ee.sql.JRunConnectionHandle
    to an incompatible type.".
    The configuration and the exception is pretty much the same
    as described in
    Problem
    description.
    This is clearly a CF8 bug and I was wondering if there is any
    known workaround for it.

    In web.xml making the following entry:
    <web-app>
    <description>MySQL Test App</description>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/test</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    Next, add a file jboss-web.xml under WEB-INF/ folder of the web-application. This file should contain entry as:
    <jboss-web>
    <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/test</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <jndi-name>java:/jdbc/test</jndi-name>
    <res-auth>Container</res-auth>
    </resource-ref>
    </jboss-web>
    Next, in JBOSS_HOME/server/default/deploy folder make a xx-ds.xml file or else, a similiar file can be found in that same folder with the name hsqldb-ds.xml. Make following entries in that xml file:
    <datasources>
    <local-tx-datasource>
    <jndi-name>/jdbc/test</jndi-name>
    <type-mapping>MySQL</type-mapping>
    <connection-url>jdbc:mysql://localhost:3306/shopping_cart</connection-url>
    <driver-class>com.mysql.jdbc.Driver</driver-class>
    <user-name>root</user-name>
    <password>root123</password>
    <min-pool-size>1</min-pool-size>
    <max-pool-size>5</max-pool-size>
    </local-tx-datasource>
    This should bind the jndi name.
    In our client application, we need to look up as:
    Context ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("java:/jdbc/test");
    Connection conn = ds.getConnection();
    This works perfectly.

  • Why setting var in CFFUNCTION causes error

    As far as my knowledge goes, the BEST practise when setting
    local variable inside a CFFUNCTION is to use the word "var" in
    front of the variable name, for example: <CFSET var
    myVariable="whatever">
    I'm doing it now and all I get is an error message saying:
    Error invoking CFC name_of_cfc:local variable myVariable on
    line 60 must be grouped at the top of the function body!
    I'm using CF8 and I need to use cfswitch within the
    cffunction, so when I do <cfcase value="SomeValue"><cfset
    var myVariable="TheValue"></cfcase> etc I got that error.
    When I tested with just CFSET var MyVariable="TheVariable"
    with no cfswitch/cfcase I still get that error
    when I took out the word "var" from cfset, I have no error, I
    put these variables directly after my cfarguments. Does anyone know
    why this is happening to me?
    I thought if I don't use the "var" word for my variable set
    within cffunction there will be possibilities when later on setting
    up another variables outside this function and if the name happen
    to be the same, will override each other and causing disaster to my
    application.
    Please help!!

    mega_L wrote:
    > As far as my knowledge goes, the BEST practise when
    setting local variable
    > inside a CFFUNCTION is to use the word "var" in front of
    the variable name, for
    > example: <CFSET var myVariable="whatever">
    Yes, this is the best practice to make the variable local to
    the
    function. But you only need to use the var keyword once when
    you define
    the variable. And you must define the local variables with
    the var
    keyword at the very beginning of the function body. The only
    content
    allowed before this happens are the argument definitions,
    i.e. the
    <cfargument ...> tags.
    If you have a variable that you don't need to use, you just
    need to
    define it with a default and|or dummy value in the beginning
    of the
    function. Then you can set it's value appropriately later in
    the
    function when it is required. This is often done with query
    tag return
    variables.
    I.E.
    <cffunction name="myQryFunction"...>
    <cfargument name="someArgument"...>
    <cfset var localQry = "">
    <cfquery name="localQry"...>
    SQL
    </cfquery>
    <cfreturn localQery>
    </cffunction>
    Because of this necessity to define all local variables at
    the beginning
    of the function, a lot of developers use a standard where
    they define a
    local structure. They can then just append new keys and
    values to this
    local structure throughout the function. Personally I don't
    see much
    advantage to doing this, but to each his|her own.
    I.E.
    <cffunction name="myQryFunction"...>
    <cfargument name="someArgument"...>
    <cfset var local = structNew()>
    <cfset local.something = "FooBar">
    <cfreturn local.something>
    </cffunction>

  • Change he font size in html

    Hello
    how do i cange the font size of the
    <td>#CurrentRow#</td>
    <Td>#CASE_NBR#</td>
    <td>#dateformat(CRTN_DT,"mm/dd/yyyy")#</td>
    to bold and size arial 10?
    and how do i change the font size:
    <th>Record Number</th>
    <th width="120">Case Number</th>
    <TH>Creation Date</TH>
    to to bold and size arial 8?
    or smaller than what it currently displaying?
    also is there a better way?
    thanks
    <cfquery name="getCityWideCases" datasource="cts9i">
    SELECT
    --PROP.STR_NBR
    --,PROP.STR_FRAC_NBR
    --,PROP.STR_FRAC_NBR_RNG_END
    --,PROP.STR_DIR_CD
    PROP.STR_NM
    --,PROP.STR_SFX_CD
    --,PROP.STR_SFX_DIR_CD
    --,PROP.STR_UNIT_TYP_CD
    --,PROP.UNIT_NBR
    --,PROP.PROP_ID
    --,PROP.ZIP_CD
    ,CASE.CASE_NBR
    --,CASE.CASE_ID
    --,CASE.CASE_TYP_CD
    ,CASE.CRTN_DT
    --,APLC.PROJ_DESC_TXT
    --,TYP.CASE_TYP_DESC
    FROM
    CTS.TLA_PROP PROP
    ,CTS.TLOC L
    ,CTS.TCASE CASE
    --,CTS.TAPLC APLC
    --,CTS.TREF_CASE_TYP TYP
    WHERE
    PLAN_AREA_NBR = '1'
    AND L.LOC_ID = PROP.PROP_ID
    AND CASE.APLC_ID = L.APLC_ID
    AND PROP.STR_NM != 'TEST'
    --AND CASE.PARNT_CASE_ID IS NULL
    ORDER BY
    <cfswitch expression="#Form.orderBy#">
    <cfcase value="CASENUMBER">
    CASE.CASE_NBR
    </cfcase>
    <cfcase value="CREATIONDATE">
    CASE.CRTN_DT
    </cfcase>
    </cfswitch>
    </cfquery>
    <!---html report--->
    <cfswitch expression="#Form.outputFormat#">
    <cfcase value="HTML,PDF">
    <cfsavecontent variable="htmlData">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Citywide Cases Report</title>
    </head>
    <style type="text/css">
    td{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    th{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    font-weight:bold;
    background-color:#FFFF99;
    h2{
    font-family:Arial, Helvetica, sans-serif;
    font-size:14px;
    h3{
    font-family:Arial, Helvetica, sans-serif;
    font-size:15px;
    </style>
    <body>
    <cfoutput>
    <table border="0" cellpadding="3" cellspacing="0">
    <tr>
    <td align="center">
    <h3>Citywide Cases
    Report</h3><br><br></td>
    </tr>
    <tr>
    <td align="center">
    </h2>Your query returned #getCityWideCases.RecordCount#
    records</h2></td>
    </tr>
    <tr>
    <td>
    <table border="2" cellpadding="2" cellspacing="0">
    <tr>
    <th>Record Number</th>
    <th width="120">Case Number</th>
    <TH>Creation Date</TH>
    </tr>
    <cfloop query="getCityWideCases">
    <tr bgcolor="<cfif currentrow mod
    2>GHOSTWHITE<cfelse>WHITE</cfif>">
    <td>#CurrentRow#</td>
    <Td>#CASE_NBR#</td>
    <td>#dateformat(CRTN_DT,"mm/dd/yyyy")#</td>
    </tr>
    </cfloop>
    </table>
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>
    </cfoutput>
    </cfsavecontent>
    <cfswitch expression="#Form.outputFormat#">
    <cfcase value="HTML">
    <cfoutput>
    #htmldata#
    </cfoutput>
    </cfcase>
    <cfcase value="PDF">
    PDF
    <cfdocument format="pdf">
    <cfoutput>
    #htmldata#
    </cfoutput>
    </cfdocument>
    </cfcase>
    </cfswitch>
    </cfcase>
    <cfcase value="CSV">
    <CFHEADER NAME="Content-Disposition" VALUE="attachment;
    filename=citywide.csv">
    <cfcontent type="application/msexcel">"Case
    Number","Creation Date"
    <cfoutput
    query="getCityWideCases">#ltrim(CASE_NBR)#,"#dateformat(CRTN_DT,"mm/dd/yyyy")#"
    </cfoutput>
    <cfabort>
    </cfcase>
    </cfswitch>
    <cfquery name="getCityWideCases" datasource="cts9i">
    SELECT
    --PROP.STR_NBR
    --,PROP.STR_FRAC_NBR
    --,PROP.STR_FRAC_NBR_RNG_END
    --,PROP.STR_DIR_CD
    PROP.STR_NM
    --,PROP.STR_SFX_CD
    --,PROP.STR_SFX_DIR_CD
    --,PROP.STR_UNIT_TYP_CD
    --,PROP.UNIT_NBR
    --,PROP.PROP_ID
    --,PROP.ZIP_CD
    ,CASE.CASE_NBR
    --,CASE.CASE_ID
    --,CASE.CASE_TYP_CD
    ,CASE.CRTN_DT
    --,APLC.PROJ_DESC_TXT
    --,TYP.CASE_TYP_DESC
    FROM
    CTS.TLA_PROP PROP
    ,CTS.TLOC L
    ,CTS.TCASE CASE
    --,CTS.TAPLC APLC
    --,CTS.TREF_CASE_TYP TYP
    WHERE
    PLAN_AREA_NBR = '1'
    AND L.LOC_ID = PROP.PROP_ID
    AND CASE.APLC_ID = L.APLC_ID
    AND PROP.STR_NM != 'TEST'
    --AND CASE.PARNT_CASE_ID IS NULL
    ORDER BY
    <cfswitch expression="#Form.orderBy#">
    <cfcase value="CASENUMBER">
    CASE.CASE_NBR
    </cfcase>
    <cfcase value="CREATIONDATE">
    CASE.CRTN_DT
    </cfcase>
    </cfswitch>
    </cfquery>
    <!---html report--->
    <cfswitch expression="#Form.outputFormat#">
    <cfcase value="HTML,PDF">
    <cfsavecontent variable="htmlData">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Citywide Cases Report</title>
    </head>
    <style type="text/css">
    td{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    th{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    font-weight:bold;
    background-color:#FFFF99;
    h2{
    font-family:Arial, Helvetica, sans-serif;
    font-size:14px;
    h3{
    font-family:Arial, Helvetica, sans-serif;
    font-size:15px;
    </style>
    <body>
    <cfoutput>
    <table border="0" cellpadding="3" cellspacing="0">
    <tr>
    <td align="center">
    <h3>Citywide Cases
    Report</h3><br><br></td>
    </tr>
    <tr>
    <td align="center">
    </h2>Your query returned #getCityWideCases.RecordCount#
    records</h2></td>
    </tr>
    <tr>
    <td>
    <table border="2" cellpadding="2" cellspacing="0">
    <tr>
    <th>Record Number</th>
    <th width="120">Case Number</th>
    <TH>Creation Date</TH>
    </tr>
    <cfloop query="getCityWideCases">
    <tr bgcolor="<cfif currentrow mod
    2>GHOSTWHITE<cfelse>WHITE</cfif>">
    <td>#CurrentRow#</td>
    <Td>#CASE_NBR#</td>
    <td>#dateformat(CRTN_DT,"mm/dd/yyyy")#</td>
    </tr>
    </cfloop>
    </table>
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>
    </cfoutput>
    </cfsavecontent>
    <cfswitch expression="#Form.outputFormat#">
    <cfcase value="HTML">
    <cfoutput>
    #htmldata#
    </cfoutput>
    </cfcase>
    <cfcase value="PDF">
    PDF
    <cfdocument format="pdf">
    <cfoutput>
    #htmldata#
    </cfoutput>
    </cfdocument>
    </cfcase>
    </cfswitch>
    </cfcase>
    <cfcase value="CSV">
    <CFHEADER NAME="Content-Disposition" VALUE="attachment;
    filename=citywide.csv">
    <cfcontent type="application/msexcel">"Case
    Number","Creation Date"
    <cfoutput
    query="getCityWideCases">#ltrim(CASE_NBR)#,"#dateformat(CRTN_DT,"mm/dd/yyyy")#"
    </cfoutput>
    <cfabort>
    </cfcase>
    </cfswitch>

    For the mail app specifically, you can't. You can set font size for the system overall in accessiblity (Settings app > General > Accessibility > Large Text), but this will not impact some emails (such as those using graphics).

  • Csv/excel not showing vertical .  it is displaying horizontally plus

    hi i have this code that displays html, pdf or csv/excel
    download.
    htmll report and pdf is ok but the csv/excel download
    displays/ works but
    it shows accross instead of down.
    on my html to csv it is not dispalying vertically /down and
    it shows the html on the excel download
    also
    per cel it has both the plotid and the ceenum. it displays
    horizontally.
    Help
    Thanks in advance.
    <!-------------------- here are the code in 2 .cfm pages.
    here is the first page where the user selects
    html
    pdf
    escel/csv----------then it goes to a action page act_lop.cfm
    <h1>LOP Reports </h1>
    <div align="center">
    <form name="theForm" action="act_lop.cfm"
    method="post"><BR />
    Sorted by:  
    <select name="Orderby" size="1">
    <option value="CEEnum">CEE num</option>
    <option value="Plot">plot No</option>
    </select>
    <br />
    <br />
    Output Format:
    <input type="radio" name="outputFormat" value="HTML"
    checked="checked" />
    HTML  
    <input type="radio" name="outputFormat" value="PDF" />
    PDF  
    <input type="radio" name="outputFormat" value="CSV" />
    Download/Open Excel Spreadsheet <BR />
    <br />
    <input name="Submit" type="Submit" value="Generate Report"
    />
    <BR />
    <BR />
    <BR />
    </form>
    </div>
    </body>
    </html>
    <!--------- act_lop.cfm the action page. Html and pdf is
    working ok but the problem is the excel sheet.
    <cfquery name="getlop" datasource="oracdb10">
    select
    tabTee.CEEnum,
    tabTee.Plot,
    FROM
    tabTee
    ORDER BY
    <cfswitch expression="#Form.orderBy#">
    <cfcase value="CEEnum">
    tabTee.CEEnum
    </cfcase>
    <cfcase value="Plot">
    tabTee.Plot
    </cfcase>
    </cfswitch>
    </cfquery>
    <!---html report--->
    <cfswitch expression="#Form.outputFormat#">
    <cfcase value="HTML,PDF">
    <cfsavecontent variable="htmlData">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>lop</title>
    </head>
    <style type="text/css">
    td{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    th{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    font-weight:bold;
    background-color:#FFFF99;
    h2{
    font-family:Arial, Helvetica, sans-serif;
    font-size:14px;
    h3{
    font-family:Arial, Helvetica, sans-serif;
    font-size:15px;
    </style>
    <body>
    <cfoutput>
    <table border="0" cellpadding="3" cellspacing="0">
    <tr>
    <td align="center">
    <h3>lop</h3><br><br></td>
    </tr>
    <tr>
    <td align="center">
    </h2>Your report returned #getlop.RecordCount#
    records</h2></td>
    </tr>
    <tr>
    <td>
    <table border="2" cellpadding="2" cellspacing="0">
    <tr>
    <th>Record Number</th>
    <th width="120">CEE num</th>
    <TH>plot No</TH>
    </tr>
    <cfloop query="getlop">
    <tr bgcolor="<cfif currentrow mod
    2>GHOSTWHITE<cfelse>WHITE</cfif>">
    <td>#CurrentRow#</td>
    <Td>#CEEnum#</td>
    <td>#Plot#</td>
    </tr>
    </cfloop>
    </table>
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>
    </cfoutput>
    </cfsavecontent>
    <cfswitch expression="#Form.outputFormat#">
    <cfcase value="HTML">
    <cfoutput>
    #htmldata#
    </cfoutput>
    </cfcase>
    <cfcase value="PDF">
    PDF
    <cfdocument format="pdf">
    <cfoutput>
    #htmldata#
    </cfoutput>
    </cfdocument>
    </cfcase>
    </cfswitch>
    </cfcase>
    <cfcase value="CSV">
    <CFHEADER NAME="Content-Disposition" VALUE="attachment;
    filename=lop.csv">
    <cfcontent type="application/msexcel">"Cee Num","plot
    No"
    <cfoutput query="getlop"> #ltrim(CeeNum)#, #PLOT#
    </cfoutput>
    <cfabort>
    </cfcase>
    </cfswitch>
    <!-----------here is the las page
    ------------------------csv---------------------------->
    <cfquery name="getlop" datasource="oracdb10">
    select
    tabTee.CEEnum,
    tabTee.Plot,
    FROM
    tabTee
    ORDER BY
    tabTee.CEEnum
    </cfquery>
    <CFHEADER NAME="Content-Disposition" VALUE="attachment;
    filename=lop.csv">
    <cfcontent type="application/msexcel">"CEE num","plot
    No"
    <cfoutput query="getlop">#CEEnum#,#Plot#
    </cfoutput>

    CSV interpreted format expects a carriage return/line feed at
    the end of the row. Try
    <cfcontent type="application/msexcel">
    "CEE num","plot
    No"<cfoutput>#chr(13)&chr(10)#</cfoutput>
    <cfoutput
    query="getlop">#CEEnum#,#Plot##chr(13)&chr(10)#
    </cfoutput>
    HTH,

  • Pdf/convert html to pdf butoon option

    Hello I have 2 pages menu page and act_citywide
    Menu page has a menu to select pdf or other 2 option. and a
    button.
    Act_citywide has the query and action.
    I wish to create a button that will have a convert to pdf as
    opposed to these option of radio buttons and button.
    What do I add to this program and where?
    thanks or maybe just add another button that will convert to
    pdf
    Thanks
    Menu Page
    <cfquery name="getCityWideCases" datasource="cts9i">
    SELECT
    --PROP.STR_NBR
    --,PROP.STR_FRAC_NBR
    --,PROP.STR_FRAC_NBR_RNG_END
    --,PROP.STR_DIR_CD
    PROP.STR_NM
    --,PROP.STR_SFX_CD
    --,PROP.STR_SFX_DIR_CD
    --,PROP.STR_UNIT_TYP_CD
    --,PROP.UNIT_NBR
    --,PROP.PROP_ID
    --,PROP.ZIP_CD
    ,CASE.CASE_NBR
    --,CASE.CASE_ID
    --,CASE.CASE_TYP_CD
    ,CASE.CRTN_DT
    --,APLC.PROJ_DESC_TXT
    --,TYP.CASE_TYP_DESC
    FROM
    CTS.TLA_PROP PROP
    ,CTS.TLOC L
    ,CTS.TCASE CASE
    --,CTS.TAPLC APLC
    --,CTS.TREF_CASE_TYP TYP
    WHERE
    PLAN_AREA_NBR = '1'
    AND L.LOC_ID = PROP.PROP_ID
    AND CASE.APLC_ID = L.APLC_ID
    AND PROP.STR_NM != 'TEST'
    --AND CASE.PARNT_CASE_ID IS NULL
    ORDER BY
    <cfswitch expression="#Form.orderBy#">
    <cfcase value="CASENUMBER">
    CASE.CASE_NBR
    </cfcase>
    <cfcase value="CREATIONDATE">
    CASE.CRTN_DT
    </cfcase>
    </cfswitch>
    </cfquery>
    <!---html report--->
    <cfswitch expression="#Form.outputFormat#">
    <cfcase value="HTML,PDF">
    <cfsavecontent variable="htmlData">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Citywide Cases Report</title>
    </head>
    <style type="text/css">
    td{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    th{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    font-weight:bold;
    background-color:#FFFF99;
    h2{
    font-family:Arial, Helvetica, sans-serif;
    font-size:14px;
    h3{
    font-family:Arial, Helvetica, sans-serif;
    font-size:15px;
    </style>
    <body>
    <cfoutput>
    <table border="0" cellpadding="3" cellspacing="0">
    <tr>
    <td align="center">
    <h3>Citywide Cases
    Report</h3><br><br></td>
    </tr>
    <tr>
    <td align="center">
    </h2>Your query returned
    #getCityWideCases.RecordCount# records</h2></td>
    </tr>
    <tr>
    <td>
    <table border="2" cellpadding="2" cellspacing="0">
    <tr>
    <th>Record Number</th>
    <th width="120">Case Number</th>
    <TH>Creation Date</TH>
    </tr>
    <cfloop query="getCityWideCases">
    <tr bgcolor="<cfif currentrow mod
    2>GHOSTWHITE<cfelse>WHITE</cfif>">
    <td>#CurrentRow#</td>
    <Td>#CASE_NBR#</td>
    <td>#dateformat(CRTN_DT,"mm/dd/yyyy")#</td>
    </tr>
    </cfloop>
    </table>
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>
    </cfoutput>
    </cfsavecontent>
    <cfswitch expression="#Form.outputFormat#">
    <cfcase value="HTML">
    <cfoutput>
    #htmldata#
    </cfoutput>
    </cfcase>
    <cfcase value="PDF">
    PDF
    <cfdocument format="pdf">
    <cfoutput>
    #htmldata#
    </cfoutput>
    </cfdocument>
    </cfcase>
    </cfswitch>
    </cfcase>
    <cfcase value="CSV">
    <CFHEADER NAME="Content-Disposition" VALUE="attachment;
    filename=citywide.csv">
    <cfcontent type="application/msexcel">"Case
    Number","Creation Date"
    <cfoutput
    query="getCityWideCases">#ltrim(CASE_NBR)#,"#dateformat(CRTN_DT,"mm/dd/yyyy")#"
    </cfoutput>
    <cfabort>
    </cfcase>
    </cfswitch>
    <cfquery name="getCityWideCases" datasource="cts9i">
    SELECT
    --PROP.STR_NBR
    --,PROP.STR_FRAC_NBR
    --,PROP.STR_FRAC_NBR_RNG_END
    --,PROP.STR_DIR_CD
    PROP.STR_NM
    --,PROP.STR_SFX_CD
    --,PROP.STR_SFX_DIR_CD
    --,PROP.STR_UNIT_TYP_CD
    --,PROP.UNIT_NBR
    --,PROP.PROP_ID
    --,PROP.ZIP_CD
    ,CASE.CASE_NBR
    --,CASE.CASE_ID
    --,CASE.CASE_TYP_CD
    ,CASE.CRTN_DT
    --,APLC.PROJ_DESC_TXT
    --,TYP.CASE_TYP_DESC
    FROM
    CTS.TLA_PROP PROP
    ,CTS.TLOC L
    ,CTS.TCASE CASE
    --,CTS.TAPLC APLC
    --,CTS.TREF_CASE_TYP TYP
    WHERE
    PLAN_AREA_NBR = '1'
    AND L.LOC_ID = PROP.PROP_ID
    AND CASE.APLC_ID = L.APLC_ID
    AND PROP.STR_NM != 'TEST'
    --AND CASE.PARNT_CASE_ID IS NULL
    ORDER BY
    <cfswitch expression="#Form.orderBy#">
    <cfcase value="CASENUMBER">
    CASE.CASE_NBR
    </cfcase>
    <cfcase value="CREATIONDATE">
    CASE.CRTN_DT
    </cfcase>
    </cfswitch>
    </cfquery>
    <!---html report--->
    <cfswitch expression="#Form.outputFormat#">
    <cfcase value="HTML,PDF">
    <cfsavecontent variable="htmlData">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Citywide Cases Report</title>
    </head>
    <style type="text/css">
    td{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    th{
    font-family:Arial, Helvetica, sans-serif;
    font-size:12px;
    font-weight:bold;
    background-color:#FFFF99;
    h2{
    font-family:Arial, Helvetica, sans-serif;
    font-size:14px;
    h3{
    font-family:Arial, Helvetica, sans-serif;
    font-size:15px;
    </style>
    <body>
    <cfoutput>
    <table border="0" cellpadding="3" cellspacing="0">
    <tr>
    <td align="center">
    <h3>Citywide Cases
    Report</h3><br><br></td>
    </tr>
    <tr>
    <td align="center">
    </h2>Your query returned
    #getCityWideCases.RecordCount# records</h2></td>
    </tr>
    <tr>
    <td>
    <table border="2" cellpadding="2" cellspacing="0">
    <tr>
    <th>Record Number</th>
    <th width="120">Case Number</th>
    <TH>Creation Date</TH>
    </tr>
    <cfloop query="getCityWideCases">
    <tr bgcolor="<cfif currentrow mod
    2>GHOSTWHITE<cfelse>WHITE</cfif>">
    <td>#CurrentRow#</td>
    <Td>#CASE_NBR#</td>
    <td>#dateformat(CRTN_DT,"mm/dd/yyyy")#</td>
    </tr>
    </cfloop>
    </table>
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>
    </cfoutput>
    </cfsavecontent>
    <cfswitch expression="#Form.outputFormat#">
    <cfcase value="HTML">
    <cfoutput>
    #htmldata#
    </cfoutput>
    </cfcase>
    <cfcase value="PDF">
    PDF
    <cfdocument format="pdf">
    <cfoutput>
    #htmldata#
    </cfoutput>
    </cfdocument>
    </cfcase>
    </cfswitch>
    </cfcase>
    <cfcase value="CSV">
    <CFHEADER NAME="Content-Disposition" VALUE="attachment;
    filename=citywide.csv">
    <cfcontent type="application/msexcel">"Case
    Number","Creation Date"
    <cfoutput
    query="getCityWideCases">#ltrim(CASE_NBR)#,"#dateformat(CRTN_DT,"mm/dd/yyyy")#"
    </cfoutput>
    <cfabort>
    </cfcase>
    </cfswitch>

    I'm not sure it'll help you, but take a look at
    http://xml.apache.org/fop/index.html
    maybe you can go this way
    XHTML->XML->FOP->PDF
    ???

  • Dynamic forms using radio buttons, any ideas?

    Hello;
    I am writting a multi-form section in a web site. I have the
    form built up to the point where it sends the email. I have some
    issues I am trying to figure out and need some help. First let me
    show how this is set up, then the questions:
    The set up:
    Page 1 personal info
    <cfform action="PT2.cfm" method="post"
    enctype="application/x-www-form-urlencoded" name="sponsorOrder"
    enablecab="no">
    all the form fields that need to be filled for contact info
    here
    <input type="reset" name="Reset" value="Reset">
    <input type="submit" name="Submit" value="Proceed to Step
    2">
    </cfform>
    PAGE 2:
    <cfform action="SENDMAIL.cfm" method="post"
    enctype="application/x-www-form-urlencoded" name="sponsorOrder"
    enablecab="no">
    <input name="Fname" type="hidden"
    value="<cfoutput>#form.Fname#</cfoutput>">
    <!-- all the other hidden fields from page 1 go here
    --->
    <input type="radio" name="sponsor" value="1">
    <input type="radio" name="sponsor" value="2">
    <!-- there are 7 radio buttons to select from on this
    page. All with the same name="sponsor" -->
    <input type="reset" name="Reset" value="Reset">
    <input type="submit" name="Submit" value="Submit">
    </cfform>
    SENDMAIL page:
    <cfset subject = "Sponsorship Order">
    <cfset email = "#form.email#">
    <!----------------------------------------------------------------------->
    <cfmail to="[email protected]"
    cc="[email protected]"
    from="#form.email#"
    subject="Custom Order Request"
    server="mail.myserver.com"
    port=25
    type="HTML">
    <font face="Verdana, Arial, Helvetica, sans-serif"
    color="##000000" size="2">
    <b>Collected information</b><br>
    <b>Customer First Name:</b>
    #form.Fname#<br>
    <!-- all the rest of the collected contact info goes here
    -->
    <!-- HOW do I bring in the radio button choice here? Is
    this the right way? -->
    <cfif "form.sponsor" = "1">
    <b>Selection 1:</b> the info they get from
    selection 1 here <br>
    </cfif>
    <cfif "form.sponsor" = "2">
    <b>Selection 2:</b>The info that goes with
    selection 2 goes here<br>
    </cfif>
    <!-- there are 5 more if statements that need to run here
    for the rest of the radio selections -->
    </cfmail>
    <cfinclude template="thankyou.cfm">
    THANK YOU PAGE:
    Now on this page is where I get lost. I need to bring the
    selection from the radio buttons over to here and serve up a button
    according to the radio button selected back on page 2. Is this how
    I do that? The same as I did in the sendmail?
    <cfif "form.sponsor" = "1">
    they get this button and info
    </cfif>
    <cfif "form.sponsor" = "2">
    they get this button and info
    </cfif>
    <!-- and it goes on for 5 more selections -->
    Those are my questions, as well as this.
    On page 2 I need to make it impossible to pass that page
    without making a selection. How do I do that with radio buttons?
    Can anyone help me?
    Thank you.
    Phoenix

    Irish-Phoenix wrote:
    > Hello;
    > I am writting a multi-form section in a web site. I have
    the form built up to
    > the point where it sends the email. I have some issues I
    am trying to figure
    > out and need some help. First let me show how this is
    set up, then the
    > questions:
    >
    > The set up:
    > Page 1 personal info
    >
    > <cfform action="PT2.cfm" method="post"
    > enctype="application/x-www-form-urlencoded"
    name="sponsorOrder" enablecab="no">
    >
    > all the form fields that need to be filled for contact
    info here
    >
    > <input type="reset" name="Reset" value="Reset">
    > <input type="submit" name="Submit" value="Proceed to
    Step 2">
    > </cfform>
    >
    > PAGE 2:
    >
    > <cfform action="SENDMAIL.cfm" method="post"
    > enctype="application/x-www-form-urlencoded"
    name="sponsorOrder" enablecab="no">
    > <input name="Fname" type="hidden"
    value="<cfoutput>#form.Fname#</cfoutput>">
    > <!-- all the other hidden fields from page 1 go here
    --->
    > <input type="radio" name="sponsor" value="1">
    > <input type="radio" name="sponsor" value="2">
    > <!-- there are 7 radio buttons to select from on this
    page. All with the same
    > name="sponsor" -->
    > <input type="reset" name="Reset" value="Reset">
    > <input type="submit" name="Submit" value="Submit">
    > </cfform>
    >
    > SENDMAIL page:
    > <cfset subject = "Sponsorship Order">
    > <cfset email = "#form.email#">
    >
    <!----------------------------------------------------------------------->
    > <cfmail to="[email protected]"
    > cc="[email protected]"
    > from="#form.email#"
    > subject="Custom Order Request"
    > server="mail.myserver.com"
    > port=25
    > type="HTML">
    > <font face="Verdana, Arial, Helvetica, sans-serif"
    color="##000000" size="2">
    >
    Collected information<br>
    >
    Customer First Name: #form.Fname#<br>
    > <!-- all the rest of the collected contact info goes
    here -->
    >
    > <!-- HOW do I bring in the radio button choice here?
    Is this the right way? -->
    > <cfif "form.sponsor" = "1">
    >
    Selection 1: the info they get from selection 1 here
    <br>
    > </cfif>
    > <cfif "form.sponsor" = "2">
    >
    Selection 2:The info that goes with selection 2 goes
    here<br>
    > </cfif>
    > <!-- there are 5 more if statements that need to run
    here for the rest of the
    > radio selections -->
    > </cfmail>
    > <cfinclude template="thankyou.cfm">
    >
    > THANK YOU PAGE:
    >
    > Now on this page is where I get lost. I need to bring
    the selection from the
    > radio buttons over to here and serve up a button
    according to the radio button
    > selected back on page 2. Is this how I do that? The same
    as I did in the
    > sendmail?
    >
    > <cfif "form.sponsor" = "1">
    > they get this button and info
    > </cfif>
    > <cfif "form.sponsor" = "2">
    > they get this button and info
    > </cfif>
    > <!-- and it goes on for 5 more selections -->
    >
    > Those are my questions, as well as this.
    > On page 2 I need to make it impossible to pass that page
    without making a
    > selection. How do I do that with radio buttons?
    > Can anyone help me?
    > Thank you.
    >
    > Phoenix
    >
    hi phoenix!
    ok, let's see...
    your "thank you" page is cfincluded in the "sendmail" page,
    so it will
    have all the passed form vars available to it, which means
    you do not
    have to store the radio button selection in the session scope
    or
    anywhere else...
    i think a cfswitch/cfcase construct to check for selected
    radio button
    will serve you better than lots of cfif/cfelseif/cfelse...
    as for preventing submission of page2 without selecting a
    radio button
    first:
    a) pre-select one
    b) use client-side javascript to make sure one is selected
    (use an
    onsubmit event in the form tag or onclick event in the button
    - you will
    have to change the button type from submit to button, and
    change its
    name from submit to something else - there are possible
    issues with
    having a button named submit in your form if you are
    suibmitting the
    form through js...
    c) you could also use server-side cfml to check that a radio
    button is
    selected but it requires a lot of extra code and changes to
    your
    forms/pages...
    Azadi Saryev
    Sabai-dee.com
    Vientiane, Laos
    http://www.sabai-dee.com

  • Cfajaxproxy

    I am getting coldfusion 8 ERROR using cfajaxproxy:
    "The path to the CFC must be specified as a full path, or as a relative path from the current template, without the use of mappings."
    "The specified CFC vindexer_server_ver3 could not be found. "
    at line 2, in template="C:\ColdFusion8\wwwroot\dei-ideas_org\wwwroot\chapter0-2\vindexer_client.cfm"
    Any idea on how to fix this error?
    Also, in another thread, someone mentioned turning on "extended error information".  How do I turn this on?
    FACTS:
    I do NOT want to add a CFC mapping using coldfusion administrator because I am on a shared coldfusion hosting site (hostek.com).
    I can NOT change hosts at this time.
    Tested using firefox 3.6.17 and IE8
    I use jrun on my  "ColdFusion Server Standard 8,0,1,195765" test server
    In my test coldfusion server, I have "/dei-ideas_org" mapped to "C:\ColdFusion8\wwwroot\dei-ideas_org\wwwroot"
    In application.cfc I have the following;
        <!--- application.cfc mappings START --->
        THIS.mappings= {};
        THIS.mappings["/CFC_CustomTags"]= GetDirectoryFromPath( GetCurrentTemplatePath() ) & "inc\CFC_CustomTags";
        THIS.customTagPaths = getDirectoryFromPath(getCurrentTemplatePath()) & "inc\CFC_CustomTags" ;
        THIS.customtagpaths=ListAppend(THIS.customtagpaths, "inc\CFC_CustomTags");
        <!--- application.cfc mappings END --->
    I can access: http://192.168.1.128:8500/CFIDE/Scripts/wddx.js
    client template is located at:
      "C:\ColdFusion8\wwwroot\dei-ideas_org\wwwroot\chapter0-2\vindexer_client.cfm?cfdebug" aka
      "http://192.168.1.128:8500/dei-ideas_org/chapter0-2/vindexer_client.cfm"
    CFC (server template) is located at:
      "C:\ColdFusion8\wwwroot\dei-ideas_org\wwwroot\chapter0-2\vindexer_server_ver3.cfc" aka
      "http://192.168.1.128:8500/dei-ideas_org/chapter0-2/vindexer_server_ver3.cfc"
    if I go to url: "http://192.168.1.128:8500/dei-ideas_org/chapter0-2/vindexer_server_ver3.cfc?method=serverf n_ver3&arg_ver3=test_string&cfdebug",
        I do NOT get any errors.  I also do not get any data back, should I?
    /chapter0-2/vindexer_client.cfm source code:
    <!--- file: "/chapter0-2/vindexer_client.cfm" --->
    <cfajaxproxy cfc="chapter0-2.vindexer_server_ver3" jsclassname="vindexer_proxy_ver3" >
    <script>
    var myProxy_ver3=  new vindexer_proxy_ver3();
    function processClick() {
      var myArgStr_ver3= document.getElementById('form_arg_ver3').value;
      var result= myProxy_ver3.serverfn_ver3( myArgStr_ver3 );
      alert("the result from the server was" + result );
    </script>
    <cfform>
    <p>Enter form_arg_ver3:<cfinput type="text" name="form_arg_ver3" id="form_arg_ver3"></p>
    <p><cfinput type="button" name="f_btn_ver3" id="f_btn_ver3" onClick="processClick()" value="Get Data From Server"></p>
    </cfform>
    </body></html>
    <!--- file: "/chapter0-2/vindexer_server.cfc" ---><cfcomponent output="no">
    <cffunction name="serverfn_ver3" access="remote" returntype="string">
      <cfargument name="arg_ver3" type="string" required="false" default="Error No arg_ver3 Supplied" >         
      <cfset var retStr= "returned_data">
      <cfreturn retStr >
    </cffunction>
    </cfcomponent>
    /chapter0-2/vindexer_server.cfc source code:

    SOLVED: if Coldfusion 8, and have OnRequest() in application.cfc, this will not work --it is a  known cf8 bug.  For a workaround, see
    http://www.coldfusionjedi.com/index.cfm/2008/3/19/Ask-a-Jedi-Ajaxbound-requests-and-onRequ est

  • Attempting to sort recordset off our iseries

    I have a problem that I would appreciate assistance with.  I have successfuly created a recordset that pulls data off our iSeries.  I have created a table from the recordset, but upon the review of the content of the table by meeting attendees it was suggested that all columns of the table be sortable.  In the past I had used a routine (free for the taking from www.easycfm.com), whereby <cfswitch> is used for sorting purposes.  The SQL portion of the tutorial follows.  However, while it runs against a MS access database, it has problems with the iSeries.  In working with the Starquest people today (vendor for StarSQL) we ran a debug trace and it was observed that for this particular SQL statement, the ORDER BY clause is getting cutting off.  Note the truncation that occurs right after Order BY in the following trace result.
    trace result, "WHERE RTYPE = 8 AND RNCTL <> 'Y' AND RRLDTC > 0 AND RRLDTC <= 20090633 AND RESWT <= 5000 ORDER BY".
    I also tried a query of the query.  This too failed when I tried the dynamic sort SQL using <cfswitch>.  The error that I received upon running that QOQ was that the ORDER BY was too complex.
    Does anyone have any insight on how I might address the dynamic sorting of the recordset off the iSeries?  Thanks!
    Example SQL that I used:
    <cfquery name="name went here" datasource="datasource went here">
    SELECT  *
    FROM Table
    ORDER BY
    <cfswitch expression="#sort#">
      <cfcase value="1">Field1</cfcase>
      <cfcase value="2">Field1 desc</cfcase>
      <cfcase value="3">Field2</cfcase>
      <cfcase value="4">Field2 desc</cfcase>  
    </cfswitch>
    </cfquery>

    NVL-Tom wrote:
    However, while it runs against a MS access database, it has problems with the iSeries.  ... we ran a debug trace and it was observed that for this particular SQL statement, the ORDER BY clause is getting cutting off. 
    The datasource type really has nothing to do with how ColdFusion generates that sql string.  ColdFusion first evaluates the cfswitch/cfcase statements, then sends the final sql string to the chosen datasource.  So it produces the same string no matter the datasource type.
    What is more likely is that your #sort# value did not match any of the cfcase values.  Since there is no default case, nothing is added to the ORDER BY, making it seem like the statement was truncated.

  • Cfschedule run monday trhough fri. enclude holidays

    Hello
    Is this possible to set up like this? It looks like the variables within cfschedule are specific.
    Thanks!

    There are CFCs on cflib.org that can check to see if a date is a holiday, or not.  Get the ones for the holidays you wish to exclude, and give that a shot.  The idea of using a conditional on the page is (IMHO) a good idea.. let the scheduler run it, and let the file check for holiday status.
    Although, personally, I'd use a CFSWITCH/CFCASE statement instead of a CFIF.
    ^_^

  • Bug in PDF generation with Report Builder CF8

    Hello
    there is a bug in the calculation of the left margin of a
    page.
    I upgraded from MX 7.02 to CF8. My "old" Reports worked fine,
    but when I export them to PDF an print them the left margin is
    different.
    I'm using metric settings in the Report Builder. I created a
    new Report with Left Margin 2 cm and a single Field with the left
    Property = 1 cm (0.9879 cm). The printed paper with these poperties
    where fine. I could measure appoximatly 3cm . But if I use Report
    Left Margin = 1.27 cm and Field left Property = 0.35cm. The left
    margin of the printed paper is only 1.1cm.
    So it depends on the choosen Values of report left margin and
    the left property of a field.
    Does anybody else have the same problem?

    I found this posting as I have now "rediscovered" this issue. I came to the same conclusion - edit ALT TEXT for every image.
    However, I think it is confusing that these paths of image file are not considered Personal Information that can be removed using the Inspect Document feature (I tried - was not successful). The list of things to be removed using this wizard is quite extensive
    - and some of them less visible than these file paths.
    It would be interesting to know if this is going to change with future updates of Word. Why is an ALT TEXT included at all per default? I think using the file path in ALT TEXT should be made optional. Is there a way to turn off this default embedding of
    the full path?
    As the OP I also used Office 2013 on Windows 7 64bit.
    Elke

  • Help with Possible Mask Bug in CF8

    When letting a user edit their PRICE field at my website, I
    populate the field with the VALUE attribute (as seen below) using a
    MASK:
    <CFINPUT TYPE="TEXT" NAME="price" VALUE="#price#" SIZE="7"
    MAXLENGTH="7" MASK="9999999">Enter your price
    <B>without</B> decimals, cents, or dollar signs.
    Examples: 45, 1, 17900.
    However, when pulling the number from the database, CF8 will
    add trailing zeros to the number!!!!
    For example: if #price# equals 25, the value populated in the
    field is 2500000!!!
    Is this a bug? When I reamove the mask, it works fine. It's
    not doing this on my CF 4.5 (installed on my own server). I am
    using a paid providers' CF8.
    If it is a bug, how would I fix this and how do you report a
    bug? This is the 2nd one I found using CF8 (the other was
    Validate="integer" actually allows "$" as an integer ...also "$$$"
    and "$454$3$$3$", etc.)
    -Tony

    tony17112acst wrote:
    > Is this a bug? It's not doing this on my CF 4.5
    (installed on my own server).
    hmm... the 'mask' attribute was introduced in CFMX7...
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Is there a bug in CF8 cfpdf ?

    Further to my random question yesterday about instantiation of objects - I believe I've actually tracked my problem down to a problem with the <cfpdf> tag on CF8 - When I run certain PDF's through the following code
    <cfpdf action="processddx" ddxfile="#ddxDir#/readPDF.ddx" inputfiles="#inputStruct#" outputfiles="#outputStruct#" name="ddxVar">
    whilst on CF8 I get the following in the dump structure
    OUT1
    failed: PDFM_S20005: Encountered internal error while processing document "DOC1".
    Whereas if I run the same file through CF9 - It works perfectly- we aren't moving to CF9 on the production server for a while yet so I need to find out if there is a genuine bug and/or there is a fix available for it as it's causing me some major problems
    I've tried looking for the error message online but can't find it referenced anywhere

    I know there was at least one issue with the cfpdf/ddx functionality in Coldfusion 8. So, I would upgrade to CF8.0.1 and install the latest cumulative hot fix.

  • CF8 cfdocument tag has a few new bugs

    This discusses two new bugs in CF8 having to do with footers
    in cfdocument.
    ***FIRST BUG***
    With CFMX7, I could define a new footer by putting a new
    <cfdocumentitem type="footer"> tag in each cfdocumentsection
    of my pdf report. Each could have a different string, e.g., so that
    the footer could tell the reader which chapter she is reading. This
    does not work in CF8. The chapter name that appears on all pages is
    the one defined in the last <cfdocumentitem type="footer">
    tag in the cfdocument. Now only the page number changes
    dynamically. Sample code:
    <cfdocument format="pdf" unit="in" pagetype="letter"
    marginbottom="0.8" marginleft="1" marginright="1"
    margintop="0.8"
    orientation="portrait" fontembed="yes" overwrite="yes"
    filename="pdfbugdemo2.pdf" pageheight="11" pagewidth="8.5"
    scale="100">
    <cfdocumentsection>
    <cfset footerContent="1. Introduction">
    <cfdocumentitem type="footer">
    <div style="float: left;">
    <cfoutput>#footerContent#</cfoutput>
    </div>
    <div style="float: right;">
    <cfoutput>#cfdocument.currentpagenumber#</cfoutput>
    </div>
    </cfdocumentitem>
    <h1>Introduction</h1>
    </cfdocumentsection>
    <cfdocumentsection>
    <cfset footerContent="2. Body of Document">
    <cfdocumentitem type="footer">
    <div style="float: left;">
    <cfoutput>#footerContent#</cfoutput>
    </div>
    <div style="float: right;">
    <cfoutput>#cfdocument.currentpagenumber#</cfoutput>
    </div>
    </cfdocumentitem>
    <h1>Body of Document</h1>
    </cfdocumentsection>
    </cfdocument>
    *** SECOND BUG ***
    In CF8, you cannot cfinclude the same template multiple times
    in a given template - you get an error (at least sometimes). A
    workaround is to make multiple copies of the template, each with a
    different name. This was not necessary in CFMX7. Sample code:
    <cfdocument format="pdf" unit="in" pagetype="letter"
    marginbottom="0.8" marginleft="1" marginright="1"
    margintop="0.8"
    orientation="portrait" fontembed="yes" overwrite="yes"
    filename="pdfbugdemo2.pdf" pageheight="11" pagewidth="8.5"
    scale="100">
    <cfdocumentsection>
    <cfset footerContent="1. Introduction">
    <cfinclude template="pdfbugfooter.cfm">
    <h1>Introduction</h1>
    </cfdocumentsection>
    <cfdocumentsection>
    <cfset footerContent="2. Body of Document">
    <cfinclude template="pdfbugfooter.cfm">
    <h1>Body of Document</h1>
    </cfdocumentsection>
    </cfdocument>
    where pdfbugfooter.cfm is:
    <cfdocumentitem type="footer">
    <div style="float: left;">
    <cfoutput>#footerContent#</cfoutput>
    </div>
    <div style="float: right;">
    <cfoutput>#cfdocument.currentpagenumber#</cfoutput>
    </div>
    </cfdocumentitem>

    re: If you claim didn't say that,
    No "if" about it - I made no such claim and never would -
    thats just you
    talking gibberish. Who in their right mind would say, or even
    suggest, that
    forums are not helpful. The only reason a forum exists in the
    first place is
    to be helpful!
    re: So what was your actual intention in the first place?
    Not sure you would undertsand, you seem to struggle to follow
    along. But
    just a hint for you - the forum posts, or quantity thereof,
    have been used
    by several people here, and by editors at sites such as
    sitepoint.com, as a
    metric to use to gague interest and activity. A metric only
    useful when
    taken in context with other pointers (job market, book
    market, number of
    classes still running, so on and so forth)
    Again, nobody has ever said forums are not useful or helpful
    - I suspect you
    knew that much but felt the need to throw some nonsense about
    in an attempt
    at an argument - failed didn't it?
    RE: Maybe they realized Ben Forta writes such a good books,
    they felt
    ashamed? :-)
    The O'Reilly audience is typically seasoned developers, hard
    core coders.
    Their books are a tough read for beginners and O'Reilly
    delibertately do not
    cater to this audeince with many of their titles. And to put
    it bluntly, the
    main bunch of people to ditch CF early on were these "hard
    core" types. I
    belive this as the only CF developers I know are actually
    more "designers"
    than developers - I know of no professional coder/developers
    that would
    touch CF. Thats just my personal observation, btw.
    re: From what I read, people are telling I'm right.
    Are you crazy? They are all, at least 95%, in agreemenst that
    Tim Buntel
    needs to pick up the marketing act before CF dies. Seriously,
    you do seem to
    struggle to follow along at times - suggest you actually
    read.
    re: CF has always been "dead" in many places.
    How can you always be dead, doesn't make sense! You have to
    have lived in
    order to die. There used to be hundreds of cf jobs advertised
    here in
    Australia every day, literally every day. Now you may see 3
    or 4 each week -
    mostly for migrating old cf sites to new asp.net or java
    sites. And there is
    no longer any CF classes advetised or held in nearly all
    states - they
    literally shut them down. I'm confident enough that the
    comment "CF is dead"
    is accurate.
    r: Maybe you should be answering those questions, since you
    seem to know
    they're true, and I haven't heard of any such things.
    I know the answers to all of those questions - becuase CF is
    dying. If CF
    were living, then none of those questions would have been
    asked.
    re: So you know they're not investing in one?
    Yes, I know that. They will never spend that kind fo money on
    coldfusion -
    it just wouldn't be vaible for them. We're darned lucky that
    still have
    small team of enginners to write tags around the java
    libraries and release
    new versions. They are not actually going to start
    "innovating" with CF in a
    market like this - and I don't blame them.
    "Fernis" <[email protected]> wrote in
    message
    news:[email protected]...
    > >I never said you can't get help on the forums. Where
    did you get that
    > >from?
    >
    > If you claim didn't say that, and if you didn't even
    mean that by saying
    > "Forum averages about 3 new posts a day and has very
    small community -
    > very
    > quiet.", why did you say such thing in the first place,
    if it's totally
    > irrelevant to all about getting help in the forums? So
    what was your
    > actual
    > intention in the first place? Are you not reading what
    other people are
    > saying
    > before responding? The rest of my post is really useless
    compared to the
    > finding that you just really do the trolling because you
    like nit-picking.
    > Unbelievable.
    >
    > >Why did O'Reilly pull their once popular CF book
    from print and refuse to
    > write any further CF books?
    >
    > Maybe they realized Ben Forta writes such a good books,
    they felt ashamed?
    > :-)
    > I mean, if they were popular as you said.
    >
    > >No, its not not. Go here -
    >
    http://techfeed.net/blog/index.cfm/2007/8/22/Open-Letter-to-Tim-Buntel
    > >- and see actual people tell you how wrong you are.
    >
    > From what I read, people are telling I'm right. So what
    *you* say is
    > downright
    > silly.
    >
    > >But you seemed to be thing that I based my whole
    argument that CF is weak
    > >and
    > dying
    > >( is already dead in many places)
    >
    > CF has always been "dead" in many places. And it's been
    dying for 10
    > years -
    > they say. So what's new? You just don't seem to
    understand that random
    > sites
    > switching ColdFusion for something else doesn't mean
    that at the same time
    > there are likely new adopters of ColdFusion. You just
    don't know about
    > them,
    > while you can more easily track if some of them go away.
    You don't
    > actually
    > have anything but blind guesses about what's happening.
    >
    > I'm seeing more CF frameworks pop up as ever before. And
    In Finland, I'm
    > seeing more ColdFusion hosting appear than ever before.
    >
    > >Why did MM/Adobe pull an entire team of employees
    out of Australia? Why
    > >did
    > >they stop printing ads in all of the trade
    magazines? Why did MM push PHP
    > >more than CF on their website?
    >
    > Maybe you should be answering those questions, since you
    seem to know
    > they're
    > true, and I haven't heard of any such things.
    >
    > > Why don't they invest in an IDE to atract all those
    developers out there
    > that like a complete RAD platform?
    > > So on and so forth???
    >
    > So you know they're not investing in one? And I thought
    DreamWeaver would
    > act
    > as one? Or third party products like CFEclipse? Or
    Adobe's IDE extensions
    > for
    > Eclipse? Sure, the CF IDE's lack behind the automation
    and insight
    > functionality of other IDEs, and that's something I'm
    hoping for too...
    > although I've always felt that strong IDEs are strictly
    necessary only for
    > programming languages where a huge number of
    non-user-defined libraries
    > and
    > classes are to be referenced. The level of automation in
    ColdFusion (lots
    > of
    > action with little code) make complex IDEs less
    important than with most
    > other
    > languages.
    >
    > -Ari Ferneilus
    >

  • Do we have a fix for the justification bug in cfdocument for CF8?

    Do we have a fix for the justification bug in cfdocument for CF8?

    For IDocs it is [ABAP->Data Transfers|ABAP Connectivity;.
    The rest...not sure. Maybe there as well, or XI? Other suggestions?
    Thomas

Maybe you are looking for