亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rm_pehgrid.pas

?? report machine 2.3 功能強大
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
        THackFormReport(FFormReport).FormWidth[FFormReport.Report.Pages.Count - 1] := IntToStr(liNextX);
        THackFormReport(FFormReport).AddPage;
        THackFormReport(FFormReport).FormWidth.Add('0');
        liPage := FFormReport.Report.Pages[FFormReport.Report.Pages.Count - 1];
        liNextX := tmpx0;
        liFlagFirstColumn := True;
        DrawFixedColHeader;
      end;
    end;

    MakeOneHeader(i);
    Inc(liNum);
  end;

  liFlagFirstColumn := True;
  if FPrintDoubleFrame then
    t.RightFrame.Width := 2;

  if FFormReport.Report.Pages.Count > 1 then
    THackFormReport(FFormReport).FormWidth[THackFormReport(FFormReport).FormWidth.Count - 1] := IntToStr(liNextX);
end;

procedure TRMPrintEHGrid.OnBeforePrintBandEvent(Band: TRMBand; var PrintBand: Boolean);
begin
  if not THackGrid(FDBGridEh).SelectedRows.CurrentRowSelected then
    PrintBand := FALSE;
end;

procedure TRMPrintEHGrid.OnGenerate_Object(aFormReport: TRMFormReport;
  Page: TRMPage; Control: TControl; var t: TRMView);
