Solved

While exporting a report particular column misbehaves

Posted on 2014-01-20
9
229 Views
Last Modified: 2014-01-25
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.
0
Comment
Question by:Easwaran Paramasivam
  • 4
  • 4
9 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 39794541
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
 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 39794700
It works fine with other datetime columns. Moreover the column which shows wrong value do not contain NULL value. Please do suggest.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 39794815
Do the column names in the reports match exactly the column name in the source ?
0
 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 39798020
=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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 39799157
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
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 39799158
>>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
 
LVL 16

Author Comment

by:Easwaran Paramasivam
ID: 39809113
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
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 39809114
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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now