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!

Format of parameter used in formula

Status
Not open for further replies.

KimMc

IS-IT--Management
Apr 26, 2000
15
CA
I am having a problem with a parameter field. I need the parameter ?Period to allow both range of values. The parameter is defined as a string. However when I try to use it in a formula, I get errors both using it as a string or a number. Converting it to the other as below doesn't work, if I convert to a number it asks for a string and vice versa.

{Bal_Data.Period}= ToNumber({?Period})

Any help?

 
What do you mean by "both range of values"? Is this a range parameter or not?

You should not have to convert either field. Make your parameter a number and your formula should work fine. Have you tried making your parameter a number? Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Also, what version of CR are you using? Is this a straight up Crystal Report or an integrated application? Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
I am using Crystal Reports v8, and it's a straight report. I have tried formating the parameter as a number, but the error just switches to asking me for a string. This is really odd. Sorry, 'both' should read 'a'.

 
Period should be a date, if you're trying to limit rows by their age, so try that.

The important thing is to KNOW your datatypes.

The icon on the far right of the field explorer will show data types, this should help in this effort.

-k kai@informeddatadecisions.com
 
I am unsure what you mean by "formatting" your parameter as a number. Two questions:

1) When you edit the parameter field, what is the data type?

2) When you look at {Bal_data.Period} in the field explorer, what is the data type?

Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top