var
  liView: TRMView;
  i, j, liLeftx: Integer;
  liNextX, liNextY: Integer;
  liDataSet: TDataSet;
  liFooter: TColumnFooterEh;
  liNum, liPageNo, tmpx0: Integer;
  liPage: TRMPage;
  liFlagFirstColumn: Boolean;

  procedure DrawDoubleFrameBottom(aView: TRMView; aList: TList);
  var
    t: TRMMemoView;
  begin
    if FPrintDoubleFrame then
    begin
      t := TRMMemoView(RMCreateObject(gtMemo, ''));
      t.CreateUniqueName;
      t.LeftFrame.Visible := False;
      t.TopFrame.Visible := True;
      t.RightFrame.Visible := False;
      t.BottomFrame.Visible := False;
      t.TopFrame.Width := 2;
      t.Gapx := 0; t.GapY := 0;
      t.SetBounds(aView.x, aFormReport.GridTop + aFormReport.GridHeight, aView.dx, 2);
      t.PStretched := rmgoStretch in aFormReport.ReportOptions;
      liPage.Objects.Add(t);
      aList.Add(t);
    end;
  end;

  procedure MakeOneDetail(aIndex: Integer);
  begin
    if THackGrid(FDBGridEh).Columns[aIndex].Checkboxes then
    begin
      liView := RMCreateObject(gtAddIn, 'TRMCheckBoxView');
      TRMCheckBoxView(liView).CheckStyle := csCheck;
    end
    else
    begin
      liView := RMCreateObject(gtMemo, '');
      liView.PStretched := rmgoStretch in FFormReport.ReportOptions;
      TRMMemoView(liView).PWordWrap := rmgoWordWrap in aFormReport.ReportOptions;
      TRMMemoView(liView).PLayout := rmtlCenter;
      aFormReport.AssignFont(TRMMemoView(liView), THackGrid(FDBGridEh).Columns[aIndex].Font);
      case THackGrid(FDBGridEh).Columns[aIndex].Alignment of
        taLeftJustify: TRMMemoView(liView).PAlignment := rmtaLeftJustify;
        taRightJustify: TRMMemoView(liView).PAlignment := rmtaRightJustify;
        taCenter: TRMMemoView(liView).PAlignment := rmtaCenterJustify;
      end;
      THackFormReport(aFormReport).SetMemoViewFormat(TRMMemoView(liView), liDataSet.FieldByName(THackGrid(FDBGridEh).Columns[aIndex].FieldName));
    end;
    liView.CreateUniqueName;
    liView.x := liNextX;
    liView.y := 0;
    liView.dx := THackGrid(FDBGridEh).Columns[aIndex].Width + 1;
    liView.dy := THackGrid(FDBGridEh).DefaultRowHeight + 4;
    if (rmgoGridLines in aFormReport.ReportOptions) and (dgColLines in THackGrid(FDBGridEh).Options) then
      liView.Prop['FrameTyp'] := $F
    else
      liView.Prop['FrameTyp'] := 0;
    if THackGrid(FDBGridEh).Columns[aIndex].FieldName <> '' then
      liView.Memo.Text := Format('[%s.%s."%s"]', [liDataSet.Owner.Name, liDataSet.Name, THackGrid(FDBGridEh).Columns[aIndex].FieldName]);
    liPage.Objects.Add(liView);
    aFormReport.PageDetailViews.Add(liView);
    liNextX := liNextX + THackGrid(FDBGridEh).Columns[aIndex].Width + 1;
    if Assigned(aFormReport.OnAfterCreateGridObjectEvent) then
      aFormReport.OnAfterCreateGridObjectEvent(Control, THackGrid(FDBGridEh).Columns[aIndex].FieldName, liView);

    if FPrintDoubleFrame then
    begin
      if liFlagFirstColumn then
        liView.LeftFrame.Width := 2;
    end;
    DrawDoubleFrameBottom(liView, aFormReport.ColumnFooterViews);
    liFlagFirstColumn := False;
  end;

  procedure MakeOneFooter(aRow, aIndex: Integer);
  begin
    liFooter := nil;
    if THackGrid(FDBGridEh).Columns[aIndex].Footers.Count > aRow then
      liFooter := THackGrid(FDBGridEh).Columns[aIndex].Footers[aRow]
    else if THackGrid(FDBGridEh).Columns[aIndex].Footers.Count = aRow then
      liFooter := THackGrid(FDBGridEh).Columns[aIndex].Footer;
    if liFooter <> nil then
    begin
      case liFooter.ValueType of
        fvtSum:
          begin
            liView := RMCreateObject(gtCalcMemo, '');
            TRMCalcMemoView(liView).ResetAfterPrint := True;
            TRMCalcMemoView(liView).CalcType := rmdcSum;
            if liFooter.FieldName <> '' then
            begin
              liView.Memo.Text := Format('[%s.%s."%s"]', [liDataSet.Owner.Name, liDataSet.Name, liFooter.FieldName]);
              THackFormReport(aFormReport).SetMemoViewFormat(TRMMemoView(liView), liDataSet.FieldByName(liFooter.FieldName));
            end;
          end;
        fvtCount:
          begin
            liView := RMCreateObject(gtCalcMemo, '');
            TRMCalcMemoView(liView).ResetAfterPrint := True;
            TRMCalcMemoView(liView).CalcType := rmdcCount;
          end;
      else
        liView := RMCreateObject(gtMemo, '');
        liView.Memo.Text := liFooter.Value;
      end;
    end
    else
      liView := RMCreateObject(gtMemo, '');

    liView.CreateUniqueName;
    liView.x := liNextX;
    liView.y := liNexty;
    liView.dx := THackGrid(FDBGridEh).Columns[aIndex].Width + 1;
    liView.dy := THackGrid(FDBGridEh).DefaultRowHeight + 4;
    TRMMemoView(liView).PLayout := rmtlCenter;
    if liFooter <> nil then
    begin
      aFormReport.AssignFont(TRMMemoView(liView), liFooter.Font);
      case liFooter.Alignment of
        taLeftJustify: TRMMemoView(liView).PAlignment := rmtaLeftJustify;
        taRightJustify: TRMMemoView(liView).PAlignment := rmtaRightJustify;
        taCenter: TRMMemoView(liView).PAlignment := rmtaCenterJustify;
      end;
    end
    else
    begin
      aFormReport.AssignFont(TRMMemoView(liView), THackGrid(FDBGridEh).Columns[aIndex].Font);
      case THackGrid(FDBGridEh).Columns[aIndex].Alignment of
        taLeftJustify: TRMMemoView(liView).PAlignment := rmtaLeftJustify;
        taRightJustify: TRMMemoView(liView).PAlignment := rmtaRightJustify;
        taCenter: TRMMemoView(liView).PAlignment := rmtaCenterJustify;
      end;
    end;

    if (rmgoGridLines in aFormReport.ReportOptions) and (dgColLines in THackGrid(FDBGridEh).Options) then
      liView.Prop['FrameTyp'] := $F
    else
      liView.Prop['FrameTyp'] := 0;
    liPage.Objects.Add(liView);
    aFormReport.GroupFooterViews.Add(liView);
    liNextX := liNextX + THackGrid(FDBGridEh).Columns[aIndex].Width + 1;
  end;

  procedure DrawFixedColDetail;
  var
    i: Integer;
  begin
    for i := 0 to FFormReport.GridFixedCols - 1 do
    begin
      if not THackGrid(FDBGridEh).Columns[i].Visible then Continue;
      if i < THackGrid(FDBGridEh).Columns.Count then MakeOneDetail(i);
    end;
  end;

  procedure DrawFixedColFooter(aRow: Integer);
  var
    j: Integer;
  begin
    for j := 0 to FFormReport.GridFixedCols - 1 do
    begin
      if not THackGrid(FDBGridEh).Columns[j].Visible then Continue;

      if j < THackGrid(FDBGridEh).Columns.Count then
        MakeOneFooter(aRow, j);
    end;
  end;

