Variables calculated before datasources?

Stimulsoft Reports.NET discussion
Post Reply
RickshawDriver
Posts: 5
Joined: Fri Aug 28, 2009 2:34 pm

Variables calculated before datasources?

Post 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?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Variables calculated before datasources?

Post by Edward »

Hi,

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

Image

Thank you.
Post Reply