Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Crystal Reports - table of contents Post Reply Post New Topic
Author Message
skarthick6
Newbie
Newbie


Joined: 03 May 2010
Online Status: Offline
Posts: 3
Quote skarthick6 Replybullet Topic: Crystal Reports - table of contents
     Posted: 05 May 2010 at 5:47am
Hi, I would like to create a Table of Contents page in a Crystal Reports report. My report has a series of sub-reports or Sections within it, and I need to be able to tell the reader where to find each Section. Something like this below:

Report Table of Contents

Section 1 .......................4
Section 2 .......................7
Section 3 .......................13
Section 4 .......................27
Section 5 .......................31

The Table of Contents would normally precede the report sections themselves. In the forums I read, they say, it's possible with a formula but the TOC will appear at the end of the report, which is obviously of no use!

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 06 May 2010 at 3:34am
CR can't know where an item is until it has read/written it, so there is no way to determine ahead of time where an item is.  It can't determine the results of a formula until it has read the data, how could it determine the number of pages a subreport is going to take?
 
Depending on your data / subreport and how you are getting the data, I could see a method but it may not be fullproof.  If you get the data from stored proc, you could probably determine how many records are going to be in each subreport and if the subreports don't have to grow set on, you can probably determine how many pages (with groupings) the subreport is going to consume, and since each subreport starts on it's own page...
 
It would add proccessing time to the stored proc, but it might be doable...but there are no guarantees.
 
here is another way of thinking about it.  You are writing a word document, can you write the toc before the document?  You can't even tell Word to do it until you are done.  CR is no smarter than Word, and it can't go back and add information.
 
HTH
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum