private DetailView CreateParametersDetailView(ReportParametersObjectBase reportParametersObject)
 {
     Guard.ArgumentNotNull(reportParametersObject, "reportParametersObject");
     CreateCustomParametersDetailViewEventArgs args = new CreateCustomParametersDetailViewEventArgs(reportParametersObject, Application);
     OnCreateCustomParametersDetail(args);
     DetailView detailView = null;
     if (args.Handled)
     {
         detailView = args.DetailView;
     }
     else
     {
         detailView = Application.CreateDetailView(reportParametersObject.ObjectSpace, reportParametersObject, false);
     }
     if (detailView != null && detailView.Items.Count == 0)
     {
         detailView.Dispose();
         detailView = null;
     }
     return detailView;
 }
 protected virtual void OnCreateCustomParametersDetail(CreateCustomParametersDetailViewEventArgs args)
 {
     if (CreateCustomParametersDetailView != null)
     {
         CreateCustomParametersDetailView(this, args);
     }
 }