By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,269 Members | 1,507 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,269 IT Pros & Developers. It's quick & easy.

Reuse (re-use) of subreport possible? (8-times)

P: n/a
Hi all,

I created a main report with a subreport. I want to display this
subreport 8 times but with different data. (I do that with
subreport.RecordSource = "sqlstring")
HOW do I set this RecordSource for the subreports, in other words, how
do I know on what subreport I'am on when opening the main report.

Or are there better way's to (re)use the same subreport, but with
different data?

thanks in advance,
Eddie Smit Holland.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Eddie,
I think you could use the same subreport 8 times on your mainreport.
Start with one subreport and just copy and paste the subreportcontrol.
All controls must have different names so your subreportcontrols all get different names.
Like subreport1, subreport2 ...
Then simply assign the proper recordsource to each of the subreportcontrols.
No need to do this in code this way.

--
Hope this helps
Arno R

"Eddie Smit" <ed*******@freeler.nl> schreef in bericht
news:9d**************************@posting.google.c om...
Hi all,

I created a main report with a subreport. I want to display this
subreport 8 times but with different data. (I do that with
subreport.RecordSource = "sqlstring")
HOW do I set this RecordSource for the subreports, in other words, how
do I know on what subreport I'am on when opening the main report.

Or are there better way's to (re)use the same subreport, but with
different data?

thanks in advance,
Eddie Smit Holland.

Nov 12 '05 #2

P: n/a
assuming you're reusing the same subreport 8 times with the same
report, each sub report would be named, so in the main report, use
subreport1.RecordSource = "sqlstring"
..
..
subreport8.RecordSource = "sqlstring"
if your using the subreport in 8 main reports, again, in the main
report, use the sub report name to set the string
if you're trying to see the string with the subreport and you want to
know who its parent is, use subreport.parent

ed*******@freeler.nl (Eddie Smit) wrote in message news:<9d**************************@posting.google. com>...
Hi all,

I created a main report with a subreport. I want to display this
subreport 8 times but with different data. (I do that with
subreport.RecordSource = "sqlstring")
HOW do I set this RecordSource for the subreports, in other words, how
do I know on what subreport I'am on when opening the main report.

Or are there better way's to (re)use the same subreport, but with
different data?

thanks in advance,
Eddie Smit Holland.

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.