Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
Medium Priority
?
1,212 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
[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
  • 10
  • 9
19 Comments
 
LVL 60

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 60

Expert Comment

by:HainKurt
ID: 34954441
try

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

0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

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 60

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 60

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 60

Expert Comment

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

Author Comment

by:rhservan
ID: 34955481
Trailernumber
0
 
LVL 60

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 60

Expert Comment

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

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 60

Accepted Solution

by:
HainKurt earned 2000 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 60

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

636 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