I haven't really used variables so this is all new. For some reason the global array variable always sees element 1 as being "". I declare the variables in the page header and
put the Formula below in a separate Formula Field. Any suggestions are appreciated. CRYSTAL SYNTAX.
WhilePrintingRecords;
Global stringVar array Feed_Parts;
Global numberVar arrIndex;
IF {TblInventory.Type} = "Feed" THEN
(
IF Feed_Parts[1] = "" THEN
(
Feed_Parts[1] = {TblInventory.Part_Code};
Cstr(Ubound(Feed_Parts)) & " Feed and First Element"
)
ELSE
(
Redim Preserve Feed_Parts[Ubound(Feed_Parts) + 1];
Feed_Parts[Ubound(Feed_Parts)] := {TblInventory.Part_Code};
arrIndex := arrIndex + 1;
Cstr(Ubound(Feed_Parts)) & " Feed and Not First Element"
)
)
ELSE
Cstr(Ubound(Feed_Parts)) & " Not Feed"
put the Formula below in a separate Formula Field. Any suggestions are appreciated. CRYSTAL SYNTAX.
WhilePrintingRecords;
Global stringVar array Feed_Parts;
Global numberVar arrIndex;
IF {TblInventory.Type} = "Feed" THEN
(
IF Feed_Parts[1] = "" THEN
(
Feed_Parts[1] = {TblInventory.Part_Code};
Cstr(Ubound(Feed_Parts)) & " Feed and First Element"
)
ELSE
(
Redim Preserve Feed_Parts[Ubound(Feed_Parts) + 1];
Feed_Parts[Ubound(Feed_Parts)] := {TblInventory.Part_Code};
arrIndex := arrIndex + 1;
Cstr(Ubound(Feed_Parts)) & " Feed and Not First Element"
)
)
ELSE
Cstr(Ubound(Feed_Parts)) & " Not Feed"