Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 How to sum two textboxes in different tables

Author  Topic 

walidwalid
Starting Member

12 Posts

Posted - 2008-10-08 : 05:32:46
Hi all,

how to sum the values of two textboxes in two different tables in the same report.




Thanks for all.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-08 : 06:23:39
Try
=Reportitems!textbox1.value + Reportitems!textbox2.value
Go to Top of Page

walidwalid
Starting Member

12 Posts

Posted - 2008-10-08 : 06:30:10
Thanks for your replay.
but those two textboxes did not see each other cause they are in different tables the first textbox in the first table and the second textbox in the second table the scope of the two textboxes is different so the did not see each other.
So what can I doooooo ???

Thanks again for your reply.


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-08 : 06:40:27
quote:
Originally posted by walidwalid

Thanks for your replay.
but those two textboxes did not see each other cause they are in different tables the first textbox in the first table and the second textbox in the second table the scope of the two textboxes is different so the did not see each other.
So what can I doooooo ???

Thanks again for your reply.





why do you want to add the values? how do they relate to each other?
Go to Top of Page

walidwalid
Starting Member

12 Posts

Posted - 2008-10-08 : 06:58:36
The first value is the grand total of 10 members in dimension called cc_2006 and the second value is the grand total of 2 members in dimension called Exp_2006 and the first grand total is in table and the second grand total is in another table in the same report and I want to sum those grand totals and the value will appear in the second table.That is all.....


Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-08 : 07:45:32
quote:
Originally posted by walidwalid

The first value is the grand total of 10 members in dimension called cc_2006 and the second value is the grand total of 2 members in dimension called Exp_2006 and the first grand total is in table and the second grand total is in another table in the same report and I want to sum those grand totals and the value will appear in the second table.That is all.....





try using the scope parameter

something like

=sum(field!yourdimensionfeild.value,"Table1")+sum(field!yourdimensionfeild.value,"Table2")
Go to Top of Page

walidwalid
Starting Member

12 Posts

Posted - 2008-10-08 : 07:48:59
quote:
Originally posted by visakh16

quote:
Originally posted by walidwalid

The first value is the grand total of 10 members in dimension called cc_2006 and the second value is the grand total of 2 members in dimension called Exp_2006 and the first grand total is in table and the second grand total is in another table in the same report and I want to sum those grand totals and the value will appear in the second table.That is all.....





try using the scope parameter

something like

=sum(field!yourdimensionfeild.value,"Table1")+sum(field!yourdimensionfeild.value,"Table2")





did not work....
Thank you for your reply
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-08 : 09:57:27
quote:
Originally posted by walidwalid

quote:
Originally posted by visakh16

quote:
Originally posted by walidwalid

The first value is the grand total of 10 members in dimension called cc_2006 and the second value is the grand total of 2 members in dimension called Exp_2006 and the first grand total is in table and the second grand total is in another table in the same report and I want to sum those grand totals and the value will appear in the second table.That is all.....





try using the scope parameter

something like

=sum(field!yourdimensionfeild.value,"Table1")+sum(field!yourdimensionfeild.value,"Table2")





did not work....
Thank you for your reply


where are you trying to use this query?
Go to Top of Page

walidwalid
Starting Member

12 Posts

Posted - 2008-10-08 : 10:00:52
quote:
Originally posted by visakh16

quote:
Originally posted by walidwalid

quote:
Originally posted by visakh16

quote:
Originally posted by walidwalid

The first value is the grand total of 10 members in dimension called cc_2006 and the second value is the grand total of 2 members in dimension called Exp_2006 and the first grand total is in table and the second grand total is in another table in the same report and I want to sum those grand totals and the value will appear in the second table.That is all.....





try using the scope parameter

something like

=sum(field!yourdimensionfeild.value,"Table1")+sum(field!yourdimensionfeild.value,"Table2")





did not work....
Thank you for your reply


where are you trying to use this query?



In expression editor for a textbox

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-08 : 12:10:31
is textbox inside anyone of table? or is it in report body or header?
Go to Top of Page

walidwalid
Starting Member

12 Posts

Posted - 2008-10-08 : 12:16:37
quote:
Originally posted by visakh16

is textbox inside anyone of table? or is it in report body or header?



inside the tables because of that they did not see each other
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-09 : 01:19:15
quote:
Originally posted by walidwalid

quote:
Originally posted by visakh16

is textbox inside anyone of table? or is it in report body or header?



inside the tables because of that they did not see each other


i know that. what i'm asking is about textbox inside which you want to caclculate the sum. is it inside report body or header?
Go to Top of Page

walidwalid
Starting Member

12 Posts

Posted - 2008-10-09 : 03:34:47
Sorry for late I was out of office
inside the report body
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-09 : 03:46:58
quote:
Originally posted by walidwalid

Sorry for late I was out of office
inside the report body


did you try using dataset as scope?

=sum(field!yourdimensionfeild.value,"datasetforTable1")+sum(field!yourdimensionfeild.value,"datasetforTable2")
Go to Top of Page

walidwalid
Starting Member

12 Posts

Posted - 2008-10-09 : 05:59:08
quote:
Originally posted by visakh16

quote:
Originally posted by walidwalid

Sorry for late I was out of office
inside the report body


did you try using dataset as scope?

=sum(field!yourdimensionfeild.value,"datasetforTable1")+sum(field!yourdimensionfeild.value,"datasetforTable2")




Thank you very very very much visakh16
It worked successfully.

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-09 : 06:02:05
quote:
Originally posted by walidwalid

quote:
Originally posted by visakh16

quote:
Originally posted by walidwalid

Sorry for late I was out of office
inside the report body


did you try using dataset as scope?

=sum(field!yourdimensionfeild.value,"datasetforTable1")+sum(field!yourdimensionfeild.value,"datasetforTable2")




Thank you very very very much visakh16
It worked successfully.




welcome
Go to Top of Page
   

- Advertisement -