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!

SQLQuery of a SubReport...

Status
Not open for further replies.

dattero

Technical User
Mar 5, 2001
8
IT
I change RunTime the SQLQuery of a Report in this way:

BSTR bstrQuery = pReport->GetSQLQueryString();
CString strQueryOK;
strQueryOK = (CString)bstrQuery;
CString str;
str = ::ChangeTypeString(vJob);
strQueryOK.Replace("0000",str);
pReport->PutSQLQueryString((_bstr_t)strQueryOK);

Is there a way to change the SQLQuery of a SubReport??

Thanks...

Marco
 
Bring up your sub-report to edit it. Click on 'Database' and choose 'Show SQL Query'. You can now edit the SQL code.

LindaC
lcastner@co.orange.ny.us

 
I think you don't have understand my problem: i want to change the string SQL through code at runtime...not when i construct the report...

Thank for your interested

M.
 
There are probably multiple ways to do this, but none of them very well documented.

The way we have done this is with VB 6 and Crystal V8. We pass an ADO recordset to the report and we pass an ADO recordset to the subreport. Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top