Ticket Q576385
Visible to All Users

XtraReport Parameters Dialog

created 11 years ago

We have just run into a problem with Parameter Input when running reports. Up until a few months ago, we were still running v2011 of DevExpress. At that point, when running reports, a Parameter Input Dialog was automatically displayed BEFORE the report was generated.

Now, this no longer occurs, and instead there is a Parameter Panel displayed in the Print Preview AFTER the report is generated.

We have a couple of problems with this which all boil down to us needing the old behavior of being able to enter parameter values BEFORE generating a report. The biggest issue is that we do a lot of custom merging of multiple reports, as well as padding report output for duplex printing to get individual records in a report to be able to be printed on separate physical pages, depending on the final requirements for printing of a report. Since this is all done while generating the report, anything that affects the output of a report afterwards is causing us a lot of problems.

How can we go about getting back the ability to request parameter values before the report is generated?

Answers approved by DevExpress Support

created 11 years ago (modified 11 years ago)

Hi Ben,
First, please make sure that the XtraReport.RequestParameters property is enabled in your reports.
Second, if you wish to display Parameter dialogs for merged reports, call the CreateDocument after passing the Report instance to the ReportPrintTool class. This way, you will inform your report instance that you want to use WinForms methods and controls for user interaction. Here is a sample code:

C#
MainReport mainReport = new MainReport(); ReportPrintTool mainPrintTool = new ReportPrintTool(mainReport); mainReport.RequestParameters = true; mainReport.CreateDocument(); ChildReport childReport = new ChildReport(); ReportPrintTool childPrintTool = new ReportPrintTool(childReport); childReport.RequestParameters = true; childReport.CreateDocument(); .... mainReport.Pages.AddRange(childReport.Pages); mainPrintTool.ShowPreviewDialog();
    Comments (2)

      I used the sample code you suggested and the parameter dialog does not show.  I tried to use one single previewer to show two reports, the first one having a parameter.  I could not make it work.  Please help.  Thanks.

      Yaroslav (DevExpress Support) 6 years ago

        Hi Yiwei,
        I see you've already raised a separate ticket dedicated to the same issue with the missing "Parameters" dialog : ShowRibbonPreview() does not show the Parameters dialog for a report. Please let's continue our discussion there.

        Regards,
        Yaroslav

        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.