Skip to content

Latest commit

 

History

68 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reporting for ASP.NET Core - Customize the Document Viewer's Parameters Panel

This example uses the ParameterPanelFluentBuilder class to customize the Document Viewer's Parameters panel as follows:

  1. Unite report parameters into groups and place parameters side-by-side.
  2. Place a label and editor vertically for each parameter.
  3. Add a separator between parameters inside a group.
Default panel Customized panel
Default panel Customized panel

The example also specifies an expression for the Enabled property to enable/disable a parameter's editor based on a value of another parameter.

The following code sample demonstrates how to transform the default panel above to the customized panel:

var report = new TestReport();
ParameterPanelFluentBuilder.Begin(report)
    .AddGroupItem(g0 => g0
        .WithTitle("Select dates")
        .AddParameterItem(report.Parameters[0], p0 => p0
            .WithLabelOrientation(Orientation.Vertical)))
    .AddGroupItem(g1 => g1
        .WithTitle("Select a customer")
        .WithOrientation(Orientation.Horizontal)
        .WithShowExpandButton(true)
        .AddParameterItem(report.Parameters[1], p1 => p1
            .WithLabelOrientation(Orientation.Vertical))
        .AddSeparatorItem()
        .AddParameterItem(report.Parameters[2], p2 => p2
            .WithLabelOrientation(Orientation.Vertical)))
.End();

report.Parameters["customer"].ExpressionBindings.Add(
    new BasicExpressionBinding() {
        PropertyName = "Enabled",
        Expression = "!IsNullOrEmpty(?company)",
    }
);

To customize the Parameters panel in an ASP.NET Core Reporting application, do the following:

  1. Create an instance of a report whose Parameters panel you want to customize.
  2. Pass the instance to the ParameterPanelFluentBuilder class Begin method and call customization methods.
  3. Open the report preview as described in the following topic: Open a Report in ASP.NET Core Application.

Files to Look At

Documentation

Does This Example Address Your Development Requirements/Objectives?

(you will be redirected to DevExpress.com to submit your response)

About

How to use ParameterPanelFluentBuilder to customize the Web Document Viewer Parameters Panel in an ASP.NET Core application

Topics

Resources

Stars

1 star

Watchers

41 watching

Forks

Used by

Contributors

Languages