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

Comments

  • edited 11:18AM
    try with script

    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
  • edited 11:18AM
    Hi All,
    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
  • edited 11:18AM
    no pics attached???
  • edited 11:18AM
    ipong wrote: »
    no pics attached???


    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
  • edited 11:18AM
    if your TextBox1..TextBox3 contain integer/double/decimal datatype, no need to convert, use this expression

    Datasource.Field1] + [Datasource.Field2] + [Datasource.Field3

    note: always enclose with brackets


Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.