If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
on no data - need to show SOMETHING
I have a group of 5 reports. 3 of the 5 often have nothing to report.
I use Cancel=True in the On NoData event for the reports because whene there is no data, several of the report fields say "Error". I want the report to print the phrase "No data for this report" and not see any of the errors in the empy fields. How ?? |
#2
|
|||
|
|||
on no data - need to show SOMETHING
DavPet wrote:
I have a group of 5 reports. 3 of the 5 often have nothing to report. I use Cancel=True in the On NoData event for the reports because whene there is no data, several of the report fields say "Error". I want the report to print the phrase "No data for this report" and not see any of the errors in the empy fields. Using the NoData event to cancel a subreport has no signiicant effect because a subreport with no data will not do anything. A mainreport text box can check if a subreport has no data and display whatever you want by using an expression like: =IIf(subreport.Report.HasData, subreport.Report.subreporttextbox, "No data for this report") -- Marsh MVP [MS Access] |
#3
|
|||
|
|||
on no data - need to show SOMETHING
"Marshall Barton" wrote in message ... DavPet wrote: I have a group of 5 reports. 3 of the 5 often have nothing to report. I use Cancel=True in the On NoData event for the reports because whene there is no data, several of the report fields say "Error". I want the report to print the phrase "No data for this report" and not see any of the errors in the empy fields. Using the NoData event to cancel a subreport has no signiicant effect because a subreport with no data will not do anything. These are not subreports but 5 separate reports printed as a group. A mainreport text box can check if a subreport has no data and display whatever you want by using an expression like: =IIf(subreport.Report.HasData, subreport.Report.subreporttextbox, "No data for this report") -- Marsh MVP [MS Access] |
#4
|
|||
|
|||
on no data - need to show SOMETHING
so you want a page to print for a report even if there is no data? if so,
here's one solution: in each report's Design view, add a Label control, i'll call it "Label6". you'll have to type something in it so it will "stick" - it doesn't matter what. in the Properties box, set the label's Visible property to No. in each report's NoData event procedure, remove the "Cancel = True" code. replace it with the following, as Dim ctrl As Control For Each ctrl In Me.Controls If ctrl.Name = "Label6" Then ctrl.Caption = Me.Caption & " has no data." ctrl.Visible = True Else ctrl.Visible = False End If Next ctrl if there's no data, all controls in the report will be hidden, and the Label6 control will be unhidden. the report will print (or preview) normally. hth "DavPet" wrote in message ... "Marshall Barton" wrote in message ... DavPet wrote: I have a group of 5 reports. 3 of the 5 often have nothing to report. I use Cancel=True in the On NoData event for the reports because whene there is no data, several of the report fields say "Error". I want the report to print the phrase "No data for this report" and not see any of the errors in the empy fields. Using the NoData event to cancel a subreport has no signiicant effect because a subreport with no data will not do anything. These are not subreports but 5 separate reports printed as a group. A mainreport text box can check if a subreport has no data and display whatever you want by using an expression like: =IIf(subreport.Report.HasData, subreport.Report.subreporttextbox, "No data for this report") -- Marsh MVP [MS Access] |
#5
|
|||
|
|||
on no data - need to show SOMETHING
Thanks. This is what I wanted.
"tina" wrote in message ... so you want a page to print for a report even if there is no data? if so, here's one solution: in each report's Design view, add a Label control, i'll call it "Label6". you'll have to type something in it so it will "stick" - it doesn't matter what. in the Properties box, set the label's Visible property to No. in each report's NoData event procedure, remove the "Cancel = True" code. replace it with the following, as Dim ctrl As Control For Each ctrl In Me.Controls If ctrl.Name = "Label6" Then ctrl.Caption = Me.Caption & " has no data." ctrl.Visible = True Else ctrl.Visible = False End If Next ctrl if there's no data, all controls in the report will be hidden, and the Label6 control will be unhidden. the report will print (or preview) normally. hth "DavPet" wrote in message ... "Marshall Barton" wrote in message ... DavPet wrote: I have a group of 5 reports. 3 of the 5 often have nothing to report. I use Cancel=True in the On NoData event for the reports because whene there is no data, several of the report fields say "Error". I want the report to print the phrase "No data for this report" and not see any of the errors in the empy fields. Using the NoData event to cancel a subreport has no signiicant effect because a subreport with no data will not do anything. These are not subreports but 5 separate reports printed as a group. A mainreport text box can check if a subreport has no data and display whatever you want by using an expression like: =IIf(subreport.Report.HasData, subreport.Report.subreporttextbox, "No data for this report") -- Marsh MVP [MS Access] |
#6
|
|||
|
|||
on no data - need to show SOMETHING
you're welcome
"DavPet" wrote in message ... Thanks. This is what I wanted. "tina" wrote in message ... so you want a page to print for a report even if there is no data? if so, here's one solution: in each report's Design view, add a Label control, i'll call it "Label6". you'll have to type something in it so it will "stick" - it doesn't matter what. in the Properties box, set the label's Visible property to No. in each report's NoData event procedure, remove the "Cancel = True" code. replace it with the following, as Dim ctrl As Control For Each ctrl In Me.Controls If ctrl.Name = "Label6" Then ctrl.Caption = Me.Caption & " has no data." ctrl.Visible = True Else ctrl.Visible = False End If Next ctrl if there's no data, all controls in the report will be hidden, and the Label6 control will be unhidden. the report will print (or preview) normally. hth "DavPet" wrote in message ... "Marshall Barton" wrote in message ... DavPet wrote: I have a group of 5 reports. 3 of the 5 often have nothing to report. I use Cancel=True in the On NoData event for the reports because whene there is no data, several of the report fields say "Error". I want the report to print the phrase "No data for this report" and not see any of the errors in the empy fields. Using the NoData event to cancel a subreport has no signiicant effect because a subreport with no data will not do anything. These are not subreports but 5 separate reports printed as a group. A mainreport text box can check if a subreport has no data and display whatever you want by using an expression like: =IIf(subreport.Report.HasData, subreport.Report.subreporttextbox, "No data for this report") -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I save an access document in word document? | cmartin | General Discussion | 2 | September 13th, 2005 11:26 PM |
Help PLEASE! Not sure what answer is: Match? Index? Other? | baz | Worksheet Functions | 7 | September 3rd, 2005 03:47 PM |
Unable to have multiple queries feeding a single report | PZ Straube | Setting Up & Running Reports | 15 | June 15th, 2005 08:16 AM |
strategy for data entry in multiple tables | LAF | Using Forms | 18 | April 25th, 2005 04:04 AM |
How to create graphs in a monthly report where the base data can change | John Clarke | Charts and Charting | 3 | June 25th, 2004 02:22 AM |