cancel
Showing results for 
Search instead for 
Did you mean: 

How to export crystal to pdf with bookmarks

former_member1012208
Participant
0 Kudos

I would like to know how to export a crystal report into pdf with bookmarks. I have written the code to export to pdf, but don't know how to include the "create bookmarks from group tree" option.Any help is greatly appreciated.

{code}

Dim myReport As New ReportDocument

myReport.Load("C:\Cae\Results.rpt")

Dim sPdf As String = "C:\Cae\Results.pdf"

myReport.ExportToDisk(ExportFormatType.PortableDocFormat, sPdf)

{code}

Accepted Solutions (1)

Accepted Solutions (1)

ido_millet
Active Contributor
0 Kudos

Use PdfFormatOptions and set the CreateBookmarksFromGroupTree property to True.

If you search for these 2 terms, you should find several code examples.

former_member1012208
Participant
0 Kudos

Thanks for the reply. It works, but I see that it adds the run time report name at the top of the group tree. When I export the report directly from Crystal designer, it doesn't do that. Is there any way to remove the report name being displayed at the top?

ido_millet
Active Contributor
0 Kudos

The only alternative I'm aware of is one of the 3rd-party Crystal Reports desktop scheduler (see list at http://kenhamady.com/bookmarks.html). It allows you to use hidden Crystal formulas to control the bookmarks in the exported pdf (you can specify the text, color, bold status, open/closed status, etc).

It also allows you to generate bookmarks from within subreports.

Answers (0)