AndersonCJA
Programmer
WHILEPRINTINGRECORDS;
//
// I am roughly following the example from
// // and using multiple variable assignments in one formula.
//
// I believe the problem is in the the way
// I have coded the very last line in the example
//
//
// I recieve the message "a string is required here"
// or it works and I get a zero result.
//
//
// I have included only a portion of my formula
// so that it will be easier to read.
//
// If I test the code in an "if then else print" formula
// I can see the result is true and being met.
//
// The problem is that when fields that
// fill the variable, "role" and the
// variable, "over18" are sometimes blank.
// When they (just the two fields out of four)
// are blank I get a blank result.
//
// perhaps I am not allowed to use multiple variable
// types in one formula.
//
// If I modify the last line, I can get it to run, but I get
// a zero result.
// Here is an Exmple of the formula
Numbervar Person;
Datevar Bday;
Stringvar Role;
Stringvar over18;
if
Stringvar Role <> "role1" AND
isnull({TABLE1.DATEBIRTH}) and
{TABLE2.DATEBIRTH} > datevar bday and
{TABLE2.DATEBIRTH} < {@EndofLastMonth}
then
(numbervar Person := {FIELD1.DATA1};
Datevar bday := date({FIELD2.DATEBIRTH});
Stringvar Role := {TABLE3.FIELD3}
Stringvar over18 := Stringvar over18)
ELSE
(numbervar person := Numbervar person;
Datevar bday := Datevar bday;
Stringvar Role := Stringvar Role;
Stringvar over18 := Stringvar over18)
; totext(numbervar person,0,'') + ' ' + totext(datevar dbay,0,'')
+ ' ' + stringvar Role,0,'' + ' ' + stringvar over18,0,''
//
// I am roughly following the example from
// // and using multiple variable assignments in one formula.
//
// I believe the problem is in the the way
// I have coded the very last line in the example
//
//
// I recieve the message "a string is required here"
// or it works and I get a zero result.
//
//
// I have included only a portion of my formula
// so that it will be easier to read.
//
// If I test the code in an "if then else print" formula
// I can see the result is true and being met.
//
// The problem is that when fields that
// fill the variable, "role" and the
// variable, "over18" are sometimes blank.
// When they (just the two fields out of four)
// are blank I get a blank result.
//
// perhaps I am not allowed to use multiple variable
// types in one formula.
//
// If I modify the last line, I can get it to run, but I get
// a zero result.
// Here is an Exmple of the formula
Numbervar Person;
Datevar Bday;
Stringvar Role;
Stringvar over18;
if
Stringvar Role <> "role1" AND
isnull({TABLE1.DATEBIRTH}) and
{TABLE2.DATEBIRTH} > datevar bday and
{TABLE2.DATEBIRTH} < {@EndofLastMonth}
then
(numbervar Person := {FIELD1.DATA1};
Datevar bday := date({FIELD2.DATEBIRTH});
Stringvar Role := {TABLE3.FIELD3}
Stringvar over18 := Stringvar over18)
ELSE
(numbervar person := Numbervar person;
Datevar bday := Datevar bday;
Stringvar Role := Stringvar Role;
Stringvar over18 := Stringvar over18)
; totext(numbervar person,0,'') + ' ' + totext(datevar dbay,0,'')
+ ' ' + stringvar Role,0,'' + ' ' + stringvar over18,0,''