Crystal 8.5 (can't upgrade until next year)
SQL Server database connection through Pivotal dll.
The Invoice has multiple serial numbers listed for the order. I want to concatenate these serial numbers into one field, but I am running into the >254 characters limit.
From what I've read in the forums, I should be able to split it up somehow and then drop each formula into a text box. There was one example formula that created an array, but the variables were different types so I couldn't use the formula.
I'll include the formulas that I tried to copy from below. So, any help in getting the formulas right would be appreciated.
-Glenda
=====================================================
You would have an initialization formula in the Widget header
@Initialization (suppressed in Widget header)
WhilePrintingRecords;
if not InRepeatedGroupHeader then
(
StringVar array SerialNumbers := ["","",""];
NumberVar Pointer := 1;
);
Now suppress the details section and put the following formula inside it
***************************
@CollectSerialNumbers
WhilePrintingRecords;
StringVar array SerialNumbers ;
NumberVar Pointer;
If Pointer = 1 then
(
if length(SerialNumbers[1] + {Table.SerialNumber}) < 254 then
SerialNumbers[1] := SerialNumbers[1] + {Table.SerialNumber}
else
Pointer := 2;
);
If Pointer = 2 then
(
if length(SerialNumbers[2] + {Table.SerialNumber}) < 254 then
SerialNumbers[2] := SerialNumbers[2] + {Table.SerialNumber}
else
Pointer := 3;
);
If Pointer = 3 then
SerialNumbers[3] := SerialNumbers[3] + {Table.SerialNumber};
*************************************
Now In the footer for Widgets create 3 subsections
In the three subsections you put the fields like this
{Product} { Widget} {@DisplaySerialNo1} sec (A)
---------------------------------------------
{@DisplaySerialNo2} sec (B)
---------------------------------------------
{@DisplaySerialNo3} sec (c)
The formulas above are simple
DisplaySerialNo1
WhilePrintingRecords;
StringVar array SerialNumbers ;
SerialNumbers[1] ;
***********************
DisplaySerialNo2
WhilePrintingRecords;
StringVar array SerialNumbers ;
SerialNumbers[2] ;
***********************
DisplaySerialNo3
WhilePrintingRecords;
StringVar array SerialNumbers ;
SerialNumbers[3] ;
MAKE SURE THE BORDERS OF THE SECTIONS ARE SNUGGED TIGHT TO THE BOTTOM OF THE Fields...and MAKE SURE THE "CanGrow" is enabled on each dispaly field and that "SUPPRESS Blank SECTION" is enabled in the section expert for each Widget footer section.
SQL Server database connection through Pivotal dll.
The Invoice has multiple serial numbers listed for the order. I want to concatenate these serial numbers into one field, but I am running into the >254 characters limit.
From what I've read in the forums, I should be able to split it up somehow and then drop each formula into a text box. There was one example formula that created an array, but the variables were different types so I couldn't use the formula.
I'll include the formulas that I tried to copy from below. So, any help in getting the formulas right would be appreciated.
-Glenda
=====================================================
You would have an initialization formula in the Widget header
@Initialization (suppressed in Widget header)
WhilePrintingRecords;
if not InRepeatedGroupHeader then
(
StringVar array SerialNumbers := ["","",""];
NumberVar Pointer := 1;
);
Now suppress the details section and put the following formula inside it
***************************
@CollectSerialNumbers
WhilePrintingRecords;
StringVar array SerialNumbers ;
NumberVar Pointer;
If Pointer = 1 then
(
if length(SerialNumbers[1] + {Table.SerialNumber}) < 254 then
SerialNumbers[1] := SerialNumbers[1] + {Table.SerialNumber}
else
Pointer := 2;
);
If Pointer = 2 then
(
if length(SerialNumbers[2] + {Table.SerialNumber}) < 254 then
SerialNumbers[2] := SerialNumbers[2] + {Table.SerialNumber}
else
Pointer := 3;
);
If Pointer = 3 then
SerialNumbers[3] := SerialNumbers[3] + {Table.SerialNumber};
*************************************
Now In the footer for Widgets create 3 subsections
In the three subsections you put the fields like this
{Product} { Widget} {@DisplaySerialNo1} sec (A)
---------------------------------------------
{@DisplaySerialNo2} sec (B)
---------------------------------------------
{@DisplaySerialNo3} sec (c)
The formulas above are simple
DisplaySerialNo1
WhilePrintingRecords;
StringVar array SerialNumbers ;
SerialNumbers[1] ;
***********************
DisplaySerialNo2
WhilePrintingRecords;
StringVar array SerialNumbers ;
SerialNumbers[2] ;
***********************
DisplaySerialNo3
WhilePrintingRecords;
StringVar array SerialNumbers ;
SerialNumbers[3] ;
MAKE SURE THE BORDERS OF THE SECTIONS ARE SNUGGED TIGHT TO THE BOTTOM OF THE Fields...and MAKE SURE THE "CanGrow" is enabled on each dispaly field and that "SUPPRESS Blank SECTION" is enabled in the section expert for each Widget footer section.