12,398,181 members (54,252 online)
Rate this:
See more:
I used formula as indexbuild syntax as below for generating table of content........

```WhilePrintingRecords;
shared StringVar Array catArry;
shared NumberVar Array pageArry;
IF NOT (GroupName({Ledger.ACCODE1})& "-" & mid({Ledger.name1},1,100) IN catArry) THEN (
Redim Preserve pageArry[UBound(pageArry) + 1];
pageArry[UBound(pageArry)] := PageNumber;
Redim Preserve catArry[UBound(catArry) + 1];
catArry[UBound(catArry)] := trim(ToText ((GroupName ({Ledger.ACCODE1})))) & "-" & mid({Ledger.name1},1,100);
);
"";```

-----------------------------------------------------------------------------------
I used formula as indexprint syntax as below for Printing table of content........

```WhilePrintingRecords;
NumberVar i;
NumberVar j;
shared StringVar Array catArry;
shared NumberVar Array pageArry;
StringVar Array Output;
Redim Output[UBound (catArry)];
FOR i := 1 to UBound (catArry) do (
Output[i] := mid(Left(CStr(ToText(pageArry[i],0))+" " + "|",5)+mid(catArry[i]+space(100),1,100) ,1,200);
);
Join(Output,CHR(13))```

But it gives error a string can be most 254 characters long.

if u have another method to generate table of contents then please give me a solution for more then 600 or 10000 pages.

Posted 22-May-13 23:29pm
Hitu55328
Updated 22-May-13 23:37pm
Pheonyx12.3K
v2

Rate this:

## Solution 1

help me to solve this problem...

Top Experts
Last 24hrsThis month
 OriginalGriff 420 Richard MacCutchan 265 Richard Deeming 244 Karthik Bangalore 190 ppolymorphe 180
 OriginalGriff 6,548 ppolymorphe 2,625 Karthik Bangalore 2,572 Richard MacCutchan 2,017 F-ES Sitecore 1,977