begin
  FFormReport := aFormReport;
  FDBGridEh := TCustomDBGridEh(Control);
  if not Assigned(FDBGridEh) or not Assigned(THackGrid(FDBGridEh).DataSource) or
    not Assigned(THackGrid(FDBGridEh).DataSource.DataSet) then Exit;
//    or not FDBGridEh.DataSource.DataSet.Active then Exit;

  liDataSet := THackGrid(FDBGridEh).DataSource.DataSet;
  if (rmgoSelectedRecordsOnly in aFormReport.ReportOptions) and
    (THackGrid(FDBGridEh).SelectedRows.Count > 0) then //只打印選擇的記錄
  begin
    AutoFree := False;
    aFormReport.Report.OnBeforePrintBand := OnBeforePrintBandEvent;
  end;

  FPage := aFormReport.Report.Pages[0];
  aFormReport.DrawOnPageFooter := TRUE;
  aFormReport.GridTop := THackFormReport(aFormReport).OffsY + Control.Top;
  aFormReport.GridHeight := Control.Height;
//  liNextY := Control.Top + THackFormReport(aFormReport).OffsY;
  aFormReport.ReportDataSet.DataSource := THackGrid(FDBGridEh).DataSource;
  FPrintDoubleFrame := (rmgoDoubleFrame in aFormReport.ReportOptions) and
    (THackGrid(FDBGridEh).FooterRowCount = 0);

  liLeftx := 0;
  for i := 0 to THackGrid(FDBGridEh).Columns.Count - 1 do
  begin
    if THackGrid(FDBGridEh).Columns[i].Visible then
      liLeftx := liLeftX + THackGrid(FDBGridEh).Columns[i].Width + 1;
  end;

  if (aFormReport.PrintControl = Control) or (liLeftx > StrToInt(THackFormReport(aFormReport).FormWidth[0])) then
    THackFormReport(aFormReport).FormWidth[0] := IntToStr(liLeftx + (THackFormReport(aFormReport).OffsX + Control.Left) * 2);

//表頭
  liNextX := Control.Left + THackFormReport(aFormReport).OffsX;
  if dgTitles in THackGrid(FDBGridEh).Options then
  begin
    if FDBGridEh.UseMultiTitle then
      PrintMultiTitle
    else
      PrintSimpleTitle;
  end;

