Designer configure

GonzaloGonzalo Madrid
edited 9:22PM in FastReport .NET
Hi!
I am using FastReport.Net and I am trying to integrate in my application the whole tool.
I want that my program manages the edition of reports using the FastReport Designer, for it I execute it using the instruction:

Report1. Design (this); // modal

I Want that on having executed the designer in my application it appears always the same data connection provided by my source code.
The user will not be able to configure (or create) a new data connection and only it will be able to use provided previously by my source code, even when the user is going to create a new report.

How can I do it?

Thank you.

Comments

  • mohanarajmohanaraj 600001
    edited 9:22PM
    Hello,

    By creating the dataset in (.xsd file ) in .net. you can add this dataset as a datasource for your report. use this code to generate the design with userdefined dataset.



    #region generate .frx
    protected void Button1_Click(object sender, EventArgs e)
    {
    Thread th = new Thread(DesignReport);
    th.SetApartmentState(ApartmentState.STA);
    th.Start();
    }

    private void DesignReport()
    {
    Report report = new Report();

    // create the DataSet instance
    orgSummary ds = new orgSummary();
    Parameter ps = new Parameter();
    // register it in a report
    report.RegisterData(ds);
    report.RegisterData(ps);
    // run the designer
    report.Design();

    // dispose a report
    report.Dispose();
    }

    #endregion
  • edited 9:22PM
    Hello,

    You need to use the ApplicationConnection property as discussed here:
    http://www.fast-report.com/en/forum/?p=/discussion/5966
  • GonzaloGonzalo Madrid
    edited 9:22PM
    Thanks to the two.

    I will use Config.DesignerSettings.ApplicationConnection property. It is just with what I need.

    Regards.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.