【发布时间】: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