Hi everybody.
I am trying to solve a problem that involves the reading of a parameter field {?CaseNumber} typed in by a user and coverting it to the proper format before querying the database for that record. I am using CR 9.0 and have acess to a Oracle Database.
The datafield is a 9 Numberic (string)that tracks a report number. The first two numbers represent the year and the last seven are the report number (example: 040053297 means the year 04 and report number 53297).
Hand written reports look as such: 04-53297.
I wrote three formulas so a user at a prompt could type: 04-53297 or 53297 or even 040053297. Each formula works fine by itself.
The problem I'm having is trying to nest all three formulas together into a larger one using If's Else statements to call each formula.
Here's what it looks like:
{@Find Hyphen};
If {@Find Hyphen} then
{@Convert Full Case Number}
ELSE
If length({?CaseNumber}) <= 7 then
{@Convert Short Case Number}
ELSE
{?CaseNumber}
When I run this formula, the {@Convert Full Case Number} still tries to execute even though {@Find Hyphen} is FALSE.
Is this the wrong way to nest formulas to control which one executes?
Thank you for your time.
Joe
I am trying to solve a problem that involves the reading of a parameter field {?CaseNumber} typed in by a user and coverting it to the proper format before querying the database for that record. I am using CR 9.0 and have acess to a Oracle Database.
The datafield is a 9 Numberic (string)that tracks a report number. The first two numbers represent the year and the last seven are the report number (example: 040053297 means the year 04 and report number 53297).
Hand written reports look as such: 04-53297.
I wrote three formulas so a user at a prompt could type: 04-53297 or 53297 or even 040053297. Each formula works fine by itself.
The problem I'm having is trying to nest all three formulas together into a larger one using If's Else statements to call each formula.
Here's what it looks like:
{@Find Hyphen};
If {@Find Hyphen} then
{@Convert Full Case Number}
ELSE
If length({?CaseNumber}) <= 7 then
{@Convert Short Case Number}
ELSE
{?CaseNumber}
When I run this formula, the {@Convert Full Case Number} still tries to execute even though {@Find Hyphen} is FALSE.
Is this the wrong way to nest formulas to control which one executes?
Thank you for your time.
Joe