Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

error?

$
0
0

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#">


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>