Dundas Charting Tips and Tricks > Errors and resolutions to chart issues > Why am I getting an "Object reference is not set to an instance of an object" error?
Occassionally you will receive the following error when trying to run a report with a Dundas chart.
Click for larger imageThis can be caused by a number of reasons but one reason could be due to the fact that your code parameter is assuming that the parameter coming from the Reporting Services report parameter is a multi-value parameter. When passing a multi-value parameter to a Dundas Chart that is going to use this parameter in a SQL string inside a code event, you want to ensure that you create the string before it goes into the Code event in Dundas. This is seen below:

The join operator is used to create the multi-value parameter. In this case, using the join parameter is incorrect because the Reporting Services report parameter is a single-value parameter. So you want to simply change the parameter to single-value as seen below:

Once you make this change and re-run your report the error will be resolved.
