Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 error when no data present

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2010-02-16 : 12:41:15
The report runs fine if there is data for the selected criteria but it gives the following message if there is no data for the selected criteria in the database.
Do you see why I get this error please? Is it to do with formatting the fields i.e. if no value then null, etc?...
Thanks

Error:

An unexpected error occurred in Report Processing.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-16 : 12:51:57
it may be due to expression evaluation error caused by lack of data. It can be in cell expressions or in filters

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2010-02-17 : 02:06:21
could it be because I am using the following in each textbox and this error occurs where there is no figure returned?
=Sum(Fields!FieldName.Value, "dsDataset")
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-17 : 02:12:55
quote:
Originally posted by arkiboys

could it be because I am using the following in each textbox and this error occurs where there is no figure returned?
=Sum(Fields!FieldName.Value, "dsDataset")


Not necessarily. More chances are cases are this happening in filters or in checks like that inside IIF
b/w are you getting this error in preview mode? Sometimes there you'll get more detailed info and may be able to spot place that caused this better

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2010-02-17 : 02:21:15
In the preview tab it shows:
An error occured during local report processing.
An unexpected error occured in Report Processing.
Object reference not set to an instance of an object.

Note that this error occurs when no row is returned.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-17 : 03:51:58
can you try this:-

http://support.microsoft.com/kb/942530/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2010-02-17 : 07:55:03
Thanks for the link. It mentions about null references but I do not see where it says how to solve this issue.
Go to Top of Page
   

- Advertisement -