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

Crystal Reports v10 TOC for MAS200

Status
Not open for further replies.

JohnACW

Technical User
Oct 27, 2010
3
US
Hello, I have created service bibles for my technicians which include categories and sub categories. I would like to create a table of contents showing both the main category and the subs which follow.

I have incorporated the following and it works good but only shows the main categories:

global stringvar strTOC1;
global stringvar strTOC2;
local stringvar strTemp;

if not InRepeatedGroupHeader then
( strTemp := {customer.country} + chr(10) ;
if len(strTemp) + len(strToc1) <= 254 then
( strToc1 := StrToc1 + strTemp;
strToc2 := StrToc2 +
totext(PageNumber,0) + chr(10) ))

as well as the following:

whileprintingrecords;
global stringvar strTOC1;
strToc1

whileprintingrecords;
global stringvar strTOC2;
strToc2

My question is how to expand this formula to reflect the following:

BALL VALVE 6
SWEAT 6
BELTS 7
A GROOVE 7
B GROOVE 7
COG V GR 8
BRASS 10
ADAPTERS 10
FEMALE 10
MALE 10

Is this doable? Will there be limitations as this is a long TOC.

Thanks
 
Are you asking if I can export to a PDF file then the answer is yes.
 
What Ido means is that if your output can be PDF then you can use Visual Cut to generate a TOC for that PDF file. But it only works as part of a PDF Export.

Your method will be limited. By how much depends on your version of CR. The formula you posted checks for a length of 254 which means it was originally written for CRv8.5. That version does have some low limits for long strings. Is that still your version?

Another option that I just found out about recently is on this link:


It is a special UFL specifically for doing a TOC. I currently know nothing about it but it might be worth checking out. If anyone tries it out please let the rest of us know how it works.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top