|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
I have a report with three subreports. All three have a have a text box with the control source of =[RecordCount]. Now I'd like to total those up and place them in a text box on the Parent report. However, I'm having difficulty with this.
|
|
1) What expression did you try? 2) What were your results? 3) Do you have some subreport names? 4) What is the name of control with the control source of =[RecordCount]? 5) What section of the subreport is this control located in? 6) Is it possible that one or more of the subreports might not return any records?
-- Duane Hookom MS Access MVP
"Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message news:7477B3D9-7B06-4E19-99A6-074A3501776A[ at ]microsoft.com...
[Quoted Text] >I have a report with three subreports. All three have a have a text box >with > the control source of =[RecordCount]. Now I'd like to total those up and > place them in a text box on the Parent report. However, I'm having > difficulty with this.
|
|
Actually it's four subreports on one main report. The Main report is named "Statistical Report - Type of Audits-Main Report", then there are four subreports named: Statistical Sub-Report - Type of Audit-Both SSA and FSA Statistical Sub-Report - Type of Audit-FSA Only Statistical Sub-Report - Type of Audit-Other Audits Statistical Sub-Report - Type of Audit-SSA Only each of these reports have a text box with the control source of =[RecordCount]. The text boxes are named total1, total2, total3, total4. These text boxes are located in the group footer of the report's data.
I tried putting a text box on the main report with the following as a control source but that gave me a name? error. All of these reports should return records.
= Reports![Statistical Sub-Report - Type of Audit-Both SSA and FSA]![total1] + Reports![Statistical Sub-Report - Type of Audit-FSA Only]![total2] + Reports![Statistical Sub-Report - Type of Audit-SSA Only]![total3] + Reports![Statistical Sub-Report - Type of Audit-Other Audits]![total4]
"Duane Hookom" wrote:
[Quoted Text] > 1) What expression did you try? > 2) What were your results? > 3) Do you have some subreport names? > 4) What is the name of control with the control source of =[RecordCount]? > 5) What section of the subreport is this control located in? > 6) Is it possible that one or more of the subreports might not return any > records? > > -- > Duane Hookom > MS Access MVP > > "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message > news:7477B3D9-7B06-4E19-99A6-074A3501776A[ at ]microsoft.com... > >I have a report with three subreports. All three have a have a text box > >with > > the control source of =[RecordCount]. Now I'd like to total those up and > > place them in a text box on the Parent report. However, I'm having > > difficulty with this. > > >
|
|
If all subreports have data then this might work: =[Statistical Sub-Report - Type of Audit-Both SSA and FSA].Report![total1] + [Statistical Sub-Report - Type of Audit-FSA Only].Report![total2] + [Statistical Sub-Report - Type of Audit-SSA Only].Report![total3] + [Statistical Sub-Report - Type of Audit-Other Audits].Report![total4]
The above text box might have to be in the same section of the main report as the subreports.
-- Duane Hookom MS Access MVP
"Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message news:A3B20C5D-81C1-435F-B5D4-E78773719F85[ at ]microsoft.com...
[Quoted Text] > Actually it's four subreports on one main report. The Main report is > named > "Statistical Report - Type of Audits-Main Report", then there are four > subreports named: > Statistical Sub-Report - Type of Audit-Both SSA and FSA > Statistical Sub-Report - Type of Audit-FSA Only > Statistical Sub-Report - Type of Audit-Other Audits > Statistical Sub-Report - Type of Audit-SSA Only > each of these reports have a text box with the control source of > =[RecordCount]. The text boxes are named total1, total2, total3, total4. > These text boxes are located in the group footer of the report's data. > > I tried putting a text box on the main report with the following as a > control source but that gave me a name? error. All of these reports > should > return records. > > = Reports![Statistical Sub-Report - Type of Audit-Both SSA and > FSA]![total1] > + Reports![Statistical Sub-Report - Type of Audit-FSA Only]![total2] + > Reports![Statistical Sub-Report - Type of Audit-SSA Only]![total3] + > Reports![Statistical Sub-Report - Type of Audit-Other Audits]![total4] > > > > "Duane Hookom" wrote: > >> 1) What expression did you try? >> 2) What were your results? >> 3) Do you have some subreport names? >> 4) What is the name of control with the control source of =[RecordCount]? >> 5) What section of the subreport is this control located in? >> 6) Is it possible that one or more of the subreports might not return any >> records? >> >> -- >> Duane Hookom >> MS Access MVP >> >> "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message >> news:7477B3D9-7B06-4E19-99A6-074A3501776A[ at ]microsoft.com... >> >I have a report with three subreports. All three have a have a text box >> >with >> > the control source of =[RecordCount]. Now I'd like to total those up >> > and >> > place them in a text box on the Parent report. However, I'm having >> > difficulty with this. >> >> >>
|
|
That still gives me the same error as what I tried. (name?) All the subreports are in the detail section of the main report and that's where I'm trying to add this. All the subreports have records returned.
"Duane Hookom" wrote:
[Quoted Text] > If all subreports have data then this might work: > =[Statistical Sub-Report - Type of Audit-Both SSA and FSA].Report![total1] > + [Statistical Sub-Report - Type of Audit-FSA Only].Report![total2] > + [Statistical Sub-Report - Type of Audit-SSA Only].Report![total3] > + [Statistical Sub-Report - Type of Audit-Other Audits].Report![total4] > > The above text box might have to be in the same section of the main report > as the subreports. > > > -- > Duane Hookom > MS Access MVP > > > "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message > news:A3B20C5D-81C1-435F-B5D4-E78773719F85[ at ]microsoft.com... > > Actually it's four subreports on one main report. The Main report is > > named > > "Statistical Report - Type of Audits-Main Report", then there are four > > subreports named: > > Statistical Sub-Report - Type of Audit-Both SSA and FSA > > Statistical Sub-Report - Type of Audit-FSA Only > > Statistical Sub-Report - Type of Audit-Other Audits > > Statistical Sub-Report - Type of Audit-SSA Only > > each of these reports have a text box with the control source of > > =[RecordCount]. The text boxes are named total1, total2, total3, total4. > > These text boxes are located in the group footer of the report's data. > > > > I tried putting a text box on the main report with the following as a > > control source but that gave me a name? error. All of these reports > > should > > return records. > > > > = Reports![Statistical Sub-Report - Type of Audit-Both SSA and > > FSA]![total1] > > + Reports![Statistical Sub-Report - Type of Audit-FSA Only]![total2] + > > Reports![Statistical Sub-Report - Type of Audit-SSA Only]![total3] + > > Reports![Statistical Sub-Report - Type of Audit-Other Audits]![total4] > > > > > > > > "Duane Hookom" wrote: > > > >> 1) What expression did you try? > >> 2) What were your results? > >> 3) Do you have some subreport names? > >> 4) What is the name of control with the control source of =[RecordCount]? > >> 5) What section of the subreport is this control located in? > >> 6) Is it possible that one or more of the subreports might not return any > >> records? > >> > >> -- > >> Duane Hookom > >> MS Access MVP > >> > >> "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message > >> news:7477B3D9-7B06-4E19-99A6-074A3501776A[ at ]microsoft.com... > >> >I have a report with three subreports. All three have a have a text box > >> >with > >> > the control source of =[RecordCount]. Now I'd like to total those up > >> > and > >> > place them in a text box on the Parent report. However, I'm having > >> > difficulty with this. > >> > >> > >> > > >
|
|
Did you use the actual subreport "control" names or the name of the subreports? Do you understand the difference? Did you make sure the name of the text box is not also the name of a field?
-- Duane Hookom MS Access MVP
"Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message news:D679CCB7-3824-4CDB-9E7F-ACB436F13CAE[ at ]microsoft.com...
[Quoted Text] > That still gives me the same error as what I tried. (name?) All the > subreports are in the detail section of the main report and that's where > I'm > trying to add this. All the subreports have records returned. > > "Duane Hookom" wrote: > >> If all subreports have data then this might work: >> =[Statistical Sub-Report - Type of Audit-Both SSA and >> FSA].Report![total1] >> + [Statistical Sub-Report - Type of Audit-FSA Only].Report![total2] >> + [Statistical Sub-Report - Type of Audit-SSA Only].Report![total3] >> + [Statistical Sub-Report - Type of Audit-Other Audits].Report![total4] >> >> The above text box might have to be in the same section of the main >> report >> as the subreports. >> >> >> -- >> Duane Hookom >> MS Access MVP >> >> >> "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message >> news:A3B20C5D-81C1-435F-B5D4-E78773719F85[ at ]microsoft.com... >> > Actually it's four subreports on one main report. The Main report is >> > named >> > "Statistical Report - Type of Audits-Main Report", then there are four >> > subreports named: >> > Statistical Sub-Report - Type of Audit-Both SSA and FSA >> > Statistical Sub-Report - Type of Audit-FSA Only >> > Statistical Sub-Report - Type of Audit-Other Audits >> > Statistical Sub-Report - Type of Audit-SSA Only >> > each of these reports have a text box with the control source of >> > =[RecordCount]. The text boxes are named total1, total2, total3, >> > total4. >> > These text boxes are located in the group footer of the report's data. >> > >> > I tried putting a text box on the main report with the following as a >> > control source but that gave me a name? error. All of these reports >> > should >> > return records. >> > >> > = Reports![Statistical Sub-Report - Type of Audit-Both SSA and >> > FSA]![total1] >> > + Reports![Statistical Sub-Report - Type of Audit-FSA Only]![total2] + >> > Reports![Statistical Sub-Report - Type of Audit-SSA Only]![total3] + >> > Reports![Statistical Sub-Report - Type of Audit-Other Audits]![total4] >> > >> > >> > >> > "Duane Hookom" wrote: >> > >> >> 1) What expression did you try? >> >> 2) What were your results? >> >> 3) Do you have some subreport names? >> >> 4) What is the name of control with the control source of >> >> =[RecordCount]? >> >> 5) What section of the subreport is this control located in? >> >> 6) Is it possible that one or more of the subreports might not return >> >> any >> >> records? >> >> >> >> -- >> >> Duane Hookom >> >> MS Access MVP >> >> >> >> "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message >> >> news:7477B3D9-7B06-4E19-99A6-074A3501776A[ at ]microsoft.com... >> >> >I have a report with three subreports. All three have a have a text >> >> >box >> >> >with >> >> > the control source of =[RecordCount]. Now I'd like to total those >> >> > up >> >> > and >> >> > place them in a text box on the Parent report. However, I'm having >> >> > difficulty with this. >> >> >> >> >> >> >> >> >>
|
|
I think I understand that the control name is the name of the subreport in the designview of the main report. Correct me if I'm wrong because I am new to this.
Now I changed the names to match the control names of the subreports. This made the name? error go away but the number is definitely incorrect. The fields I'm trying to add up are all a larger number than the result I'm given, which is the exact number of fields I'm trying to add(4).
Here is the code I used: =[Statistical Report - Type of Audit-FSA Only].Report![total1] + [Child23].Report![total2] + [Statistical Report - Type of Audit-SSA Only].Report![total3] + [Statistical Report - Type of Audit-Other Audits].Report![total4]
"Duane Hookom" wrote:
[Quoted Text] > Did you use the actual subreport "control" names or the name of the > subreports? Do you understand the difference? Did you make sure the name of > the text box is not also the name of a field? > > -- > Duane Hookom > MS Access MVP > > "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message > news:D679CCB7-3824-4CDB-9E7F-ACB436F13CAE[ at ]microsoft.com... > > That still gives me the same error as what I tried. (name?) All the > > subreports are in the detail section of the main report and that's where > > I'm > > trying to add this. All the subreports have records returned. > > > > "Duane Hookom" wrote: > > > >> If all subreports have data then this might work: > >> =[Statistical Sub-Report - Type of Audit-Both SSA and > >> FSA].Report![total1] > >> + [Statistical Sub-Report - Type of Audit-FSA Only].Report![total2] > >> + [Statistical Sub-Report - Type of Audit-SSA Only].Report![total3] > >> + [Statistical Sub-Report - Type of Audit-Other Audits].Report![total4] > >> > >> The above text box might have to be in the same section of the main > >> report > >> as the subreports. > >> > >> > >> -- > >> Duane Hookom > >> MS Access MVP > >> > >> > >> "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message > >> news:A3B20C5D-81C1-435F-B5D4-E78773719F85[ at ]microsoft.com... > >> > Actually it's four subreports on one main report. The Main report is > >> > named > >> > "Statistical Report - Type of Audits-Main Report", then there are four > >> > subreports named: > >> > Statistical Sub-Report - Type of Audit-Both SSA and FSA > >> > Statistical Sub-Report - Type of Audit-FSA Only > >> > Statistical Sub-Report - Type of Audit-Other Audits > >> > Statistical Sub-Report - Type of Audit-SSA Only > >> > each of these reports have a text box with the control source of > >> > =[RecordCount]. The text boxes are named total1, total2, total3, > >> > total4. > >> > These text boxes are located in the group footer of the report's data. > >> > > >> > I tried putting a text box on the main report with the following as a > >> > control source but that gave me a name? error. All of these reports > >> > should > >> > return records. > >> > > >> > = Reports![Statistical Sub-Report - Type of Audit-Both SSA and > >> > FSA]![total1] > >> > + Reports![Statistical Sub-Report - Type of Audit-FSA Only]![total2] + > >> > Reports![Statistical Sub-Report - Type of Audit-SSA Only]![total3] + > >> > Reports![Statistical Sub-Report - Type of Audit-Other Audits]![total4] > >> > > >> > > >> > > >> > "Duane Hookom" wrote: > >> > > >> >> 1) What expression did you try? > >> >> 2) What were your results? > >> >> 3) Do you have some subreport names? > >> >> 4) What is the name of control with the control source of > >> >> =[RecordCount]? > >> >> 5) What section of the subreport is this control located in? > >> >> 6) Is it possible that one or more of the subreports might not return > >> >> any > >> >> records? > >> >> > >> >> -- > >> >> Duane Hookom > >> >> MS Access MVP > >> >> > >> >> "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message > >> >> news:7477B3D9-7B06-4E19-99A6-074A3501776A[ at ]microsoft.com... > >> >> >I have a report with three subreports. All three have a have a text > >> >> >box > >> >> >with > >> >> > the control source of =[RecordCount]. Now I'd like to total those > >> >> > up > >> >> > and > >> >> > place them in a text box on the Parent report. However, I'm having > >> >> > difficulty with this. > >> >> > >> >> > >> >> > >> > >> > >> > > >
|
|
Trouble-shoot by simplifying and testing. Try a text box with only: =[Statistical Report - Type of Audit-FSA Only].Report![total1] Is this number correct? Are the "Total.." text boxes in the report footer of the subreports?
-- Duane Hookom MS Access MVP
"Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message news:F82B0540-DE54-4BE4-AE30-FD9558908DAF[ at ]microsoft.com...
[Quoted Text] >I think I understand that the control name is the name of the subreport in > the designview of the main report. Correct me if I'm wrong because I am > new > to this. > > Now I changed the names to match the control names of the subreports. > This > made the name? error go away but the number is definitely incorrect. The > fields I'm trying to add up are all a larger number than the result I'm > given, which is the exact number of fields I'm trying to add(4). > > Here is the code I used: > =[Statistical Report - Type of Audit-FSA Only].Report![total1] + > [Child23].Report![total2] + [Statistical Report - Type of Audit-SSA > Only].Report![total3] + [Statistical Report - Type of Audit-Other > Audits].Report![total4] > > > > "Duane Hookom" wrote: > >> Did you use the actual subreport "control" names or the name of the >> subreports? Do you understand the difference? Did you make sure the name >> of >> the text box is not also the name of a field? >> >> -- >> Duane Hookom >> MS Access MVP >> >> "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message >> news:D679CCB7-3824-4CDB-9E7F-ACB436F13CAE[ at ]microsoft.com... >> > That still gives me the same error as what I tried. (name?) All the >> > subreports are in the detail section of the main report and that's >> > where >> > I'm >> > trying to add this. All the subreports have records returned. >> > >> > "Duane Hookom" wrote: >> > >> >> If all subreports have data then this might work: >> >> =[Statistical Sub-Report - Type of Audit-Both SSA and >> >> FSA].Report![total1] >> >> + [Statistical Sub-Report - Type of Audit-FSA Only].Report![total2] >> >> + [Statistical Sub-Report - Type of Audit-SSA Only].Report![total3] >> >> + [Statistical Sub-Report - Type of Audit-Other >> >> Audits].Report![total4] >> >> >> >> The above text box might have to be in the same section of the main >> >> report >> >> as the subreports. >> >> >> >> >> >> -- >> >> Duane Hookom >> >> MS Access MVP >> >> >> >> >> >> "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message >> >> news:A3B20C5D-81C1-435F-B5D4-E78773719F85[ at ]microsoft.com... >> >> > Actually it's four subreports on one main report. The Main report >> >> > is >> >> > named >> >> > "Statistical Report - Type of Audits-Main Report", then there are >> >> > four >> >> > subreports named: >> >> > Statistical Sub-Report - Type of Audit-Both SSA and FSA >> >> > Statistical Sub-Report - Type of Audit-FSA Only >> >> > Statistical Sub-Report - Type of Audit-Other Audits >> >> > Statistical Sub-Report - Type of Audit-SSA Only >> >> > each of these reports have a text box with the control source of >> >> > =[RecordCount]. The text boxes are named total1, total2, total3, >> >> > total4. >> >> > These text boxes are located in the group footer of the report's >> >> > data. >> >> > >> >> > I tried putting a text box on the main report with the following as >> >> > a >> >> > control source but that gave me a name? error. All of these reports >> >> > should >> >> > return records. >> >> > >> >> > = Reports![Statistical Sub-Report - Type of Audit-Both SSA and >> >> > FSA]![total1] >> >> > + Reports![Statistical Sub-Report - Type of Audit-FSA Only]![total2] >> >> > + >> >> > Reports![Statistical Sub-Report - Type of Audit-SSA Only]![total3] + >> >> > Reports![Statistical Sub-Report - Type of Audit-Other >> >> > Audits]![total4] >> >> > >> >> > >> >> > >> >> > "Duane Hookom" wrote: >> >> > >> >> >> 1) What expression did you try? >> >> >> 2) What were your results? >> >> >> 3) Do you have some subreport names? >> >> >> 4) What is the name of control with the control source of >> >> >> =[RecordCount]? >> >> >> 5) What section of the subreport is this control located in? >> >> >> 6) Is it possible that one or more of the subreports might not >> >> >> return >> >> >> any >> >> >> records? >> >> >> >> >> >> -- >> >> >> Duane Hookom >> >> >> MS Access MVP >> >> >> >> >> >> "Kaitee" <Kaitee[ at ]discussions.microsoft.com> wrote in message >> >> >> news:7477B3D9-7B06-4E19-99A6-074A3501776A[ at ]microsoft.com... >> >> >> >I have a report with three subreports. All three have a have a >> >> >> >text >> >> >> >box >> >> >> >with >> >> >> > the control source of =[RecordCount]. Now I'd like to total >> >> >> > those >> >> >> > up >> >> >> > and >> >> >> > place them in a text box on the Parent report. However, I'm >> >> >> > having >> >> >> > difficulty with this. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>
|
|
|