Print Page | Close Window

Report Table of Contents Help

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1510
Printed Date: 02 May 2025 at 10:04am


Topic: Report Table of Contents Help
Posted By: jammyking
Subject: Report Table of Contents Help
Date Posted: 16 Oct 2007 at 6:14am
Hi I'm new to crystal reports and i've been asked to create a report with a TOC as the second page.  I did some research and it seems that this is no easy task (correct me if it is).  The options i've found are :
 
http://www.ml-crystal.com/articles/toc.htm - http://www.ml-crystal.com/articles/toc.htm  which i've not tried as the contents page has to appear at the end of the report which is not what the client requires.
 
http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2011950&sliceId=&dialogID=360384&stateId=1%200%20356275 - http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2011950&sliceId=&dialogID=360384&stateId=1%200%20356275  which sounds like the right thing, it creates an insert statement and stores the TOC in a temporary table.
 
Trouble is i can't seem to get it to excute the insert statement! i've simplyfied it down to a wizard generated report to which i've added a subreport in the report footer section. This subreport is connected to a command which is static insert statement. When i preview the report i get no error messages but it's not updated the table either. 
 
I'm new to crystal reports so please state any obvious things i've missed. is a sub report the best way to run an insert query?
 
Thanks!



Replies:
Posted By: BrianBischof
Date Posted: 16 Oct 2007 at 9:26am
Yes, TOC is a very complex problem many people run into. CR wasn't designed for this and it's no easy task. The KB article you mention is your best bet and, yes, the subreport is the way to go. I talk using updateable SQL statements in detail in Chapter 11 of my book. There are two probably causes for error: is the command object returning a value? It can't be ONLY an insert statement b/c then CR won't run it (no data to print means no reason to run it). Also, make sure you have the Save Data With Report option turned off. You want the SQL command to be called every time.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window