Ticket T440064
Visible to All Users
Duplicate

MVC Web Report Designer - How to pass a parameter to save method in ReportStorageWebExtension

created 8 years ago

Hi,

I am working on Mvc web Report Designer, I am able to store the report to database.

While storing the report i need to pass the extra parametrs from DropdwonList and store those values to database.
I am struck at passing the extra parameter to Save method in ReportStorageWebExtension

exapmle

public override string SetNewData(DevExpress.XtraReports.UI.XtraReport report, string defaultUrl)
        {
           // Store report in memory stream
            MemoryStream ms = new MemoryStream();
            report.SaveLayout(ms);

// Here i need to few extra parameters from the dropdownlist, which is plased in cshtml file

}

Answers approved by DevExpress Support

created 8 years ago (modified 8 years ago)

Hi Arvind,

To accomplish your task, use the approach suggested in the T339643: How to access the values stored in HttpContext/Session while working with the ASP.NET HTML5 Document Viewer and End-User Report Designer controls article. Please refer to it and let us know if you need any additional assistance regarding this.

    Comments (2)

      Hi Thanks for quick responce.

      Please can you give one sample example.

      Vasily (DevExpress Support) 8 years ago

        Hi Arvind,

        We do not have any code example that illustrates how to pass additional parameters to the ReportStorageWebExtension. In any case, the main idea of this approach is to write your "Location" and "Company" parameter values to the Session after these parameter values are changed. For example, you can use a callback for this purpose.
        Then, follow the steps provided in the T339643: How to access the values stored in HttpContext/Session while working with the ASP.NET HTML5 Document Viewer and End-User Report Designer controls article to make the Session available in your ReportStorageWebExtension code, and get the "Location" and "Company" values from the Session.
        Let me know if you have any difficulties with the implementation of this approach.

        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.