473,385 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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
2 2781
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Downstreamer | last post by:
Design is as follows: A form for the user to input criteria to be used as the where part of the report's recordsource. This includes a multiselect list box as part of the criteria selection. ...
7
by: Ellen Manning | last post by:
I've got an A2K report showing students and their costs. Student info is in the main report and costs are in a subreport for each student. The user inputs the program desired then only those...
1
by: shaqattack1992-newsgroups | last post by:
I know this is kind of a weird question, but is there anyway to give a subreport control of a main report? I posted my situation earlier about having drawings print out after a group. I have a...
1
by: Beowulf | last post by:
I'm having some difficulty and I can't for the life of me figure out why. I have a main report, rptMain, that contains a report header (displays the AppTitle), 3 group headers (one is a header...
3
by: Simon | last post by:
Hi all, I'm hoping that some of you clever chaps could offer me some advice on code reuse. You see, whenever I make applications, I typically only find very limited
1
by: Amita K | last post by:
Hello Friend I am preparing a crystal report with Master-Detail kind of data. i have placed a subreport such that it shall display detail data after each row of main report. I know we can place...
1
by: pdm | last post by:
hoi access, I have a subreport and with the id of inheritance of OOP I like to reuse this subreport in other main reports and hide some fields. First, is this possible and second what is the...
3
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RecordSource of a Master Report is: Me.RecordSource = "TableOrQueryName"
3
by: Simon van Beek | last post by:
Dear reader, How to change the RecordSource for a subReport. For forms the syntaxes is:
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.