Пример #1
0
        protected void CreateGlobalHeaderRow(UReportPage page)
        {
            CRow r = (CRow)rowdef["GLB_HEADER_LEVEL0"];

            CRow   nr   = r.Clone();
            String info = String.Format("{0} ({1})", CUtil.DateTimeToDateStringTime(DateTime.Now), OnixWebServiceAPI.GetLastUserLogin());

            nr.FillColumnsText(info, "Page " + CurrentPage);
            ConstructUIRow(page, nr);

            AvailableSpace = AvailableSpace - nr.GetHeight();

            String rpid = rptparam.GetFieldValue("REPORT_ID");

            r = (CRow)rowdef["GLB_HEADER_LEVEL1"];
            r.FillColumnsText(reportObj.Optional);
            ConstructUIRow(page, r);

            AvailableSpace = AvailableSpace - r.GetHeight();

            String header = createReportParamHeader();

            if (!header.Equals(""))
            {
                CRow paramRow = (CRow)rowdef["GLB_HEADER_PARAM"];
                paramRow.FillColumnsText(header);
                ConstructUIRow(page, paramRow);

                AvailableSpace = AvailableSpace - paramRow.GetHeight();
            }
        }
Пример #2
0
        protected double addNewDataRow(Hashtable rowdef, CReportDataProcessingProperty rpp, String key, String format, int row, CTable data)
        {
            CRow d0  = (CRow)rowdef[key];
            CRow d00 = d0.Clone();

            ArrayList temps00 = getColumnDataTexts(format, row + 1, data);

            d00.FillColumnsText(temps00);
            rpp.AddReportRow(d00);

            return(d00.GetHeight());
        }
Пример #3
0
        protected double addNewFooterRow(Hashtable rowdef, CReportDataProcessingProperty rpp, String key, String format, string caption, ArrayList totals)
        {
            CRow ft  = (CRow)rowdef[key];
            CRow ftr = ft.Clone();

            ArrayList subTotals = displayTotalTexts(format, totals, 1, caption);

            ftr.FillColumnsText(subTotals);

            rpp.AddReportRow(ftr);

            return(ftr.GetHeight());
        }
Пример #4
0
        protected void ConstructUIRow(UReportPage page, CRow row)
        {
            double maxh = 0.00;
            Grid   grd  = new Grid();

            RowDefinition rd = new RowDefinition();

            rd.Height = new GridLength(row.GetHeight());
            grd.RowDefinitions.Add(rd);

            if (excel != null)
            {
                excel.AddRow(row);
            }

            int cnt = row.GetColumnCount();

            for (int i = 0; i < cnt; i++)
            {
                CColumn          clm = row.GetColumn(i);
                ColumnDefinition cd  = new ColumnDefinition();
                cd.Width = clm.GetWidth();
                grd.ColumnDefinitions.Add(cd);
            }

            for (int i = 0; i < cnt; i++)
            {
                CColumn clm = row.GetColumn(i);

                Border bd = new Border();

                bd.BorderBrush         = clm.GetBorderColor();
                bd.BorderThickness     = clm.GetBorderThickness();
                bd.VerticalAlignment   = VerticalAlignment.Stretch;
                bd.HorizontalAlignment = HorizontalAlignment.Stretch;

                TextBlock tblk = new TextBlock();

                tblk.Margin = row.GetMargin();
                tblk.HorizontalAlignment = clm.GetHorizontalAlignment();
                tblk.VerticalAlignment   = clm.GetVertocalAlignment();
                tblk.Text = clm.GetText().Text;
                //tblk.TextWrapping = TextWrapping.Wrap;
                if (row.GetFontFamily() != null)
                {
                    tblk.FontFamily = row.GetFontFamily();
                }
                tblk.FontWeight = row.GetFontWeight();
                tblk.FontStyle  = row.GetFontStyle();
                if (row.GetFontSize() > 0)
                {
                    tblk.FontSize = row.GetFontSize();
                }

                if (tblk.ActualHeight > maxh)
                {
                    maxh = tblk.ActualHeight;
                }

                bd.Child = tblk;

                Grid.SetColumn(bd, i);
                grd.Children.Add(bd);
            }

            page.AddRowPannel(grd);
        }