CRXI - windows 7
I have two arrays, one string and one numeric, about 20 elements in each array
I create one long string of values from each array, as follows:
toc_listing_shared:='';
i:=0;
part1:='';
part2:=replicatestring('.',80);
part3:='';
do
( i:=i+1;
part1:=left(trim(industry_name_shared)+space(30),30);
part2:=totext(industry_page_no_shared,0);
toc_listing_shared := toc_listing_shared + part1 + ' ' + part2 + ' ' + part3 + chr(10) + chr(10);
)
while i<={#group_position_in_array}-1;
yes, I am trying to create a table of contents, for our industry directory.
because of the chr(10) + chr(10), on the report I get 20 lines of:
Industry name .................................................... pg#
Industry name .................................................... pg#
Industry name .................................................... pg#
the names and page #s are correct, but, because the industry names are different lengths, part2 (............) needs to be a different
length for each line, and because letters are of different widths, left(trim(industry_name)+space(30),30) doesn't work either, the page #s are not aligned.
so what I get, is more like this:
Industry name AAAAAA ......................................... 1 ( with the space between the industry name and the beginning
Industry name BBBBBBBBB ............................................... 3 of the ... which doesn't seem to show up here in the preview )
Industry name CC ............................................. 7
is there a way to force a variable to maintain a static 'physical' width or # of letters with equal width despite the value it contains? I realize that the '.....' wouldn't necessarily start immediately after the industry name as shown above, but it's more important that the page #s are aligned to the right.
i.e.
Industry name AAA .......................................................... 1
Industry name BBBBBBBBBBB ............................................. 3
industry name CCCCCCC .................................................. 7
this doesn't show up proerply here in the post and what I attempted to show, was the ...... all the same length with a space between the industry name and the beginning of the .........
of course it would be ideal to have:
Industry name AAA .......................................................... 1
Industry name BBBBBBBBBBB ............................................. 3
industry name CCCCCCC .................................................. 7
but I'm not hoping for a miracle.
any assistance would be gretly appreciated.
thank you
kim
I have two arrays, one string and one numeric, about 20 elements in each array
I create one long string of values from each array, as follows:
toc_listing_shared:='';
i:=0;
part1:='';
part2:=replicatestring('.',80);
part3:='';
do
( i:=i+1;
part1:=left(trim(industry_name_shared)+space(30),30);
part2:=totext(industry_page_no_shared,0);
toc_listing_shared := toc_listing_shared + part1 + ' ' + part2 + ' ' + part3 + chr(10) + chr(10);
)
while i<={#group_position_in_array}-1;
yes, I am trying to create a table of contents, for our industry directory.
because of the chr(10) + chr(10), on the report I get 20 lines of:
Industry name .................................................... pg#
Industry name .................................................... pg#
Industry name .................................................... pg#
the names and page #s are correct, but, because the industry names are different lengths, part2 (............) needs to be a different
length for each line, and because letters are of different widths, left(trim(industry_name)+space(30),30) doesn't work either, the page #s are not aligned.
so what I get, is more like this:
Industry name AAAAAA ......................................... 1 ( with the space between the industry name and the beginning
Industry name BBBBBBBBB ............................................... 3 of the ... which doesn't seem to show up here in the preview )
Industry name CC ............................................. 7
is there a way to force a variable to maintain a static 'physical' width or # of letters with equal width despite the value it contains? I realize that the '.....' wouldn't necessarily start immediately after the industry name as shown above, but it's more important that the page #s are aligned to the right.
i.e.
Industry name AAA .......................................................... 1
Industry name BBBBBBBBBBB ............................................. 3
industry name CCCCCCC .................................................. 7
this doesn't show up proerply here in the post and what I attempted to show, was the ...... all the same length with a space between the industry name and the beginning of the .........
of course it would be ideal to have:
Industry name AAA .......................................................... 1
Industry name BBBBBBBBBBB ............................................. 3
industry name CCCCCCC .................................................. 7
but I'm not hoping for a miracle.
any assistance would be gretly appreciated.
thank you
kim