Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports - Field Type - Excel

Status
Not open for further replies.

cvgalloway

Technical User
Jul 8, 2008
14
0
0
US
I have a Crystal report that has a field type of STRING - it is linked and pulling data from an excel spreadsheet

The data in this field varies, some of the results have numbers & letters (12M, 2T), some are just numbers (4, 5)

This field is not displaying results that are just numbers (it is blank)

Why? Or better yet - how do I get this to display correctly?

Thanks for your help
Catherine

 
Hi,
try creating a formula like:
@showField
Code:
If IsNumeric({Excelfield})
then
ToText([Excelfield])
else
{Excelfield}


[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Still nothing

When I originally set-up this report, this field was set-up as a Number -
Now, I have an excel report that has both, numbers & numbers & letters - so when I set the database - it is asking me to map this field - I can uncheck the "match type" and then map it, so it then changes this field type to a string.

I then created your formula based on this and I still get nothing for the numbers
Here is my formula:

If IsNumeric({'290_'.Size})
then ToText({'290_'.Size})else {'290_'.Size}

Thanks for your help
 
Try just ToText({'290_'.Size}).

Maybe also test for nulls, and report if a null is found. Perhaps the data is not what you think it is.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
I should add a disclaimer that I am not an Tech person (so layman's terms will be used)

Yet, I actually tried the totext before submitting this post.
There are no nulls

I ran NumericText on this field and for the data that has numbers & text (12-18m) I get FALSE
for the data that has just numbers (2,4,6) I get blanks

I have no clue?????
 
Hi,
How is that column in Excel defined?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Defined?
Not sure what you are asking - it's formatted as General
 
Hi,
Hightlight the cells containing the data and use the Format..Cells..Text option.




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Yep - did that - no good.

My workaround (because nothing else seemed to work) - was I added another column (hidden) in excel and put in a formula to add a period (.) to the original column - I redirected my crystal to read that column less the last character -
that worked.

Thanks for all the help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top