Pulling back sub-report

N

Novice2000

Hello,

I have created a report that has a sub-report in the middle. I have it
arranged so that you have to enter a client number to pull back informtion
for just that client. The top of the report populates correctly, but the
sub-form is bringing back data for all clients.

How can I get the sub-report to pull back data for just the client number
entered for the main report?

Here is the code for the main report:

SELECT client_projection.pol_yr, client_projection.policy,
client_projection.payments_4yr, client_projection.rate, client_projection.py,
client2.Client_Name, client2.loc FROM client2 INNER JOIN client_projection ON
client2.loc=client_projection.policy WHERE client2.loc=[Enter Client
Number:];
 
A

Allen Browne

Open the main report in design view.

Right-click the edge of the subreport, and choose Properties.

On the Data tab, set the Link Master Fields to the name of the ClientID
field in the main report, and the Link Child Fields to the name of the
matching ClientID field in the subreport.
 
N

Novice2000

Sorry Duane and Allen. I am pretty new to this. Exactly where is the "link
master/child" property of the subreport control. I am not sure what you mean
by that. All I can see in the data tab is:
Record Source
Filter
Filter On
Order by
Order by on

Duane Hookom said:
Add the loc field to the link master/child properties of your subreport
control.

Also consider changing your parameter prompt queries to use references to
controls on forms http://www.tek-tips.com/faqs.cfm?fid=6763.

--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Novice2000 said:
Hello,

I have created a report that has a sub-report in the middle. I have it
arranged so that you have to enter a client number to pull back informtion
for just that client. The top of the report populates correctly, but the
sub-form is bringing back data for all clients.

How can I get the sub-report to pull back data for just the client number
entered for the main report?

Here is the code for the main report:

SELECT client_projection.pol_yr, client_projection.policy,
client_projection.payments_4yr, client_projection.rate, client_projection.py,
client2.Client_Name, client2.loc FROM client2 INNER JOIN client_projection ON
client2.loc=client_projection.policy WHERE client2.loc=[Enter Client
Number:];
 
D

Duane Hookom

You might be looking at the properties of the wrong object. First select the
main report and then single click the subreport control.

--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Novice2000 said:
Sorry Duane and Allen. I am pretty new to this. Exactly where is the "link
master/child" property of the subreport control. I am not sure what you mean
by that. All I can see in the data tab is:
Record Source
Filter
Filter On
Order by
Order by on

Duane Hookom said:
Add the loc field to the link master/child properties of your subreport
control.

Also consider changing your parameter prompt queries to use references to
controls on forms http://www.tek-tips.com/faqs.cfm?fid=6763.

--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Novice2000 said:
Hello,

I have created a report that has a sub-report in the middle. I have it
arranged so that you have to enter a client number to pull back informtion
for just that client. The top of the report populates correctly, but the
sub-form is bringing back data for all clients.

How can I get the sub-report to pull back data for just the client number
entered for the main report?

Here is the code for the main report:

SELECT client_projection.pol_yr, client_projection.policy,
client_projection.payments_4yr, client_projection.rate, client_projection.py,
client2.Client_Name, client2.loc FROM client2 INNER JOIN client_projection ON
client2.loc=client_projection.policy WHERE client2.loc=[Enter Client
Number:];
 
N

Novice2000

I appreciate your help, but I have clicked all over the thing and I get no
properties much less Link Master Fields. Do you mean clicking the little gray
box placing a black square in it then viewing properties? When I do that I
don't see the Link Master fields either. Sorry to be so new.

Allen Browne said:
Open the main report in design view.

Right-click the edge of the subreport, and choose Properties.

On the Data tab, set the Link Master Fields to the name of the ClientID
field in the main report, and the Link Child Fields to the name of the
matching ClientID field in the subreport.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Novice2000 said:
Hello,

I have created a report that has a sub-report in the middle. I have it
arranged so that you have to enter a client number to pull back informtion
for just that client. The top of the report populates correctly, but the
sub-form is bringing back data for all clients.

How can I get the sub-report to pull back data for just the client number
entered for the main report?

Here is the code for the main report:

SELECT client_projection.pol_yr, client_projection.policy,
client_projection.payments_4yr, client_projection.rate,
client_projection.py,
client2.Client_Name, client2.loc FROM client2 INNER JOIN client_projection
ON
client2.loc=client_projection.policy WHERE client2.loc=[Enter Client
Number:];
 
D

Duane Hookom

Just to be sure, we are talking about a report with a subreport. You want the
subreport to be filtered by a value from a field in the main report. When you
select the subreport control on the main report (this is the entire subreport
control) you should see the re-sizing handles on all four corners and all
four sides of the subreport control. When you now view the properties of the
subreport control, the title bar of the properties dialog should state
"subform/subreport ....".

You should find three properties on the Data tab: Source Object, Link Child
Fields, and Link Master Fields.
--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Novice2000 said:
I appreciate your help, but I have clicked all over the thing and I get no
properties much less Link Master Fields. Do you mean clicking the little gray
box placing a black square in it then viewing properties? When I do that I
don't see the Link Master fields either. Sorry to be so new.

