Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

error?

Explorer ,
Sep 18, 2013 Sep 18, 2013

Hi,

When i try to dump the Ram from cfm, i got error :Variable Ram is undefined.  However, when dump the rfalg inside the cfc, it got all the results.  Can anyone please tell why?

      Thanks

<!---.cfc--->

<cfcomponent name="costingReport" access="public" description="generating report">

          <!--- object constructor --->

    <cffunction name="init" access="remote" output="false" returntype="Any" hint="constructor">

        <cfreturn this />

    </cffunction>

   

<cffunction name="FindR" access="public" returntype="any">

             <cfargument name="parentID" type="string" required="yes" />

       

    <cfset var rflag = 'No'>

   

        <cfquery name="findChildren_1" datasource="#dsn#">

                select * from mytbl

        where mint =  '#ltrim(arguments.parentid)#'

        </cfquery>

       

                           <cfif findChildren_1.recordcount eq 0>

                      <cfset rflag = 'No'>

                  <cfbreak>

             <cfelse>

                <cfloop query="findChildren_1">

                     <cfquery name="findChildren_2" datasource="#dsn#">

                       select * from

                        and mint ='#ltrim(findChildren_1.sam)#'

                    </cfquery>

                   

                    <cfif findChildren_2.RecordCount GT 0>

                              <cfset rflag = 'Yes'>

                    <cfelse>

                              <cfset rflag = 'No'>

                        <cfbreak>

                    </cfif>

                           

                </cfloop>

            </cfif>

   

          <cfdump var="#rflag#"><br>

          <cfreturn  rflag />

   </cffunction>

   </cfcomponent>

  

  

   <!---.cfm--->

   <cfinvoke component="components.FindR" method="init" returnVariable="report_R" />

   <cfset Ram = report_R.FindR(parentID) />

      <cfdump var="#Ram#">

TOPICS
Getting started
351
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources