Ticket T745568
Visible to All Users

ShowRibbonPreview() does not show the Parameters dialog for a report

created 6 years ago (modified 6 years ago)

In the end-user report designer, when I preview the report, it shows a parameter dialog on the left side, before the report is displayed.  However when I use the following C# code to preview the report , the parameter dialog is not displayed.

XtraReport report = new XtraReport();

report.LoadLayout(reportFilePath);

if (report.DataSource != null)
                ((SqlDataSource)report.DataSource).ConfigureDataConnection += ConfigureDataConnection;

report.RequestParameters = true;
 ReportPrintTool printTool = new ReportPrintTool(report);
 printTool.ShowRibbonPreview();

Because the parameter dialog is not shown, the user cannot input parameters to the user and the report displayed is blank.

What should I do to make the report parameter dialog shown here?

Thanks.

Show previous comments (3)
DevExpress Support Team 6 years ago

    Hello,

    The XtraReports Suite does not have the capability to re-create a merged report after submitting parameters in the parameter panel. You can create a report with subreports to accomplish this task. Here is a corresponding code  snippet:

    C#
    XtraReport mainReport = new XtraReport(); DetailBand detail = new DetailBand(); mainReport.Bands.Add(detail); XRSubreport subreport1 = new XRSubreport(); XRSubreport subreport2 = new XRSubreport(); XtraReport1 report = new XtraReport1(); subreport1.ReportSource = report; XtraReport1 report2 = new XtraReport1(); subreport2.ReportSource = report2; subreport2.LocationF = new PointF(0, 25); mainReport.Bands[BandKind.Detail].Controls.Add(subreport1); mainReport.Bands[BandKind.Detail].Controls.Add(subreport2); ReportPrintTool printTool = new ReportPrintTool(mainReport); printTool.ShowRibbonPreview();

    Thanks,
    Elliot

      Elliot,

      I again run into the problem.

      I have a problem recompiling the sample you gave me.  We are currently using DevExpress 17.1.  It seems thatDevExpress.XtraReports.UI.ExpressionBinding
      is not in that version.   What should I do?

      Thanks for the quick response.  I really appreciate it.

      Willie

      DevExpress Support Team 6 years ago

        Hello Yiwei,

        I have converted my project to the 17.1 version. Take a moment to review it in the attachment.

        Thanks,
        Elliot

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.