为什么报告的第二条记录会转到下一页?

问题描述 投票:0回答:1

我在我的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;

enter image description here

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

delphi report delphi-2007 fastreport
1个回答
1
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.