Copying sub reports - third time around

P

phm

How else do you express frustration of having had two, count the messages,
two people respond with none answers; why respond if not to answer the
question? Or are credits given for number of responses, rather than
resolutions.

so, how do i copy a subreport and change the datasource, all small letters.
 
D

Duane Hookom

Most of the time, the OP would post back in the thread where some of us had
tried to help. They provide some information about what they tried and why it
worked or didn't work. It also is nice if you say "thanks for trying to help".

What you don't generally do is start a new thread complaining about an old
thread. Those of us who answer questions, typically are more interested
helping than earning any type of credits.
 
C

Clifford Bass via AccessMonster.com

Hi,

The others offered answers, but they may not have fully understood what
you were attempting to accomplish. Perhaps because your original request was
not clear. Or perhaps they see a much better way to do what you are asking
and were suggesting that you do it in that better way.

The easiest thing to do is have your subreport provide all six groupings,
with an appropriate breakage between each grouping. If you want more
information about this post back with more details about your situation.

Be that as it may, if you really want to have six subreports: Close the
main report and/or the subreport. While in the Database window (2003 and
earlier) or in the Navigator (2007 and later) select the subreport and copy
it. Then paste it five times, naming as desired. Next open each subreport
in design view and change the Record Source as you would any report. Close
and save. Finally in your main report while in design view, add each of the
new five subreports with the subreport icon. Please note that if you make a
change in one subreport's format you will need make that change in all six.
Or you will need to delete five of them and repeat the above process.

Clifford Bass
 
G

Gina Whipp

PHM,

I'm feeling a little small here... I answered your question! However, note
your questions was... "Can I...." not "How do I...." Kind of rude to
insult the volunteers and indicate you did not get an answer when in fact
you did... Kind of rude to start a new thread instead of just posting you
clarified question to the same post. You simply misphrased your question
but you did get an answer. To answer you second question...

1. In the Object WIndow highlight the report/subreport you want to copy.
2. On you keyboard press Ctrl+C then...
3. Crtl+V and in the window that opens up type the new name for your
report/subreport
4. Go to Design View of the report and in the Properties Window select a new
RecordSource...
5. Change the fields on the report to correspond to your new RecordSource

As a side note, since we are UNpaid volunteers. We answer because we want
to help. So perhaps you could take a breath and think that perhaps your
question was not as clear as you thought it was. (Thank you for not yelling
at us in this post! <smile>)

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
D

Duane Hookom

I really think creating multiple reports is not the solution. If the only
difference is the set of records then a single subreport pasted into the
main report would be the best option. You can use the Link Master/Child
properties to filter the set of records displayed in each subreport.

You wouldn't create a separate Order Details subform for each unique order.
For the same reason, you would not create a new subreport for each different
region. What happens when you get another region?

I did make this suggestion in a previous thread but my suggestion got no
response.

Duane Hookom
MS Access MVP
 
G

Gina Whipp

Duane,

What the Poster is doing makes no sense to me either but with *tone* with
which the first (all caps) and second (insulting) were asked I did not get
the impression there was any room for discussion. So, I simply answered the
question.

Perhaps seeing your additional response will invite a *conversation* that
will lead to a better solution.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
C

Clifford Bass via AccessMonster.com

Hi Duane,

I agree with Gina, the request does not make sense. Is he trying to do
this?

Main Report
Main Detail - no region specific information
Subreport1
Subreport2
Subreport3
Subreport4
Subreport5
Subreport6

Or?

Main Report
Region Group
Main Detail
Subreport

Or?

Main Report
Main Detail

Totally different report, erroneously being called a subreport but really a
separate report-Region #1
Totally different report ...-Region #2
Totally different report ...-Region #3
Totally different report ...-Region #4
Totally different report ...-Region #5
Totally different report ...-Region #6

Or something else?

I do have a question for you: Are you suggesting that he have six or
whatever copies of the subreport placed in the main detail? If so, how does
the Master/Child link work? Or are you assuming that there is region
grouping information in the main detail? I was assuming not. Too many
assumptions going on here :)

Clifford Bass
 
D

Duane Hookom

You can have one copy of the subreport in a section of the main report that
contains a unique region value. Each region would render its own copy of the
subreport filter to that region.

