Search code examples
vb.netcrystal-reportsobsolete

How do I bring this up to date (CrystalDecisions.Windows.Forms.CrystalReportViewer)?


Me.rpt_Viewer.DisplayGroupTree = False

This generates a warning saying that DisplayGroupTree is obsolete

+----------+---------+----------------------------------------------------------------------+-------------------------------------+------+-------------------+
| Severity | Code    | Description                                                          | Project File                        | Line | Suppression State |
+----------+---------+----------------------------------------------------------------------+-------------------------------------+------+-------------------+
| Warning  | BC40008 | 'Public Overloads Property DisplayGroupTree As Boolean' is obsolete. | ProjectName C:\Projects\frm_Main.vb | 116  | Active            |
+----------+---------+----------------------------------------------------------------------+-------------------------------------+------+-------------------+

I spent hours googling this and many posts say exactly what I know, that it's obsolete.


Solution

  • Answer from https://answers.sap.com/questions/4570064/displaygrouptree-property-is-obsolete---crystalrep.html

    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.

    CrystalDecisions.Windows.Forms.CrystalReportViewer viewer;
    viewer.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;