Create Table of contents (TOC) in SQL Reports
This night I finished a advanced report with with table of contents with page numbers of cause it’s all dynamics and data is feeded from a Microsoft CRM database but that could be any data source if needed.
The scenario is that my customer needed to print product brochere diretly from inside of Microsoft CRM with product information and pictures etc. instead of creating it manually in Adobe Indesign.
They can now create and print an brochure in 1 hour instead of using up to 2 weeks, they are able to print the brochure / Email it directly to the customer (of cause with bookmarks directly in the PDF) / send it directly to a print house)
Inside CRM I create 3 entities to control the TOC, layout and which products there should be in the output.
–> Brochure Sections
–> Brochure Products
Description of the entities:
Brochure: This is the main record of the brochure, and is having all the general informations.
Bruchure Sections: This is the holder of each TOC section in the report, and is also controlling which background picture there should be on the given section. also in this case some sections should have 2 products on each page and others should have 4. (This is related to the Brochure entity)
Brochure Products: This is where we have all the product, and they have options to put in country specific information regarding the product. (This is related to the Brochure and Brochure Section entity)
I will post more information later but are very busy on working.
What there is missing in this post is how I:
– Constructed the reports inside Visual Studio it’s using about 4 reports
– Which stored procdure there was needed (custom builds)
– Which T-SQL querye’s I made (it’s here all the fun is
For a quick note It’s all done using this software on a Microsoft Windows 2008 server with:
– Microsoft SQL 2005 Standard
– Microsoft SQL 2005 Reports
– Microsoft Visual Studio 2005
– Microsoft Windows File Services (For storage of the section and product pictures)
Please place a comment if you want me to publish an article regarding this, then I will spend the time on it