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,098 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 51

Expert Comment

by:HainKurt
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 51

Expert Comment

by:HainKurt
ID: 34954441
try

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

0
 

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 51

Expert Comment

by:HainKurt
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 51

Expert Comment

by:HainKurt
ID: 34955093
the part for "aaa1111"
0
 

Author Comment

by:rhservan
ID: 34955270
Here is the query.
EESample.txt
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 51

Expert Comment

by:HainKurt
ID: 34955404
which column is creating issue?
0
 

Author Comment

by:rhservan
ID: 34955481
Trailernumber
0
 
LVL 51

Expert Comment

by:HainKurt
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 51

Expert Comment

by:HainKurt
ID: 34956025
can you please post a small sample of that excel file
0
 
LVL 51

Expert Comment

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

Author Comment

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

Accepted Solution

by:
HainKurt 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 51

Expert Comment

by:HainKurt
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

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

11 Experts available now in Live!

Get 1:1 Help Now