Crystal Report 11的详细信息部分中的默认行数 [英] Default No.of Rows in Details Section of the Crystal Report 11

查看:78
本文介绍了Crystal Report 11的详细信息部分中的默认行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



i有水晶报告,只是我设计了报告但尚未与数据库连接。



连接到数据库之前。我想在报告的详细信息部分显示固定的no.of行。



Hi guys,

i have crystal report, just i have designed the report but not yet connected with the database.

Before connecting to the data base. I want to display fixed no.of lines in Details section of the report.

For Maximum no.of records, i have done in: 
Details Section -> Section Expert -> Paging tab. [here its ok].
it will effect after connecting n fetching the value from the data base.





但是,如果表只有5到10条记录,或多或少,要求是显示,默认最大数量的行数应为20.



任何人都可以请帮帮我...... br />


谢谢



But, if the table had only 5 to 10 records, more or less, the requirement is to display, default maximum no.of lines should be 20.

Can any one please, help me...

Thanks

推荐答案

要限制每页的记录数,需要创建两个创建的公式每页的运行总计。



1st Formula:HeaderReset - 此公式应放在报告的页眉中。当报表处理到下一页时,它将重置计数器。计数器是一个变量,用于在报告处理每条记录时存储数字。



WhilePrintingRecords;

NumberVar计数器:= 0



第二个公式: CountDetails - 此公式应放在Details部分中。它会计算每条记录并递增1。



WhilePrintingRecords;

NumberVar计数器;

counter:=计数器+ 1



您现在需要使用CountDetails公式根据必要的记录数强制新页面。要做到这一点:

bullet



转到格式/部分并选择详细信息部分。

bullet



点击New Page After选项右侧的X + 2按钮。请务必不要在新页面后框中选中。单击该按钮后,您将进入公式编辑器。输入以下公式:

{@CountDetails} = 7

(输入每页所需的记录数)

bullet



当Crystal到达详细信息部分的第七条记录时,此条件将强制执行新页面。由于@HeaderReset公式,计数将在每个页面的开头重置为零。



如果您需要计算Group Header记录而不是Details部分,请按照上述说明进行详细信息部分,但将公式和条件放在Group Header中而不是详细信息部分。



要隐藏标题和详细信息部分中的公式字段,请右键单击该字段并转到格式化字体。将颜色更改为白色,您将无法看到它们。
To limit the number of records per page, you need to create two formulas that create a running total for each page.

1st Formula: HeaderReset - This formula should be placed in the page header of the report. It will reset the counter when the report is processed to the next page. Counter is a variable that stores the number as the report processes each record.

WhilePrintingRecords;
NumberVar counter:=0

2nd Formula: CountDetails - This formula should be placed in the Details section. It will count each record and increment by one.

WhilePrintingRecords;
NumberVar counter;
counter:=counter+1

You will now need to use the CountDetails formula to force the new page based on the necessary number of records. To do this:
bullet

Go to Format/Section and select the Details section.
bullet

Click on the X+2 button to the right of the "New Page After" option. Be sure not to place a check in the New Page After box. Once you click on the button, you will be placed in the formula editor. Enter the following formula:
{@CountDetails}=7
(enter the number of records you need on each page)
bullet

This condition will force a new page when Crystal reaches the seventh record in the details section. The count will reset to zero at the beginning of each page due to the @HeaderReset formula.

If you need to count the Group Header records instead of the Details section, follow the above instructions for the details section, but place the formula and condition in the Group Header section instead of the Details section.

To hide the formula fields in the header and details section, right click on the field and go to format font. Change the color to white and you will not be able to see them.


这篇关于Crystal Report 11的详细信息部分中的默认行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