Solved

Excel Crystal Report Numeric Column Conversion

Posted on 2014-03-24
3
1,007 Views
Last Modified: 2014-03-25
I am using an Excel fie as datasource for Crystal Reports. In the Excel file is a column that contains Account Numbers that is mainly numbers but also have some cells with alpha values.  I formatted the cells / column as text value.  In Crystal Reports, I would use the Excel file ( DAO )  as datasource.  The Account Number column is somehow defined as Numbers
( when I add the field and browse data, the field is type : Number  and I only see numeric values ).  How do I get Crystal Reports to see this column as text and not number  ?
Only numbers are appearing on the report and the text values are being bypassed.
0
Comment
Question by:phiadmin
3 Comments
 
LVL 9

Accepted Solution

by:
BlueYonder earned 200 total points
ID: 39951531
Add an apostrophe before all of the account numbers.  This will change the format to text and will import correctly.
0
 
LVL 18

Assisted Solution

by:vasto
vasto earned 200 total points
ID: 39951569
The ODBC driver will check the first 7 lines and try to detect the type of the values. Add a non-numeric character ( for example a letter)  to the cells in the first row, which you want to be text and verify database in crystal reports. Once the database is verified you can remove the added letter and to restore the original value of the cell.
0
 

Author Closing Comment

by:phiadmin
ID: 39953928
I already knew about the apostrophe to convert numbers to text but was trying to around it since the already exist and did not want to manually convert each row.  Answer 2 regarding the ODBC driver provided an inside that I did not know.  I did convert the first few row by adding an alpha character but the then the crystal report ignore all the numeric rows.  I change the file values several times to try different options but ended up using a combination of both answers.
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

This very simple solution applies to a narrow cross-section of the "needs to close" variety. In this case, the full message in Event Viewer was in applog, Event ID 1000: Faulting application iexplore.exe, version 8.0.6001.18702, faulting module …
We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

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

16 Experts available now in Live!

Get 1:1 Help Now