Giter Site home page Giter Site logo

devexpress-examples / reporting-asp-net-core-customize-parameters-panel Goto Github PK

View Code? Open in Web Editor NEW
1.0 42.0 0.0 679 KB

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

License: Other

C# 72.33% HTML 27.67%
asp-net-core reporting document-viewer parameters reporting-for-asp-net-core

reporting-asp-net-core-customize-parameters-panel's Introduction

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

reporting-asp-net-core-customize-parameters-panel's People

Contributors

andreylepikhov avatar briandx avatar devexpressexamplebot avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.