// 表體
  liNum := 0; liPageNo := 0;
  liPage := Page; tmpx0 := lINextX;
  liFlagFirstColumn := True;
  for i := 0 to THackGrid(FDBGridEh).Columns.Count - 1 do
  begin
    if not THackGrid(FDBGridEh).Columns[i].Visible then Continue;

    if (FFormReport.ScaleMode.ScaleMode <> rmsmFit) or (not FFormReport.ScaleMode.FitPageWidth) then
    begin
      if (liNum > 0) and (THackFormReport(FFormReport).CalcWidth(liNextX + (THackGrid(FDBGridEh).Columns[i].Width + 1)) > THackFormReport(FFormReport).PageWidth) then // 超寬
      begin
        liNum := 0;
        liFlagFirstColumn := True;
        if FPrintDoubleFrame then
          liView.RightFrame.Width := 2;

        THackFormReport(FFormReport).FormWidth[liPageNo] := IntToStr(liNextX);
        Inc(liPageNo);
        if liPageNo >= FFormReport.Report.Pages.Count then
        begin
          THackFormReport(FFormReport).AddPage;
          THackFormReport(FFormReport).FormWidth.Add('0');
        end;
        liPage := FFormReport.Report.Pages[liPageNo];
        liNextX := tmpx0;
        liFlagFirstColumn := True;
        DrawFixedColDetail;
      end;
    end;

    MakeOneDetail(i);
    Inc(liNum);
  end;

  if liNum > 0 then
  begin
    liFlagFirstColumn := True;
    if FPrintDoubleFrame then
      liView.RightFrame.Width := 2;
  end;

  if FFormReport.Report.Pages.Count > 1 then
    THackFormReport(FFormReport).FormWidth[liPageNo] := IntToStr(liNextX);

  // 統計
  if THackGrid(FDBGridEh).FooterRowCount > 0 then // Footer Row
  begin
    liNextY := 0;
    for i := 0 to THackGrid(FDBGridEh).FooterRowCount - 1 do
    begin
      liPage := Page; liNum := 0; liPageNo := 0;
      liNextX := Control.Left + THackFormReport(aFormReport).OffsX;
      for j := 0 to THackGrid(FDBGridEh).Columns.Count - 1 do // 表體
      begin
        if not THackGrid(FDBGridEh).Columns[j].Visible then Continue;

        if (FFormReport.ScaleMode.ScaleMode <> rmsmFit) or (not FFormReport.ScaleMode.FitPageWidth) then
        begin
          if (liNum > 0) and (THackFormReport(FFormReport).CalcWidth(liNextX + (THackGrid(FDBGridEh).Columns[j].Width + 1)) > THackFormReport(FFormReport).PageWidth) then // 超寬
          begin
            liNum := 0;
            Inc(liPageNo);
            liPage := FFormReport.Report.Pages[liPageNo];
            liNextX := tmpx0;
            DrawFixedColFooter(i);
          end;
        end;

        MakeOneFooter(i, j);
        Inc(liNum);
      end; // end for
      liNextY := liNextY + THackGrid(FDBGridEh).DefaultRowHeight + 4;
    end;
  end;
end;

