【问题标题】:Why the second record of the report goes to the next page?为什么报告的第二条记录转到下一页?
【发布时间】:2019-02-16 01:59:26
【问题描述】:

我在我的 FastReport 报表中打印两个列表,每个 TfrxMasterData 中一个,问题是当查询返回多个记录时,这条新记录插入到新页面中,它需要出现在同一页面上,一个在另一个下面。

报告 OnGetValue 过程

   procedure TfrmBoletimGeralImpressao.frpExemploGetValue(const VarName: string;
      var Value: Variant);
    begin

      if CompareText(VarName, 'element') = 0 then
      begin
        Value := listaDisciplinas[StringDs.RecNo];
      end;

      if CompareText(VarName, 'element2') = 0 then
      begin
        Value := listaNotas[StringDs.RecNo];
      end;
     end;

这是代码的一部分,我想为每个学生打印他所做的测试结果

  for t := 0 to listaSimulados.Count - 1 do
      begin
        if SimuladoIDAtual = TSimuladoDto(listaSimulados.Items[t]).simuladoID
          then
        begin
          igual := true;
          simuladoAluno := TSimuladoAlunoNotasDto.create;
          simulado := TSimuladoDto(listaSimulados.Items[t]);
          getAluno(AlunoID);
          simuladoAluno.simuladoID := SimuladoIDAtual;
          simuladoAluno.alunoID := AlunoID;
          loadDisciplinasDoSimulado(SimuladoIDAtual);
          StringDs.RangeEnd := reCount;
          StringDs.RangeEndCount := simuladoAluno.listaDisciplinas.Count;
          getReport.PrepareReport(false);
          dtmGlobal.qry1.next;
          SimuladoIDAtual := dtmGlobal.qry1.FieldByName('SimuladoID').AsInteger;
        end;
      end;
      dtmGlobal.qry1.next;
    end;
  end;
  getReport.ShowPreparedReport;
end;

当查询返回两个或更多测试时,每个测试都会出现在报告表上,我需要它保持一个低于另一个。

【问题讨论】:

    标签: delphi report delphi-2007 fastreport


    【解决方案1】:

    检查Header1Master1StartNewPage 属性,其中一个可能被检查为True

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-27
      • 1970-01-01
      • 2010-12-19
      • 1970-01-01
      相关资源
      最近更新 更多