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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get a query from a Crystal Reports

Status
Not open for further replies.

Barin

Programmer
Apr 2, 2002
5
BR
Hi,

I need to get a inittial report query in the Crystal and set a new query in the report.
Example:

A inittial query is: SELECT REGION_NAME FROM REGION WHERE CITY = @1@

I want to get the query,change the "@1@" mnemonic and set a new query: SELECT REGION_NAME FROM REGION WHERE CITY = "SAO PAULO". ( in ASP using RDC )

But I don´t know how do get the inittial query.

Thanks
 
This sounds like a situation where you could use a parameter within the Crystal Report itself.
Create a parameter (call it 'SearchCity') and then pass the appropriate string to the parameter when you generate the report - so in this case you would set 'SearchCity' to be "SAO PAULO").
Hope that this helps.
Steve
 
SteveK,

I need to get a query from report because I need to work with many reports ( generic ). It´s possible get a query from report.

Thanks,

Bruno
 
Try reading the 'SQLQueryString' property against the CRReport object through code.
Steve
 
StevenK,

I try to read a SQLQueryAtribute, but when I execute this operation the Crystal Reports downs in visualization of report. I read a article in Crystal Decision that in version 8.0 exists a problem in RDC.
I will try to get a patch...
But, if SQLQueryString is read, the SQLQueryString original is returned?

Thanks very much!

Bruno
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top