Search code examples
c#asp.netvb.netpdfcrystal-reports

Group Tree PDF Export in Crystal Reports


I am trying to figure out how to export a crystal report into a PDF file from an ASP.NET application. I got it to work, however, I want the group tree to show up as bookmarks in the PDF. From what I've found on google, the way to do this is to declare an instance of the CrystalDecisions.Shared.PDFFormatOptions class, then set the GroupTree property to true. However, this class does not seem to exist. I don't know if its because I am using Crystal Reports for Visual Studio 2008 or what, but it is not there. There is a class called CrystalDecisions.Shared.PdfRtfWordFormatOptions, however, the GroupTree property does not exist in this class. Can someone tell me what I am missing?

Thanks


Solution

  • Not familiar with that class as I have never had to use it but tried this on my machine:

    CrystalDecisions.Shared.PdfFormatOptions options = new CrystalDecisions.Shared.PdfFormatOptions();
            options.CreateBookmarksFromGroupTree = true;
    

    It seemed ok to me. I have the full Crystal Reports 2008 version not the one that comes with visual studio so that could be the reason it doesn't work for you.

    I would check that you have a reference in your project to the CrystalDecisions.Shared namespace in your project though.