Solved

How do I convert an alphanumeric field in SSRS and export to excel to avoid the number stored as text error?

Posted on 2011-02-22
19
1,121 Views
Last Modified: 2012-05-11
I have a report with 12 columns. 11 columns export fine to excel.  However,  I have one of the SSRS columns that is an numeric & alphanumeric, aaa1111....etc..  When I export to excel and I open the file to view I have the green error mark in the cells of that column that are just numbers.

If I change to  the expression =CDbl(Fields!your_numerical_column.Value) on the field all of my numbers only are corrected but the alphanumeric have errors.   Please assist.

0
Comment
Question by:rhservan
  • 10
  • 9
19 Comments
 
LVL 52

Expert Comment

by:Huseyin KAHRAMAN
ID: 34954191
try wrapping it into " for that column

expression = '"' + ... + '"'
0
 

Author Comment

by:rhservan
ID: 34954397
Here is the expression that I placed on that field:

=""+Fields!TrailerNumber.Value+""

This worked only on the alphanumeric but not the numeric only.
0
 
LVL 52

Expert Comment

by:Huseyin KAHRAMAN
ID: 34954441
try

=""""+Fields!TrailerNumber.Value+""""
or
="'"+Fields!TrailerNumber.Value+"'"

0
Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

 

Author Comment

by:rhservan
ID: 34954560

This worked to remove the errors in excel:
=""""+Fields!TrailerNumber.Value+""""
However, in both the report and excell it shows the double quote around the values.  Is there a way to hide them?
E.g. - "41244" or "JBHY3277"
Or perhaps another method.  I am testing the other expression now.
0
 

Author Comment

by:rhservan
ID: 34954590
Second expression results:
This worked to remove the errors in excel:
="'"+Fields!TrailerNumber.Value+"'"
However, in both the report and excell it shows the double quote around the values.  Is there a way to hide them?
E.g. - '41244' or 'JBHY3277'

This seems to be pretty much the same issue with the single quotes.   Waiting for further advisement.
0
 
LVL 52

Expert Comment

by:Huseyin KAHRAMAN
ID: 34954624
what is your query?
0
 

Author Comment

by:rhservan
ID: 34954711
Is there a particular part of the query you need to view?
0
 
LVL 52

Expert Comment

by:Huseyin KAHRAMAN
ID: 34955093
the part for "aaa1111"
0
 

Author Comment

by:rhservan
ID: 34955270
Here is the query.
EESample.txt
0
 
LVL 52

Expert Comment

by:Huseyin KAHRAMAN
ID: 34955404
which column is creating issue?
0
 

Author Comment

by:rhservan
ID: 34955481
Trailernumber
0
 
LVL 52

Expert Comment

by:Huseyin KAHRAMAN
ID: 34955596
also can you please post a sample excel file that shows the issue...
0
 

Author Comment

by:rhservan
ID: 34955830
Excel in .png format png file from snagit
0
 
LVL 52

Expert Comment

by:Huseyin KAHRAMAN
ID: 34956025
can you please post a small sample of that excel file
0
 
LVL 52

Expert Comment

by:Huseyin KAHRAMAN
ID: 34956026
as an excel file, attachement I mean
0
 

Author Comment

by:rhservan
ID: 34956126
Here you go.
EESamplexls.xls
0
 
LVL 52

Accepted Solution

by:
Huseyin KAHRAMAN earned 500 total points
ID: 34956227
when you select  A2:A15 and click the icon -> Ignore error it goes away
or go to error checking options and uncheck "enable background error checking"

what happens is you enter the heading and excel thinks that column is text
and when you enter a numeric value under that, excel warns you...

it is not a big deal... when a numeric data is entered "12345" excel puts it as text and adds that warning...
0
 
LVL 52

Expert Comment

by:Huseyin KAHRAMAN
ID: 34956231
when you select a range make sure first cell has that green option... so you can ignore all warnings for that selection...
0
 

Author Comment

by:rhservan
ID: 34961077
Just to confirm, the solution is only in Excel and not in SSRS?
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

726 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