Crystal Reports & VB6 - Retrieving SQLQueryString property

We are trying to retrieve the SQLQueryString from a report and getting an emptystring.
When stepping through in code it works fine and puts the string into a variable but in compiled app it fails to retrieve value.

Can you post the code you're using? Also, your version of Crystal, DB, and connectivity would be helpful.

I just ran a quick test using an ODBC connection to the CR Extreme sample db using CR8.5/VB6/RDC, and was able to successfully retreive the SQLQueryString from the report. I did notice that when I was trying to access the SQLQueryString property, it would invoke the parameter window.

This will cause the parameter to be invoked twice, but if two different values are entered, the report will reflect the first (invoked from ViewReport), but the SQLQueryString will reflect the second:
Set rpt = cApp.OpenReport("c:\regions.rpt")
CRViewer1.ReportSource = rpt
CRViewer1.ViewReport
strQry = rpt.SQLQueryString

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Featured Post

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

I hate sub reports and always consider them the last resort in any reporting solution. The negative effect on performance and maintainability is just not worth the easy ride they give the report writer. Nine times out of ten reporting requirements…

Hello everyone,
Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8.
We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…

Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message. In the To field, type your recipient's fax number @efaxsend.com.
You can even send a secure international fax — just include t…

Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail. The methods are covered in more detail in o…