You could also have 7 copies of the same subreport in the detail section of
a main report. I create calendar reports like this with the same "DAY"
subreport copied 7 times across a detail section to produce one week of days.

I have an aversion to creating multiple similar objects whether its
repeating fields in a table or multiple identical queries with the only
difference being the subset of records or several reports that are the same
only based on different queries or similar tables but for different years or
.....

I can't imagine why the different regions would have different subreports.
If the regions each have their own table (which wouldn't surprise me) then
you could union them together and use my suggestion.

I don't know if we will ever find out. If I'm wrong, I will buy someone a
drink next month ;-)
 
C

Clifford Bass via AccessMonster.com

Hi Duane,

Okay, so you were thinking the region information is available in the
main report. That makes sense. For some reason I was thinking the opposite.

I am still trying to fully grasp your idea of the same subreport, but
with multiple instances. For the calendar one, did you then have seven
different day (date) fields in your main record source? So the first
instance of the subreport linked on say Day_1 in the main report to The_Day
in the subreport? And the second Day_2/The_Day, etc.?

I completely agree about having multiple copies of similar objects and
have done some interesting things to deal with that.

Your time in answering me is most appreciated!

Clifford Bass
 
D

Duane Hookom

My calendar report available at http://www.access.hookom.net/Samples.htm has
a record source on the main report that includes a WeekOf field with values
like:
1/3/2010
1/10/2010
1/17/2010
I then create text boxes across the detail section with control sources like:
=[WeekOf]+0
=[WeekOf]+1
=[WeekOf]+2
I can then use these 7 (or 5 if only workweek) text boxes as the Link Master
for the individual copies of the same subreport.
 
C

Clifford Bass via AccessMonster.com

Hi Duane,

Ah, the light dawns. I did not realize you could link on non-record
source items such as text boxes. That because the linking wizard does not
offer that option and complains if you try to do so. Very interesting!!!

Learn something new! Thanks again!

Clifford Bass

Duane said:
My calendar report available at http://www.access.hookom.net/Samples.htm has
a record source on the main report that includes a WeekOf field with values
like:
1/3/2010
1/10/2010
1/17/2010
I then create text boxes across the detail section with control sources like:
=[WeekOf]+0
=[WeekOf]+1
=[WeekOf]+2
I can then use these 7 (or 5 if only workweek) text boxes as the Link Master
for the individual copies of the same subreport.
 
G

Gina Whipp

Clifford,

Or combo boxes... No the wizard does not bo you can just type them in or
set them in code.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
Clifford Bass via AccessMonster.com said:
Hi Duane,

Ah, the light dawns. I did not realize you could link on non-record
source items such as text boxes. That because the linking wizard does not
offer that option and complains if you try to do so. Very interesting!!!

Learn something new! Thanks again!

Clifford Bass

Duane said:
My calendar report available at http://www.access.hookom.net/Samples.htm
has
a record source on the main report that includes a WeekOf field with
values
like:
1/3/2010
1/10/2010
1/17/2010
I then create text boxes across the detail section with control sources
like:
=[WeekOf]+0
=[WeekOf]+1
=[WeekOf]+2
I can then use these 7 (or 5 if only workweek) text boxes as the Link
Master
for the individual copies of the same subreport.
 
C

Clifford Bass via AccessMonster.com

Hi Gina,

Sometimes one does something in a particular fashion for so long that
one forgets to think outside the pattern.

Thanks,

Clifford Bass
 
D

Duane Hookom

At least we're having a good time and learning new things in this thread ;-)

I don't like setting the Link Master/Child properties in code (forms or
reports). It seems to me I have had issues with this but it was a number of
years (and versions) ago.

I expect you could create a 5 or 7 column subreport for a calendar but you
would have to make sure every date was rendered.
 
C

Clifford Bass via AccessMonster.com

Hi Duane,

Yes, and that makes for a good Friday!

I would agree with you about changing the links in code.

A good weekend to you all!

Clifford Bass
 
D

Duane Hookom

First, I believe I have only tried this with forms and subforms. I recall
having serious corruption issues when attempting to change these properties.
Like I said it was quite a few years ago.

Now, I don't even recall why I thought I needed to change the properties.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top