Grand total from two sub-reports (1 Viewer)

Koloss

New member
Local time
Today, 06:21
Joined
Feb 7, 2013
Messages
5
Hello everyone,

I'm stuck....
I have a report, which consists of two subreports.
I have total sums on each report.
I’m trying to get a Grand total from those two totals at the end of the main report.
Whatever I try, I get an error.....
The last thing I tried was :

Code:
=[mySubReportName].[Report]![myTextControlName]+[mySubReportName1].[Report]![myTextControlName1]

Any idea, advice, guidance ?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:21
Joined
May 7, 2009
Messages
19,233
Use queries on both sub report and add Calculated column for the Total.
You can dlookup() the values of these column in the Queries and add them.
 

vhung

Member
Local time
Yesterday, 21:21
Joined
Jul 8, 2020
Messages
235
Hello everyone,

I'm stuck....
I have a report, which consists of two subreports.
I have total sums on each report.
I’m trying to get a Grand total from those two totals at the end of the main report.
Whatever I try, I get an error.....
The last thing I tried was :

Code:
=[mySubReportName].[Report]![myTextControlName]+[mySubReportName1].[Report]![myTextControlName1]

Any idea, advice, guidance ?
nice try;
"Whatever I try, I get an error.....
=[mySubReportName].[Report]![myTextControlName]+[mySubReportName1].[Report]![myTextControlName1]"

>maybe you should try another way
like:
report.onLoad

Dim total1 as string
Dim total2 as string

total1=[mySubReportName].[Report]![myTextControlName]
total2=[mySubReportName1].[Report]![myTextControlName1]

then
mainReportTotal = total1+total2
 

vhung

Member
Local time
Yesterday, 21:21
Joined
Jul 8, 2020
Messages
235
try this code;

[Report 1& 2 Total:] = [Report1].[Report]![AccessTotalscost] + [Report2].[Report]![AccessTotalscost]

>this is the syntax im refering to
>i tried it, works well, either onLoad/click event procedure...
>see reports sample, attachment
 

Attachments

  • reportstotal.png
    reportstotal.png
    38.4 KB · Views: 91

bob fitz

AWF VIP
Local time
Today, 05:21
Joined
May 23, 2011
Messages
4,721
try this code;

[Report 1& 2 Total:] = [Report1].[Report]![AccessTotalscost] + [Report2].[Report]![AccessTotalscost]

>this is the syntax im refering to
>i tried it, works well, either onLoad/click event procedure...
>see reports sample, attachment
If it works, what s the problem?
 

vhung

Member
Local time
Yesterday, 21:21
Joined
Jul 8, 2020
Messages
235
If it works, what s the problem?
no;
i guess Koloss need it "[Report 1& 2 Total:] = [Report1].[Report]![AccessTotalscost] + [Report2].[Report]![AccessTotalscost]"
>Koloss posted:

Hello everyone,

I'm stuck....
I have a report, which consists of two subreports.
I have total sums on each report.
I’m trying to get a Grand total from those two totals at the end of the main report.
Whatever I try, I get an error.....
The last thing I tried was :
Code=[mySubReportName].[Report]![myTextControlName]+[mySubReportName1].[Report]![myTextControlName1]

>but not you bob fitz, problem with that
 

bob fitz

AWF VIP
Local time
Today, 05:21
Joined
May 23, 2011
Messages
4,721
>but not you bob fitz, problem with that
I don't understand what you are saying.

Are you saying that you don't want me to contribute my thoughts on this matter?
 

vhung

Member
Local time
Yesterday, 21:21
Joined
Jul 8, 2020
Messages
235
I don't understand what you are saying.

Are you saying that you don't want me to contribute my thoughts on this matter?
AWF
is open for everyone as i know
>i specifically addressed my little knowledge to "Koloss"
>we all need best contribution, as i need it much
>i learn here on AWF to anyone, soon from you "bob"
>maybe i'm only too serious to get to the solution of the problem cause it also helps me too
 
Last edited:

bob fitz

AWF VIP
Local time
Today, 05:21
Joined
May 23, 2011
Messages
4,721
>maybe im only too serious to get to the solution of the problem cause it also helps me too
I'm sure that anybody who posts a reply here, does so with the desire and the intent of helping. Including myself.
You said in post #6
>i tried it, works well, either onLoad/click event procedure...
You said, "works well".

So, I was confused. In my mind, if someone says that something works, then they have a solution.
This is the reason that I said in post #7:
If it works, what s the problem?
As you are still not saying what the problem is, I can only assume that you need no further help on this matter from anybody here.

Good luck with your project.
 

vhung

Member
Local time
Yesterday, 21:21
Joined
Jul 8, 2020
Messages
235
I'm sure that anybody who posts a reply here, does so with the desire and the intent of helping. Including myself.
You said in post #6
You said, "works well".

So, I was confused. In my mind, if someone says that something works, then they have a solution.
This is the reason that I said in post #7:
As you are still not saying what the problem is, I can only assume that you need no further help on this matter from anybody here.

Good luck with your project.
Thanks;
>now i got your point, and so you got my point too
>i always well for better and ....
 

bob fitz

AWF VIP
Local time
Today, 05:21
Joined
May 23, 2011
Messages
4,721
>now i got your point, and so you got my point too
Well actually no. I STILL don't understand what help, if any, you need.
You're NOT posting any error numbers.
You're NOT posting any error messages.
You're NOT telling us WHAT doesn't work.o_O
 

vhung

Member
Local time
Yesterday, 21:21
Joined
Jul 8, 2020
Messages
235
Well actually no. I STILL don't understand what help, if any, you need.
You're NOT posting any error numbers.
You're NOT posting any error messages.
You're NOT telling us WHAT doesn't work.o_O
good day sir
"[Report 1& 2 Total:] = [Report1].[Report]![AccessTotalscost] + [Report2].[Report]![AccessTotalscost]"
this is ok sir, no more error, i said before it works well...
>anyway this is just a minor report problem that can be solved first at the "Expression Builder"
 

Users who are viewing this thread

Top Bottom