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

Using an array in a cross-tab

Status
Not open for further replies.

eliasc

IS-IT--Management
Feb 15, 2008
11
US
I am using CR 10. I have a report where I am using a formula to use as a column header for a cross-tab. Below is an example of what I am trying to achieve.


ATLANTA INVOICE ATLANTA SERVICE ATLANTA WARR. BIRMINGHAM INVOICE BIRMINGHAM SERVICE BIRMINGHAM WARR. ETC..

Below is the array in my formula.

Shared NumberVar i;
Shared StringVar CompanyName;
Shared StringVar Array Companies := [
"HFSE - FW",
"ATLANTA INVOICE",
"ATLANTA SERVICE",
"ATLANTA WARR.",
"BIRMINGHAM INVOICE",
"BIRMINGHAM SERVICE",
"BIRMINGHAM WARR.",
"BGSI INVOICE",
"BGSI SERVICE",
"BGSI WARR.",
"PEN INVOICE",
"PEN SERVICE",
"PEN WARR.",
"JACKSON INVOICE",
"JACKSON SERVICE",
"JACKSON WARR.",
"FORT WORTH INVOICE",
"FORT WORTH SERVICE",
"FORT WORTH WARR.",
"JAX INVOICE",
"JAX SERVICE",
"JAX WARR.",
"LOUISVILLE INVOICE",
"LOUSIVILLE SERVICE",
"LOUISVILLE WARR.",
"OKLAHOMA CITY INVOICE",
"OKLAHOMA CITY SERVICE",
"OKLAHOMA CITY WARR."
];
0;

local stringvar tString;
shared numbervar CompName;

CompName :=UBound(Companies) +1;
i := CompName;

For i := 1 to CompName step 1 do
(
ReDim Preserve Companies;
tString :=Companies
);

tString;

Can someone please help me. I don't know where I am going wrong and why it isn't putting the above names in the cross-tab columns.



Thank you for your help.
Chris



 
I answered your other post. Please don't cross-post

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top