共用方式為


自訂檢視器外觀

Web Form Viewer 和 Windows Form Viewer 的類別描述皆支援在執行階段自訂檢視器外觀的選項。

切換工具列顯示

您可以讓使用者在 Web Form Viewer 和 Windows Form Viewer 中切換工具列顯示。請在對應的檢視器中使用 CrystalReportViewer 類別下的 DisplayToolbar 屬性來進行這項作業。

[Visual Basic]

crystalReportViewer1.DisplayToolBar = True

[C#]

crystalReportViewer1.DisplayToolBar = true;

[C++]

crystalReportViewer1->DisplayToolBar = true;

[VJ#]

crystalReportViewer1.set_DisplayToolBar(true);

切換群組樹狀結構顯示

您可以讓使用者在 Web Form Viewer 和 Windows Form Viewer 中切換群組樹狀結構顯示。請在對應的檢視器中使用 CrystalReportViewer 類別下的 DisplayGroupTree 屬性來進行這項作業。

[Visual Basic]

CrystalReportViewer1.DisplayGroupTree() = True

[C#]

crystalReportViewer1.DisplayGroupTree = true;

[C++]

crystalReportViewer1->DisplayGroupTree = true;

[VJ#]

crystalReportViewer1.set_DisplayGroupTree(true);

注意   雖然在 Windows Form Viewer 中,此功能為預設工具列的一部份,您可以隱藏預設工具列並使用自己的方法支援此功能。

調整群組樹狀結構比例為 Web Form Viewer 的報表頁

您可以讓使用者在執行階段將群組樹狀結構的比例調整為 Web Form Viewer 的報表頁。請使用CrystalReportViewer 類別下的 PageToTreeRatio 屬性來進行這項作業。

[Visual Basic]

crystalReportViewer1.PageToTreeRatio() = 4

[C#]

crystalReportViewer1.PageToTreeRatio = 4;

[C++]

crystalReportViewer1->PageToTreeRatio = 4;

[VJ#]

CrystalReportViewer1.set_PageToTreeRatio(4);

請參閱

使用群組樹狀結構、頁面檢視器和工具列 | 群組資料 | Web Form Viewer 群組樹狀結構 | Windows Form Viewer 群組樹狀結構