Bug Report Q144627
Visible to All Users

Parameters - Unable to bind report controls to parameters

created 16 years ago

Hello, Support:
Well, I've read numerous posts and help-file entries on parameters, but I must be missing something. I can't get the values of parameters to show up on the report. Perhaps there's something wrong with my workflow on this. My goal is to add four parameters to a report in the designer at design time, and then silently pass in the values at runtime. Here's my workflow:

  1. Create a report is Visual Studio;
  2. Create and add parameters, along with other, bound fields;
  3. Set the visibility of the parameters to "public", and set turn off the requesting of parameters;
  4. Save down the report into an REPX file;
  5. In code, do the following (this is just a quick spike to test an idea):
    <code lang="cs">
    XtraReport faxCoverSheet = new XtraReport();
    faxCoverSheet = XtraReport.FromFile(@"C:\Users\Eric\Documents\CompanyDev\DotNET Development\COMPPROJ\Production\BidIt\BidIt\Reports\DefaultFaxCoverSheet.repx", true);
    Debug.Assert(faxCoverSheet != null);
    faxCoverSheet.Parameters["paramTo"].Value = proposal.Contact.FullName;
    faxCoverSheet.Parameters["paramSubject"].Value = email.Subject;
    faxCoverSheet.Parameters["paramBody"].Value = email.Body;
    email.Body = "{nocoverpage}";
    faxCoverSheet.ExportToPdf(@"C:\FaxCoverSheet.pdf");
    if (fileAttachments == null)
         fileAttachments = new[] { "C:\FaxCoverSheet.pdf" };
    else
         fileAttachments[0] = "C:\FaxCoverSheet.pdf";
    </code
    The rest goes on from there to send the email to an Internet-based fax service. No matter what I do, I can't the parameters to show up. And, yes, I've made sure their Visible property is set to true.
    What am I doing wrong here?
    Thank you.
    Eric
Show previous comments (2)
DevExpress Support Team 16 years ago

    Hello Eric,
    Thank you for your feedback and clarification. I'm afraid you're referring to an actual XtraReports issue. Therefore, I've converted your question to a bug report and changed its subject. Our developers will continue the research in order to determine what goes wrong. We will keep you informed about our progress.
    Thank you,
    Valery.

      Valery,
      O.K. Glad to know I wasn't losing my mind. We probably will need an immediate fix, but I'm in the middle of a pretty substantial refactoring right now. So I have some time. I'll contact support when the need for the fix becomes more pressing.
      Thank you for your assistance.
      Eric

        Thank you! You guys are awesome!
        Eric

        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.