我用delphi5.0+paradox数据库开发了一个应用系统,打印用quickreport,使用了报表合并组件,但当上下两报表在同一页上时,下一报表的的标题不

  • 主题发起人 libaoliang
  • 开始时间
L

libaoliang

Unregistered / Unconfirmed
GUEST, unregistred user!
我用delphi5.0+paradox数据库开发了一个应用系统,打印用quickreport,使用了报表合并组件,但当上下两报表在同一页上时,下一报表的的标题不能被显示,请问如何解决?(100分)<br />我用delphi5.0+paradox数据库开发了一个应用系统,打印用quickreport,
使用了报表合并组件,但当上下两报表在同一页上时,下一报表的的标题和
报表标题不能被显示,而不同报表的标题是不一样的,不显示会造成不好理解,
请问如何解决?
 
是Composite reports column headers 么?
from www.qusoft.com diy fixes
Composite reports - column headers not printing.

To make column headers print correctly in composite
reports a small code change is required to file 'Quickrpt.pas'.
This fix is compatible as itdo
es not affect the interface.
1. Declare a new module-wide global -
var // AFTER the 'implementation'
GlobalCompositeFlag : boolean;
// Add this
cqrRulerMinorStyle : TPenStyle;
cqrRulerMajorStyle : TPenStyle;

2. In procedure TQRController.Execute, change a line -
// next line failed in composite mode when PageNumber > 1
// amend to this
if ((ParentReport.PageNumber <= 1) or GlobalCompositeFlag ) and { Print first column header }
(SelfCheck is TCustomQuickRep) then
begin
if (ParentReport.Bands.ColumnHeaderBand <> nil) and
(ParentReport.Bands.ColumnHeaderBand.Enabled) then
begin
ParentReport.PrintBand(ParentReport.Bands.ColumnHeaderBand);
ParentReport.NoForceNewPage := true;
end;
end;

3. In procedure TCustomQuickRep.CreateReport(CompositeReport : boolean)
add a line as shown -

..
..
Controller.Prepare;
PrepareComponents;
GlobalCompositeFlag := CompositeReport;
// Add this line
Execute;
if not CompositeReport then
begin
..
..

4. Rebuild.

 
三代坦克:
请用中文!
 
三代坦克:
1、 请用中文好不好!
2、我找不到 procedure TQRController.Execute 过程在哪里?
3、procedure TCustomQuickRep.CreateReport(CompositeReport : boolean)
add a line as shown - 该过程是自己创建的吗也找不到啊?
请再详细点,
回答了问题立即分,给分全给你!
 
我感到不用那么麻烦,
应该设置一下属性即可解决的,
另外,为何只有第三个子报表的列标题不正常,而第二个子报表就可以?

 
我从qusoft上抄过来的.你可以自己去看.
quickreport 3.0.8 的 procedure TQRController.Execute 在 quickrpt.pas
1507 行左右;
TCustomQuickRep.CreateReport 3897 行左右.
我不知道上文我翻译后你是否能看懂,所以我给你原文.
------------------------------------------------
Composite reports - column headers not printing.
>>Composite 报表 -列标题不能打印问题
To make column headers print correctly in composite
reports a small code change is required to file 'Quickrpt.pas'.
This fix is compatible as itdo
es not affect the interface.
>>只需要在文件quickrpt.pas中做一个小的改动,就能修正composite报表
的列标题不能打印的问题.这个修正不会影响接口.(也就是说,不会造成其他依赖
quickreport 的 包 不兼容错误,比如 tee.)
1. Declare a new module-wide global -
>>定义一个 新的 模块范围的全局变量
var // AFTER the 'implementation'
GlobalCompositeFlag : boolean;
// Add this
>>就是它
再往下我就不用翻译了吧?
cqrRulerMinorStyle : TPenStyle;
cqrRulerMajorStyle : TPenStyle;

2. In procedure TQRController.Execute, change a line -
// next line failed in composite mode when PageNumber > 1
// amend to this
if ((ParentReport.PageNumber <= 1) or GlobalCompositeFlag ) and { Print first column header }
(SelfCheck is TCustomQuickRep) then
begin
if (ParentReport.Bands.ColumnHeaderBand <> nil) and
(ParentReport.Bands.ColumnHeaderBand.Enabled) then
begin
ParentReport.PrintBand(ParentReport.Bands.ColumnHeaderBand);
ParentReport.NoForceNewPage := true;
end;
end;

3. In procedure TCustomQuickRep.CreateReport(CompositeReport : boolean)
add a line as shown -

..
..
Controller.Prepare;
PrepareComponents;
GlobalCompositeFlag := CompositeReport;
// Add this line
Execute;
if not CompositeReport then
begin
..
..

4. Rebuild.

希望对你有用.分 我不在意.
另外,我觉得如果想要在编程上有所发展的话,英语是基础.
 
三代坦克:
我查看了你的所有帖子,挺棒的!
关于合并报表第三个子报表列标题有时不能被显示的问题,
我以为应该有很方便的属性设置就能解决的,
那么麻烦就算了,当然如果有好的解决方法能解决我还是乐意接受的,
明天结贴!
 
以后有简洁的属性设置方法请告诉我:
liguigao@hotmail.com
 
顶部