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

Formula Field and Dates

Status
Not open for further replies.

staleb

Programmer
Feb 7, 2005
45
NO
In my application I pass my values into Formula fields dirctly:
reportObject.DataDefinition.FormulaFields("Formula Filed").Text = "input box".text

And my formula:
formula = table.field

When I does this with dates I get this error mesage:

Error in formula <Dato>.
'01.02.1999'
The remaining text does not appear to be part of the formula."

Does anyone have a clue whats wrong?
 
This is how I send my data.

reportObject.DataDefinition.FormulaFields("Formula Filed").Text = "input box".text

Where "input box".text is the data entered by the user
 
I found a soulution:

Crystal wouldn't let me convert the srting I sent in, becaus it didnt reqonize it as an string.

The value that I sent in was: 02.02.2005 'dd.mm.yyyy

What I needed to do to get CR to understand that this is a text was: chrW(34) + inputbox.text + chrw(34)
Which made my text appear like this "02.02.2005" and then CR could turn it into a date
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top