Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why is SQLQueryString empty?

Status
Not open for further replies.

yoink

Programmer
Dec 2, 2001
15
AU
Hi guys,

I've got a vb app that opens up a crystal report using RDC (crystal 7). I want to get the initial sql statement that the report is built on, modify it, and then run the report using my modified statement. So, I've done the following:

Dim crReport As CRAXDRT.Report
Set crReport = crApplication.OpenReport("c:\program files\seagate\crystal reports\reports\xtreme\empprof.rpt")

'Export the crystal report to a html file
With crReport
Dim strQuery As String
strQuery = .SQLQueryString
etc

However, .SQLQueryString is always empty. Is this a known bug in Crystal 7 or am I just looking in the wrong place? Surely there must be a way I can find the sql query that my report is built on?

Cheers

Andrew
 
Does the report (or its database) need to be logged on against the server (or at least the tables) for the SQL Query String to be read ?
I seem to recall something along these lines when dealing with the .rpt files using Crystal Reports itself.
Maybe someone could confirm this or knock my thought on the head ? :)
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top