I haven't used CF7 so a blind guess is perhaps you need to add a 
CFHEADER to the cfm file to identify the mime-type.

Or try it this way:

<cfobject component="gvs_techneeds" name="myCFC">
<cfoutput>#myCFC.Needs_Report("PDF")#</cfoutput>

Try asking this on BACFUG (www.bacfug.org), someone on there will 
probably know (Sean Corfield and a bunch of other CF gurus are on there).

cnewroth55 wrote:

>I understand I can easily call a cfc in a cfm file and then use the
>cfreport tag in the cfm file to call the template and use the query
>returned by the cfc for my report. However what I want to do is a bit
>different. I would like to have a function in my cfc that does the
>query and another function inside cfc that uses the query to create
>the report and pass a format argument like PDF or Flash or Excel
>Remotely using Flex (flash) Here is my CFC Code, but when i call it
>from a cfm file to test it. I get a blank page.
>
>What am i doing wrong? 
>
>Attached CFM Code to test CFC:
>
><cfinvoke component="gvs_techneeds" method="Needs_Report"
>returnvariable="MyReport" ReportFormat="PDF">
>
> 
>
>Attached CFC Code 
>
><cfcomponent>
>        <cffunction name="Needs_Query" returntype="query" output="no"
>access="public">
>               <cfset var MyQuery="">
> 
>               <cfquery name="MyQuery" datasource="ProdETT_GVS">
>                                               A Cool Query SQL
>Statement here
>               </cfquery>
>               <cfreturn MyQuery>
>        </cffunction>
>        
>        <cffunction name="Needs_Report" returntype="any" output="true"
>access="remote">
>               <cfargument name="ReportFormat" type="string"
>required="yes" hint="format type for report" />
>               
>               <cfset MyReport = ""> 
>               
>               <cfinvoke component="gvs_techneeds"
>method="Needs_Query" returnvariable="MyQuery">
>               
>               <cfreport name="MyReport"
>template="../_reports/gvs_techneeds.cfr"
>format="#ARGUMENTS.ReportFormat#" query="MyQuery" />
>               <cfreturn MyReport>
>        </cffunction>
></cfcomponent>
>
>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>  
>





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to