Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No data in report but subreport have to display data?

Status
Not open for further replies.

MaddiMond

Technical User
Mar 28, 2005
76
US
I created a report based on a parameter query with parameter employee and date. This report contains many subreports. I ran a report for the current month and because there was no sale made this month, nothing showed up, not even the employee name in the report header and the subreports displayed errors. The problems is, that some subreports carry data from previous reports, are linked to the main report by employee and should show up despite the no data in the report. How can I enable that at least the employee name and date shows up although there is no further data for the detail section?
Thanks.

Maddi
 
Alter your report's record source to make sure that every employee is included. You may still get errors with the subreport references if there are no records in the subreports. If this is the case, then come back with more information.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi Duane,

The report is based on a parameter query. Criteria: [Enter Month and Year] and a reference to the combo box in a form [Forms]![Sales Calculation Worksheet].[EmployeeID]. It works like this: In a form they choose the employee name in combo box and subform is based on the employee they chose in the combo box of the main form. Also, there is a button in the form called Preview Report. When they click on it, a parameter box opens, where they enter Date for the report. They want to look at Bob Smith and Month March 2005, but Bob Smith has no entry for Month March in subreport. So they choose bob smith in combo and enter march, but report does not even show employee name....

Maddi
 
If there is no data for Bob Smith for that time period, you can't bind a control to the report's record source and expect to see anything. If your form has "Bob Smith" on it then you can add a text box to the Report Header like:
=[Forms]![Sales Calculation Worksheet].txtEmployee

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top