This is a migrated thread and some comments may be shown as answers.

object reference not set

1 Answer 24 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 19 Jun 2013, 02:30 PM

the following code gives a null reference exception object reference not set to the instance of an object.
I have also tried:
TelRpt.ReportParamenters["txtContract"].value = cheader.ContractNum;
gives the same error.
cheader.ContractNum has a value.
If I take out this line the report converst to docx with no problem excet the contract number does not appear.

((TelRptContract)TelRpt).ReportParameters["txtContract"].Value = cheader.ContractNum;

1 Answer, 1 is accepted

Sort by
0
Ivan Hristov
Telerik team
answered on 21 Jun 2013, 02:05 PM
Hello William,

This exception is thrown probably because the ReportParameter is not defined in your report or you have misspelled its name. Please make sure you address the name of the parameter correctly.

Regards,
Ivan Hristov
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
William
Top achievements
Rank 1
Answers by
Ivan Hristov
Telerik team
Share this question
or