Run time result
Hi all,
I have designed a report with several tables one of them is
data band datasource, So because I could not calculate summation correctly for other
table which is not certained as data band I did these steps
- for data band tabls I used summations formulas correctly
- for other table I used just sql command
When I test them individually it works successfully but when i want to pick my
final result of two items above at run time for example at Text_afterdata event
It raises exception "input string was not in correct format"
So if I want to display result of other results already exists in text item as final result how to do that
Thanks
I have designed a report with several tables one of them is
data band datasource, So because I could not calculate summation correctly for other
table which is not certained as data band I did these steps
- for data band tabls I used summations formulas correctly
- for other table I used just sql command
When I test them individually it works successfully but when i want to pick my
final result of two items above at run time for example at Text_afterdata event
It raises exception "input string was not in correct format"
So if I want to display result of other results already exists in text item as final result how to do that
Thanks
Comments
private decimal runtotal;
private void Data1_BeforePrint(object sender, EventArgs e)
{
runtotal+= (Decimal)Report.GetColumnValue("DataSource.YourField");
}
and do runtotal for another field...
you may use [runtotal] to display in report
thanks for response , here i have attached two pictures ,a circled text control should display result of above items value ,when i run report it raise exception
<!--fonto:Impact--><span style="font-family:Impact"><!--/fonto-->"Input string was not in correct format"<!--fontc--></span><!--/fontc--> ,the other image as U see by using message box i tested all text controls before executing formula to see each one them and it is values and as U see that some of them not binded to it is values which make exception raise
whats is correct scenario to execute formal correctly...
hope that my problem is explained clearfully
Thanks
Hi ipong
Thank for your responses ,really i could not upload pictures ,the attachment button does not allow me to browse ,but i can ask my previous question in other words that if you have for example 3 TextBoxs
display some data and you have to get fainal results of them in TextBox4 what you have to do?
This is my attempt:
I add this expression in TextBox4
ToDouble([TextBox1.text])+ToDouble([TextBox2.text])+ToDouble([TextBox3.text]) and when i run report it display this formula just as a long string text not else ,formerly i was using fastreport with delphi when i do same it was printing formula result not display it just like long string text..
Thanks
Datasource.Field1] + [Datasource.Field2] + [Datasource.Field3
note: always enclose with brackets