Search This Blog

Showing posts with label Object reference not set to an instance of an object. Show all posts
Showing posts with label Object reference not set to an instance of an object. Show all posts

Tuesday, 13 November 2012

How to remove all numeric/non-numeric characters from the string in SSRS

Let’s say we have a string like 1;B4Y;dce5;6fgh;This
And we are expecting an output like this BY;dce;fgh;This
To remove all the numeric characters from a string, we need to use regular expression like following:
=System.Text.RegularExpressions.Regex.Replace("1;B4Y;dce5;6fgh;This", "[0-9]", "").Trim(";")
This expression will give the output as BY;dce;fgh;This

And vise versa, if we want only numbers then we need to use regular expression like following:
=System.Text.RegularExpressions.Regex.Replace("1;B4Y;dce5;6fgh;This", "[^0-9]", "").Trim(";")
This expression will give the output as 1456

Thursday, 4 October 2012

Error,Object reference not set to an instance of an object

A message that indicates that the object reference is not set to an instance of the object is typically caused by one or more of the following reasons:
•         There are soft page breaks within empty lists in the report.
•         There are hidden groups within the report and you tried to export it to PDF.
·         The report has a link to a subreport that is not published on the report server and you tried to export it to CSV.
·         There are text boxes with a width and/or height of zero in the report.
·         A text box is either hidden or the NoRows property is set to true.
·         A text box spans table cells where some cells have a collection of null values.
·         The report has static columns and/or rows and, in the Visibility properties, Hidden is set to true.
·         The report has static columns and/or rows and there are grand totals in the report.
·         The report has static column headings and, in the Visibility properties, Hidden is set to true.
·         The matrix report has multiple columns and rows and, in the Visibility properties, Hidden is set to true and you tried to export to PDF or TIFF.
For More detil Visit this  rrRenderingError