Skip to main content
Participant
August 29, 2008
Question

Using External Queries

  • August 29, 2008
  • 2 replies
  • 821 views
I've recently inherited a CF app that uses CF reports and don't have any previous experience with it.
The report appears to accept an external query, but also has an embedded query. The external query is what's being used to generate the report, but it's also processing the internal query for some reason. If I remove the internal query, it errors out. Do I need to have an internal query at all? If so, why? It seems that if I'm passing a query in using the <cfreport query attribute, I shouldn't have to embed a query in the report.
Thanks.
This topic has been closed for replies.

2 replies

RufhausenAuthor
Participant
August 29, 2008
I think I just realized the issue. After removing the embedded query, I needed to go into Query Builder's Advanced mode and declare the variable used by my external query in the input field at the bottom.
Still haven't found any documentation that explains that.
Inspiring
August 29, 2008
Rufhausen wrote:
> I shouldn't have to embed a query in the report.

You don't have to, but it sounds like the previous developer choose to.

Without seeing the code I can only imagine that maybe the external query
provides one part of the data, but the internal one provides some kind
of related information.

Whether this is a good solution or just a working one would be a very
subjective matter.
RufhausenAuthor
Participant
August 29, 2008
So assuming the embedded query is not used, I should be able to go to Report | Report Query and erase the query there and the report should run, yes?

The problem with doing that now is that I get a "Element SOURCE is undefined in QUERY" error even though I don't believe that the embedded query is necessary for the report.

Thanks.