I have a report w/ 4 subreports. All five call stored procs. I know how to change the location for ONE report at through VB. My problem is finding an efficient way to change the locations for all 5 reports. Any suggestions??
What you might want to try is to use the SubreportToChange method for the subreports. for example if you are using the connect property then you would use it also for the subreport using the SubreportToChange. here is a sample of what I mean
dim rptSubRpt as CraxDrt.report
dim report as CraxDrt.report
For iint = 2 To 5
Set rptSubRpt = Report.OpenSubreport("rptSavPatientSumm" & iint)
rptSubRpt.Database.Tables(1).Location = "SQL.dbo.Proc(rptSavSum_pg" & iint & "NPar;1)"
Next iint
Since my stored proc names are, excepting a number, the same this seems to work. It will not be quite as simple if/when I am using different names but should be flexible enough to handle that as well. I am going to play around with the example you gave me, to see if I like it better. In the end I want this to be as straight forward as possible.
I am using Crystal 8.0.0.371 and Visual Basic 6.0. I am having a hard time resolving a issue related to Sub-Report embedded in a primary report. I have over 40 Sub-Report, which I guess is alot, I'm not sure of the limits. But when I reach the the 40th Sub-Report in the loop, Crystal goes back and get the name of the first Sub-Report instead of the 41st Sub-Report.
I'm not that skilled in VB or Crystal but could use some help, please
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.