Page 1 of 1

Variables calculated before datasources?

Posted: Wed Sep 02, 2009 11:13 am
by RickshawDriver
I am having a problem setting a variable by totaling two datasource columns together.

DataSource1
Column1 = 10
Column2 = 12
Total = 22

DataSource2
Column 1 = 5
Column 2 = 7
Total = 12

I want to be able to set the variable AllTotal = int and expression = DataSource1.Total + DataSource2.Total. When I have the DataSource1.Total to a text box it displays the total and the same for DataSource2.Total, but the variable AllTotal shows 0. Can anyone tell me why? Are the variables being calculated before the call to the database?

Variables calculated before datasources?

Posted: Wed Sep 02, 2009 8:41 pm
by Edward
Hi,

Please declare a variable as a ReadOnly Function. Please see the screenshot of such a declaration

Image

Thank you.