我在我的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;
检查StartNewPage
或Header1
的Master1
属性其中一个可能被检查为True