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

CRAXDRT.Report get Select statement

Status
Not open for further replies.

deulyd

Programmer
Oct 17, 2001
106
CA
Hi,

I have a report object and I need to update the Select Statement but I really don't know how to do that... I tried with the "SQLQueryString" but its always empty and is also read only.

Here my code :

'--------------------------------------------------
Dim crApp As New CRAXDRT.Application
Dim crRpt As New CRAXDRT.Report


Set crRpt = crApp.OpenReport("C:\report1.rpt")

' Change SQL Query of crRpt here!

crRpt.Database.LogOnServer "p2sodbc.dll", "ODBC_DB", "", "USER1", "user1"

Me.CRViewer1.ReportSource = crRpt

Me.CRViewer1.ViewReport

'-------------------------------------------------
 
It doesn't work that way. Once the report is saved, the 'meat' of the query is locked in place. You can use the RecordSelectionFormula property to affect the WHERE clause, but you won't be able to change the actual query.

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top