Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1120
Null Reference Exception
posted

Hi

My form is an calculator, i mean we have lot of textboxes by which we give inputs so the calculated values are shown in the grid.

I create summaries programmatically and set the formulas for those.

If the formula is just the sum of the column its showing the correctly, but if its has formula like  sum [column1]/ [sum column2 ] its works for the first time the form loads i.e if the sum column2 is 0 the I am setting the summary value as 0. So when the form loads the value it showing is 0.

But if we try to change or type anything in the textboxes, its crashing or showing the exception as Null reference exception. In debugger mode, the exception is occurring  where the form is being instantiated to display the form (Null reference exception).

I am using the UltraCalcManager in the form. I am getting the exception when we have UltraCalcManager in the form. 

If I remove the UltraCalcManager from the form then except for the summary value every thing is working fine.

Someone please help me to solve this above mentioned problem

Thanks in advance

Navi 

 

 

 


Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

     Hi Navi,

    I'm afraid I don't understand what you are describing. You seem to be contradicting yourself. 

    If you are using a formula that sums a column in the grid, then what do the TextBoxes have to do with it? 

    The formul you have listed here is not a valid formula - the syntax is bad. But even if it did work, when the sum of column 2 was 0, you would end up dividing by 0 and get an error. 

    navi519 said:
    But if we try to change or type anything in the textboxes, its crashing or showing the exception as Null reference exception. In debugger mode, the exception is occurring  where the form is being instantiated to display the form (Null reference exception).

    If the error doesn't occur until you change the text boxes, then how can it occur when the form is instantiated? 

Children