Solved

While exporting a report particular column misbehaves

Posted on 2014-01-20
9
241 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 
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
 
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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

626 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