Professional Web Applications Themes

Can I call a CFR in a CFC - Coldfusion - Advanced Techniques

I am understand I can easily call a cfc in a cfm file and then use the cfreport tag in the cfm file to call teh 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 ...

  1. #1

    Default Can I call a CFR in a CFC

    I am understand I can easily call a cfc in a cfm file and then use the cfreport
    tag in the cfm file to call teh 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?:confused;

    <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="no" 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>

    GotJosh? Guest

  2. #2

    Default Re: Can I call a CFR in a CFC

    Anyone out there?
    GotJosh? Guest

Similar Threads

  1. Call CSS
    By MattFlex3 in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: May 10th, 06:32 AM
  2. CFC Call Hanging on Second Call
    By kg4awg in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: September 27th, 11:50 PM
  3. how to call dll in ASP?
    By kathy in forum ASP
    Replies: 3
    Last Post: August 27th, 12:43 PM
  4. call xyz.bat from ASP.net
    By amy in forum ASP.NET General
    Replies: 1
    Last Post: August 6th, 05:34 AM
  5. remote call procedure call failed
    By Dave Warwick in forum Windows Networking
    Replies: 0
    Last Post: July 5th, 03:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139