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,108 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL query with cast 38 42
SQL Server 2012 r2 - Calulations within stored procedure involving temp tables 6 26
Query Syntax 17 32
Find results from sql within a time span 11 29
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 Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

813 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

13 Experts available now in Live!

Get 1:1 Help Now