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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB and Crystal 8.5 Dev edtion

Status
Not open for further replies.

Tailgun

Technical User
Mar 30, 2002
417
US
I have 2 columns in a database both are set as currency. I am trying to add them together in the report using a formula so they are added in another part of the report. However it keeps telling me one is NUMBER and the other is a string. Any ideas?

This is driving me nuts
 
Right click the fields and select browse data to see what Crystal thinks that they are.

It may be connectivity related, it may be that you need to apply the service pack, could be lots of things, and you may just use a SQL Expression against the database and have the values returned as a single field already summed (database dependent).

-k
 
Thanks synapsevampire it thinks one is a string and the other a number even though both are the same in the database. Both are numbers in the db.

As far as service packs are you meaning the VB one I am using 5 the latest. I am not aware of one for 8.5 Crystal Reports.
 
tailgun;

I just recently found a service pack for CR 8.5. Look for: cr85win_en_sp3 in Crystal's downloads area.

Hope it helps.

-Mike [bigears]
 
Tailgun,

I don't know why CR is interpreting one of the values as a string. But, given that that's what it is doing, why don't you just use the ToNumber() function to convert it back again within your formula?

I know that doesn't really solve the problem, but at least it will get you round it. If, at some time in the future (perhaps after you apply a service pack or upgrade to a new version), the number starts showing up as a number, you shouldn't have to alter your formula, as ToNumber() can also take a numeric argument.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Thanks Mike that works just fine. However mpdinosaur I can't find cr85win_en_sp3 in Crystal's downloads area.
 
I recently downloaded an update. It was called cr85mainwin_en.zip (monthly hotfix for December)

 
Thanks alot JEfromCanada I just downloaded it.

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top