简体   繁体   中英

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

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.

If you are using a 'full' version of CR, you can enable the 'Create bookmarks from group tree' option in the File | Export | Report Export Options... dialog. This setting is stored in the RPT file.

I didn't see this option in the CR.Net version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM