DisplayGroupTree() property is obsolete - CrystalReportViewer in VS 2008 Posted: Aug 8, 2008 6:21 PM
Hello,
It appears that the DisplayGroupTree() property in the CrystalReportViewer is now obsolete and doesn't work in VS 2008. Previously to 2008, this property would allow you to show or hide the Group Tree area when a report was rendered in the viewer at runtime.
When I ported my solution to VS 2008, this property doesn't work anymore and the Group Tree is displayed every time. I looked for other properties in on the CrystalReportViewer object and nothing looks like it shows/hides the Group Tree.
Does anybody know how to hide the Group Tree area in the CrystalReportViewer in VS 2008?
Thanks.
回答:
I'm assuming you're using Crystal Reports 2008 on Visual Studio 2008, and not Crystal Reports Basic that comes with Visual Studio 2008. For the former, the DisplayGroupTree is obsoleted, but not for the latter.
Crystal Reports 2008 has a new Parameter Panel, so the left-hand pane can contain either the Parameter Panel or the Group Tree Panel. Since it's no longer a binary choice, the DisplayGroupTree was obsoleted.
Set the property ToolPanelView to either None (or null), ToolPanelViewType.GroupTree or ToolPanelViewType.ParameterPanel.