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

truncate left 33 characters of field and use as parameter

Status
Not open for further replies.

tcbc

Technical User
Feb 7, 2009
33
US
How can I truncate a free text field and then use that truncated string as paremeter.

Example
Free text field says

Monthly Objective - water garden.

I want to use as parameter
{?Monthly Objective}
 
I meant not first 33 characters but rather 17 characters
 
Hi,
The LEFT() or SUBSTR() functions can handle the truncation, but I know of no way to make that a parameter - a value to search for, yes, but what would a parameter made of it be compared to?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
left({objecivefield.month},17)={?Monthly Objective}
 
Hi,
What value is in {?Monthly Objective} - the formula you posted is not a way to create a parameter, as far as I know.

Parameters are used to control some aspect of the report ( usually some record selection criteria) , so what database field are you planning to use the {?Monthly Objective} parameter against as a selection?
(assuming its you can get its value to be the text 'Monthly Objective')

Maybe you can explain what you want to accomplish.





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I'd look at basing the report on a SQL command and then perfoming then creating a field in the SQL showing the 17 characters of the desired field and base the paramter on this.

Cheers

Marc
 
Just create a formula that includes:

left({objecivefield.month},17)

If the formula is called Test, place the following statement in your Record Selection Formula

{@Test} in {?Monthly Objective}

If your "Monthly Obective" parameter is a range,the "in" operator will cause formula results in the range to be selected
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top