initialization
  RMRegisterFormReportControl(TCustomDBGridEh, TRMPrintEHGrid);
  RMRegisterFormReportControl(TDBGridEh, TRMPrintEHGrid);
{$ENDIF}
end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人中文字幕电影| 欧美精品在线一区二区| 日日摸夜夜添夜夜添国产精品| 日韩欧美自拍偷拍| 91亚洲男人天堂| 狠狠色丁香九九婷婷综合五月| 国产精品传媒入口麻豆| 制服丝袜亚洲网站| 一本到一区二区三区| 国产一区二区三区在线观看免费视频| 亚洲精品视频一区二区| 国产午夜亚洲精品午夜鲁丝片| 欧美理论在线播放| 91香蕉视频mp4| 国产不卡视频一区| 麻豆中文一区二区| 亚洲国产成人av| 亚洲精品一二三| 亚洲欧洲日韩在线| 国产日韩精品视频一区| 日韩欧美二区三区| 3d动漫精品啪啪一区二区竹菊| 99国产精品久久久久久久久久 | 五月天亚洲精品| 亚洲人一二三区| 中文子幕无线码一区tr| 精品处破学生在线二十三| 欧美日韩免费视频| 在线观看免费亚洲| 色综合久久99| 99精品久久免费看蜜臀剧情介绍| 国产成人av电影| 国产乱人伦偷精品视频免下载| 日本一区中文字幕| 免费成人av在线播放| 午夜精品免费在线观看| 亚洲自拍偷拍av| 一区二区三区免费| 一区二区三区欧美视频| 亚洲色图欧美激情| 亚洲你懂的在线视频| 亚洲婷婷综合色高清在线| 国产精品福利av| 中文字幕一区二区三区视频| 中文字幕一区二区在线播放| 国产精品国产自产拍高清av| 中文av一区二区| 中文字幕一区二区三区四区不卡| 国产精品视频一二三| 中文字幕一区二区三区乱码在线| 中文字幕一区二区三区在线不卡 | 亚洲乱码日产精品bd| 亚洲日本中文字幕区| 亚洲欧美日韩在线不卡| 亚洲国产欧美日韩另类综合| 亚洲高清免费视频| 日本欧美一区二区三区乱码| 日韩精品欧美精品| 久久99国产精品麻豆| 国产综合色在线| 成人黄色小视频| 91免费版在线| 欧美男人的天堂一二区| 日韩欧美国产精品| 中文字幕欧美日本乱码一线二线| 亚洲欧洲www| 亚洲国产毛片aaaaa无费看| 久热成人在线视频| 国产成人丝袜美腿| 日本韩国一区二区三区| 欧美浪妇xxxx高跟鞋交| 精品国内二区三区| 国产精品成人在线观看 | 国产精品99久久久久久久女警| 成人午夜av影视| 欧美视频中文字幕| 日韩精品一区二区在线观看| 中文一区在线播放| 日韩一区精品视频| 国产99久久久久久免费看农村| 一本久久精品一区二区| 欧美一区三区四区| 国产精品三级av在线播放| 亚洲成人精品一区| 国产福利精品一区| 欧美日韩亚洲综合| 国产欧美一区二区精品性色| 亚洲精品大片www| 国产一区二区三区美女| 99久久精品国产精品久久| 欧美一区二区私人影院日本| 国产日韩亚洲欧美综合| 亚洲成人免费观看| av电影一区二区| 日韩一级免费一区| 亚洲精品国产a久久久久久| 毛片av一区二区| 欧美日韩免费一区二区三区| 国产精品午夜电影| 日本 国产 欧美色综合| 91免费视频观看| 久久久久久免费网| 日本中文一区二区三区| 色偷偷一区二区三区| 久久久久国色av免费看影院| 亚洲福利一二三区| www.av亚洲| 国产亚洲精品免费| 欧美a一区二区| 欧美最猛黑人xxxxx猛交| 日本一区二区三区dvd视频在线| 日本中文字幕一区二区有限公司| 色噜噜久久综合| 国产精品久久久久桃色tv| 精品一区二区国语对白| 欧美一区欧美二区| 香蕉久久一区二区不卡无毒影院| 精品蜜桃在线看| 亚洲不卡av一区二区三区| 91蝌蚪porny| 中文字幕日韩一区二区| 国产福利一区二区三区| 精品盗摄一区二区三区| 麻豆91小视频| 日韩一区二区中文字幕| 午夜激情综合网| 欧美日韩一区不卡| 亚洲亚洲精品在线观看| 91丝袜高跟美女视频| 亚洲人成在线播放网站岛国| 成人激情动漫在线观看| 欧美高清在线精品一区| 国产成人av一区| 国产亚洲成aⅴ人片在线观看 | 欧美色电影在线| 一二三区精品视频| 欧美性色黄大片手机版| 亚洲一区二区三区在线播放| 91浏览器打开| 亚洲午夜激情网站| 欧美日韩在线免费视频| 亚洲成人一区在线| 制服.丝袜.亚洲.另类.中文| 午夜伦理一区二区| 91精品国产乱码久久蜜臀| 日韩专区欧美专区| 日韩欧美国产成人一区二区| 精品一区二区三区影院在线午夜| 日韩欧美电影一二三| 国产主播一区二区三区| 久久精品噜噜噜成人av农村| 久久影视一区二区| 国产91精品精华液一区二区三区| 国产精品美女久久久久久久久 | 欧美一级搡bbbb搡bbbb| 久久精品国产精品亚洲综合| 久久久久久久综合色一本| 成人午夜大片免费观看| 亚洲欧美日韩中文播放| 337p亚洲精品色噜噜| 久久99国产精品成人| 国产精品美女久久久久aⅴ| 91免费视频观看| 日韩高清国产一区在线| 久久五月婷婷丁香社区| www.欧美色图| 亚洲1区2区3区视频| 日韩视频国产视频| 国产成人综合网站| 一区二区在线观看不卡| 欧美日本乱大交xxxxx| 激情久久五月天| 中文字幕在线一区二区三区| 欧美午夜不卡视频| 国内精品免费**视频| 1区2区3区欧美| 91精品国产品国语在线不卡| 国产成人午夜电影网| 亚洲香蕉伊在人在线观| 26uuu久久天堂性欧美| 91丨porny丨蝌蚪视频| 日韩高清不卡一区| 欧美国产一区二区| 欧美日韩国产a| 成人性色生活片| 天堂成人国产精品一区| 国产亚洲欧洲997久久综合| 欧美性受极品xxxx喷水| 国产一区二区三区黄视频 | 久久精品国产亚洲aⅴ| 亚洲区小说区图片区qvod| 欧美一区二区三区在线| 成人精品小蝌蚪| 美国欧美日韩国产在线播放| 亚洲色欲色欲www在线观看| 精品国产一区二区三区不卡| 欧美午夜精品免费| 成人高清伦理免费影院在线观看| 日韩成人一区二区| 一区二区三区小说|