Solved

While exporting a report particular column misbehaves

Posted on 2014-01-20
9
231 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

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.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

920 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

14 Experts available now in Live!

Get 1:1 Help Now