The document map is a tree-like collection of bookmarks for the entire report. By default, reports are printed and previewed on the left side of the dashboard. You can also output the dashboard as a PDF file, as shown in the following figure.
The bookmarks in the report must be specified by the report control. You can set the following two attributes:
Xrcontrol. Bookmark this attribute value can be used to create a bookmarkdonefile in the document view as long as it is a non-empty string. In addition, you can bind data to set bookmarks so that multiple bookmarks appear in the document view.
For example:
Xrtablecell5.databindings. Add ("bookmark", datasource, "name", "Name-{0 }");
Xrtablecell5.databindings. Add (New xrbinding ("bookmark", datasource, "name", "Name-{0 }"));
Xrcontrol. bookmarkparent this attribute is used to create a hierarchy of bookmarks. When this attribute is specified to a report control, the bookmarks of the current control are from the bookmarkparent. Otherwise, the current bookmarks are from the root bookmarks of the document.
Any control in the report sets the bookmark attribute. The document Map button appears on the preview form. The document structure panel is also displayed by default. You can use the document Map button to hide or display the panel. You can also useCodeControl the display status of the panel.
Code Using Devexpress. xtraprinting;
// ...
//Create a report and generate its document.
Xtrareport1 report= NewXtrareport1 ();
Report. createdocument ();
// hide a document map.
report. printingsystem. previewform. printcontrol. execcommand (printingsystemcommand. documentmap, New Object [] { false });
//Show a document map.
Report. printingsystem. previewform. printcontrol. Execcommand (printingsystemcommand. documentmap,New Object[] {True});
Hide/show document Map Button
Code // Hide the document Map button.
Report. printingsystem. setcommandvisibility (printingsystemcommand. documentmap, commandvisibility. None );
//Show the document Map button.
Report. printingsystem. setcommandvisibility (printingsystemcommand. documentmap, commandvisibility. All );