While exporting a report particular column misbehaves

I've a report in my windows application. The report works fine with in  my application. But when I export to PDF file the particular column (datetime column) is shown as #Error. When I export same report as Excel, the column shows value as #VALUE!

Have you come across this kind of issue earlier? If so, please do help me how to solve the issue. Please do assist!

Please note that two different RDLs are used for application and export option.

Thanks in advance.
LVL 16
Easwaran ParamasivamAsked:
Who is Participating?
 
AndyAinscowConnect With a Mentor Freelance programmer / ConsultantCommented:
Do other datetime columns work?
If the problem is with the datetime a workround would be to have it as a formatted string instead of the native type.
0
 
Easwaran ParamasivamAuthor Commented:
It works fine with other datetime columns. Moreover the column which shows wrong value do not contain NULL value. Please do suggest.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Do the column names in the reports match exactly the column name in the source ?
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
Easwaran ParamasivamAuthor Commented:
=Convert.ToDateTime(IIF(IsNothing(Fields!LastPasswordDtm.Value),DateTime.MinValue,Fields!LastPasswordDtm.Value).ToString()).ToString().Replace(DateTime.MinValue.ToString(),string.Empty)

Open in new window

Above code helps me.
0
 
Easwaran ParamasivamAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for EaswaranP's comment #a39798020

for the following reason:

While exporting the data the NULL validation should be handled correctly. Accepting as solution for tracing purpose and would be useful for others.
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
>>Moreover the column which shows wrong value do not contain NULL value.

The above was from an earlier comment.
From the proposed solution
While exporting the data the NULL validation should be handled correctly

Something isn't correct.
0
 
Easwaran ParamasivamAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for EaswaranP's comment #a39798020

for the following reason:

Accepting as solution for tracking
0
 
AndyAinscowFreelance programmer / ConsultantCommented:
Proposed solution is:
=Convert.ToDateTime(IIF(IsNothing(Fields!LastPasswordDtm.Value),DateTime.MinValue,Fields!LastPasswordDtm.Value).ToString()).ToString().Replace(DateTime.MinValue.ToString(),string.Empty)

which on contraction is:
=Convert.ToDateTime(...).ToString().Replace(DateTime.MinValue.ToString(),string.Empty)

which is resulting in a string.

See my first comment - you could convert to a string.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.