Allen Browne said:
Open the main report in design view.

Right-click the edge of the subreport, and choose Properties.

On the Data tab, set the Link Master Fields to the name of the ClientID
field in the main report, and the Link Child Fields to the name of the
matching ClientID field in the subreport.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Novice2000 said:
Hello,

I have created a report that has a sub-report in the middle. I have it
arranged so that you have to enter a client number to pull back informtion
for just that client. The top of the report populates correctly, but the
sub-form is bringing back data for all clients.

How can I get the sub-report to pull back data for just the client number
entered for the main report?

Here is the code for the main report:

SELECT client_projection.pol_yr, client_projection.policy,
client_projection.payments_4yr, client_projection.rate,
client_projection.py,
client2.Client_Name, client2.loc FROM client2 INNER JOIN client_projection
ON
client2.loc=client_projection.policy WHERE client2.loc=[Enter Client
Number:];
 
N

Novice2000

I see the re-sizing handles on all four corners and all four sides.
Properties shows it as "client_sub_report" for the caption. The blue bar only
says "Report".

Duane Hookom said:
Just to be sure, we are talking about a report with a subreport. You want the
subreport to be filtered by a value from a field in the main report. When you
select the subreport control on the main report (this is the entire subreport
control) you should see the re-sizing handles on all four corners and all
four sides of the subreport control. When you now view the properties of the
subreport control, the title bar of the properties dialog should state
"subform/subreport ....".

You should find three properties on the Data tab: Source Object, Link Child
Fields, and Link Master Fields.
--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Novice2000 said:
I appreciate your help, but I have clicked all over the thing and I get no
properties much less Link Master Fields. Do you mean clicking the little gray
box placing a black square in it then viewing properties? When I do that I
don't see the Link Master fields either. Sorry to be so new.

Allen Browne said:
Open the main report in design view.

Right-click the edge of the subreport, and choose Properties.

On the Data tab, set the Link Master Fields to the name of the ClientID
field in the main report, and the Link Child Fields to the name of the
matching ClientID field in the subreport.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Hello,

I have created a report that has a sub-report in the middle. I have it
arranged so that you have to enter a client number to pull back informtion
for just that client. The top of the report populates correctly, but the
sub-form is bringing back data for all clients.

How can I get the sub-report to pull back data for just the client number
entered for the main report?

Here is the code for the main report:

SELECT client_projection.pol_yr, client_projection.policy,
client_projection.payments_4yr, client_projection.rate,
client_projection.py,
client2.Client_Name, client2.loc FROM client2 INNER JOIN client_projection
ON
client2.loc=client_projection.policy WHERE client2.loc=[Enter Client
Number:];
 
D

Duane Hookom

You are viewing the properties of the subreport. Click back on the main
report and then single click the subreport to view the control properties. I
find it hard to believe the re-sizing handles are displaying when the
property dialog caption is "Report". My properties title is "Report" only
when the subreport's handles are not displayed.

--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Novice2000 said:
I see the re-sizing handles on all four corners and all four sides.
Properties shows it as "client_sub_report" for the caption. The blue bar only
says "Report".

Duane Hookom said:
Just to be sure, we are talking about a report with a subreport. You want the
subreport to be filtered by a value from a field in the main report. When you
select the subreport control on the main report (this is the entire subreport
control) you should see the re-sizing handles on all four corners and all
four sides of the subreport control. When you now view the properties of the
subreport control, the title bar of the properties dialog should state
"subform/subreport ....".

You should find three properties on the Data tab: Source Object, Link Child
Fields, and Link Master Fields.
--
Duane Hookom
Microsoft Access MVP
If I have helped you, please help me by donating to UCP
http://www.access.hookom.net/UCP/Default.htm


Novice2000 said:
I appreciate your help, but I have clicked all over the thing and I get no
properties much less Link Master Fields. Do you mean clicking the little gray
box placing a black square in it then viewing properties? When I do that I
don't see the Link Master fields either. Sorry to be so new.

:

Open the main report in design view.

Right-click the edge of the subreport, and choose Properties.

On the Data tab, set the Link Master Fields to the name of the ClientID
field in the main report, and the Link Child Fields to the name of the
matching ClientID field in the subreport.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Hello,

I have created a report that has a sub-report in the middle. I have it
arranged so that you have to enter a client number to pull back informtion
for just that client. The top of the report populates correctly, but the
sub-form is bringing back data for all clients.

How can I get the sub-report to pull back data for just the client number
entered for the main report?

Here is the code for the main report:

SELECT client_projection.pol_yr, client_projection.policy,
client_projection.payments_4yr, client_projection.rate,
client_projection.py,
client2.Client_Name, client2.loc FROM client2 INNER JOIN client_projection
ON
client2.loc=client_projection.policy WHERE client2.loc=[Enter Client
Number:];
 
N

Novice2000

I think the problem is that other people are in the database as I am trying
to work with it. I saved the reports and their links to the data in a
spearate database and now I can see the Link Child Fields. I will now try the
other device and see if I can get it going. Thanks for the advice.
 

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