This works perfectly on a few of my apps (in CF 5, but I don't know why it would break in CFMX). Make sure the file ReportName&'.CFM' exists. Use FileExists or try/catch around your include.
Also, don't use # when it's not neccesary:
<cfif ReportName NEQ "">
<cfset theReport = ReportName&'.CFM'>

-----Oorspronkelijk bericht-----
Van: Sam Komolafe [mailto:[EMAIL PROTECTED]
Verzonden: do 13/11/2003 20:44
Aan: CF-Talk
CC:
Onderwerp: CFINCLUDE within CFLOOP not working


Hi,

How do I dynamically include files using CFINCLUDE within a CFLOOP statement:

This does NOT WORK:

<cfloop index="ReportName" list ="#variables.ALLReports#" delimiters = ",">
       <cfif #ReportName# NEQ "">
        <cfset theReport = #ReportName#&'.CFM'>
        <cfinclude template="#theReport#"><br>
       </cfif>
</cfloop>

Help will be appreciated.

Thanks

  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to