コード例 #1
1
        public void SetFilter(QlikView.Common.Filter filter)
        {
            if (filter == null)
            {
                this._doc.Clear();
                return;
            }

            this._filter = filter;

            this.SetSelections(filter.Fields);
            this.SetVariables(filter.Variables);
        }
コード例 #2
0
        public void SetFilter(QlikView.Common.Filter filter)
        {
            if (filter == null)
            {
                this._doc.Clear();
                return;
            }

            this._filter = filter;

            this.SetSelections(filter.Fields);
            this.SetVariables(filter.Variables);
        }
コード例 #3
0
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            filter = this.ViewModel.ReportItem as Filter;

            this.comboBoxConnection.SelectedValue = filter.Connection;

            if (this.ViewModel.IsNew)
            {
                this.gridName.Visibility = System.Windows.Visibility.Visible;
                this.stackNewActions.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                this.gridName.Visibility = System.Windows.Visibility.Collapsed;
                this.stackNewActions.Visibility = System.Windows.Visibility.Collapsed;
            }
        }
コード例 #4
0
        private int ExecuteExportJPG(string objectId, string fileName)
        {
            this._exportFileName = fileName;

            var obj = this.FindSheetObject(objectId);

            QlikView.TableBox table = obj as QlikView.TableBox;
            QlikView.Graph graph = obj as QlikView.Graph;
            QlikView.PivotTableBox pivotBox = obj as QlikView.PivotTableBox;
            QlikView.StraightTableBox straightTable = obj as QlikView.StraightTableBox;

            if (obj != null)
            {
                if (obj.GetSheet().IsActive() == false)
                {
                    obj.GetSheet().Activate();

                    //special case for china dash
                    if (this._filter != null && (this._filter.Name == "ChinaSalesFunnelDash_Summary" || this._filter.Name == "ShanghaiSalesFunnelDash_Summary"))
                        System.Threading.Thread.Sleep(120 * 1000);
                    else
                        System.Threading.Thread.Sleep(10 * 1000);

                    if (this._filter != null)
                        this._filter = null;

                }

                if (table != null)
                {
                    if (table.IsMinimized())
                        table.Restore();

                    table.ExportBiff(this._exportFileName);
                    return 0;
                }

                if (graph != null)
                {
                    /*Export format
                        0   =   HTML
                        1   =   Text delimited
                        2   =   bitmap image
                        3   =   XML
                        4   =   QVD
                        5   =   BIFF (Excel)
                     * */

                    if (graph.IsMinimized())
                        graph.Restore();

                    bool ok = graph.ExportEx(this._exportFileName, 2);
                    if (ok)
                        return 0;
                    else
                        return -1;
                }

                if (pivotBox != null)
                {
                    if (pivotBox.IsMinimized())
                        pivotBox.Restore();

                    pivotBox.ExportBitmapToFile(this._exportFileName);
                    return 0;
                }

                if (straightTable != null)
                {
                    if (straightTable.IsMinimized())
                        straightTable.Restore();

                    straightTable.ExportBitmapToFile(this._exportFileName);
                    return 0;
                }
            }

            return -1;
        }