Exemplo n.º 1
0
        public void LoadReport(string reportKey)
        {
            Q.ServiceCall(new ServiceCallOptions <ReportRetrieveResponse>
            {
                Service = "Report/Retrieve",
                Request = new ReportRetrieveRequest
                {
                    ReportKey = reportKey
                },
                OnSuccess = response =>
                {
                    this.reportKey              = response.ReportKey ?? reportKey;
                    this.propertyItems          = response.Properties ?? new List <PropertyItem>();
                    this.designPanel.ReportKey  = this.reportKey;
                    this.Element.Dialog().Title = response.Title;
                    this.designPanel.SetDesignList(response.Designs);
                    CreatePropertyGrid();
                    propertyGrid.Load(response.InitialSettings ?? new object());

                    this.toolbar.FindButton("print-preview-button").Toggle(!response.IsDataOnlyReport);
                    this.toolbar.FindButton("export-pdf-button").Toggle(!response.IsDataOnlyReport);
                    this.toolbar.FindButton("export-docx-button").Toggle(!response.IsDataOnlyReport);

                    this.DialogOpen();
                }
            });
        }