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

using VB 6 and crystal 9 to change a subreports datasource 1

Status
Not open for further replies.
Sep 28, 2001
55
0
0
US
hi, i have a subreport generated in a VB6 program for which I have to change the datasource. With it's parent report I changed the SQLQueryString, however when I tried the same method with the subreport:

Report.Subreport1.OpenSubreport.SQLQueryString = "blah blah blah..."


the program pops up a dialog box asking for parameter values (for linking with the main report).

Is there a better way to update the subreport's datasource and not deal with the parameter dialog?

Thanks
 
Interesting! I've didn't know that about SQLQueryStrings and subreports.

I didn't bother trying changing the ConnectionProperties because I thought the same problem would occur (in my mind, it was the OpenSubreport method that was causing the problem, much like when you open a subreport by itself in CR.

Thanks for saving my monitor's life (at least for a few more days).

On a similar note, everything I know about using CR 9 with VB I've learned through trial and error. Can you suggest a good source of sample code for me to peruse and learn from?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top