Showing subreport value in main report page header

  • Thread starter Thread starter Valerie Wong
  • Start date Start date
V

Valerie Wong

Hi,

I have a report with a subreport.

The report (Project Review) is based on a table with following fields
Project ID (Not visibile)
Review Date
Reviewer
Rating at Current Review

and the subreport (Project Background) is based on a query with following
fields
Project ID
Project Name
Project Strategy
Project Price

In the main report's Page Header, I would like to show the Project Name on
each page, therefore in the Page Header of the report i put a text box, with
its control source:

=[Project Background].[Report]![Project Name]

For all the pages, it shows the right name, except on the first page, it
seems to show the Project Name of the last record. Why is that? What is wrong
with my control source expression?

Otherwise is it possible put [Project ID] Field onto the Page header, but
make the report show the corresponding [project name], defined in the Project
Background query?

many thanks in advance.

Regards,
valerie
 
I am not sure why you couldn't add a table/query to your main report's record
source that would have the project name. You should have a project table
where the Project ID is the primary key and includes a field for the Project
Name.
 
Many thanks. As a new user of Access I am not sure how I could do that. How
do I add more than one table to the record source?

Valerie

Duane Hookom said:
I am not sure why you couldn't add a table/query to your main report's record
source that would have the project name. You should have a project table
where the Project ID is the primary key and includes a field for the Project
Name.
--
Duane Hookom
Microsoft Access MVP


Valerie Wong said:
Hi,

I have a report with a subreport.

The report (Project Review) is based on a table with following fields
Project ID (Not visibile)
Review Date
Reviewer
Rating at Current Review

and the subreport (Project Background) is based on a query with following
fields
Project ID
Project Name
Project Strategy
Project Price

In the main report's Page Header, I would like to show the Project Name on
each page, therefore in the Page Header of the report i put a text box, with
its control source:

=[Project Background].[Report]![Project Name]

For all the pages, it shows the right name, except on the first page, it
seems to show the Project Name of the last record. Why is that? What is wrong
with my control source expression?

Otherwise is it possible put [Project ID] Field onto the Page header, but
make the report show the corresponding [project name], defined in the Project
Background query?

many thanks in advance.

Regards,
valerie
 
A report's record source can be a table/query name or an SQL statement (or
blank).

I assume you understand your tables and how to create a query. Build your
query with the required fields and tables and save it with a name you will
remember. Then open your report in design view and set the Record Source
property to the query name.

--
Duane Hookom
Microsoft Access MVP


Valerie Wong said:
Many thanks. As a new user of Access I am not sure how I could do that. How
do I add more than one table to the record source?

Valerie

Duane Hookom said:
I am not sure why you couldn't add a table/query to your main report's record
source that would have the project name. You should have a project table
where the Project ID is the primary key and includes a field for the Project
Name.
--
Duane Hookom
Microsoft Access MVP


Valerie Wong said:
Hi,

I have a report with a subreport.

The report (Project Review) is based on a table with following fields
Project ID (Not visibile)
Review Date
Reviewer
Rating at Current Review

and the subreport (Project Background) is based on a query with following
fields
Project ID
Project Name
Project Strategy
Project Price

In the main report's Page Header, I would like to show the Project Name on
each page, therefore in the Page Header of the report i put a text box, with
its control source:

=[Project Background].[Report]![Project Name]

For all the pages, it shows the right name, except on the first page, it
seems to show the Project Name of the last record. Why is that? What is wrong
with my control source expression?

Otherwise is it possible put [Project ID] Field onto the Page header, but
make the report show the corresponding [project name], defined in the Project
Background query?

many thanks in advance.

Regards,
valerie
 
Back
Top