.net Crystal Reports - 如何抑制组第一页上的页眉?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3199339/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Crystal Reports - How to suppress a page header on the first page of a group?
提问by Brian Webster
I have a report where each group is about 5-7 pages long.
我有一份报告,其中每组大约有 5-7 页长。
I need to suppress the page header on the first page of each group
我需要抑制每组第一页上的页眉
How can I do this?
我怎样才能做到这一点?
回答by PowerUser
Mark Bannister's suggestion is a good way to go. If you're looking for a step-by-step, here is my $0.02:
马克班尼斯特的建议是一个很好的方法。如果您正在寻找分步指南,这是我的 0.02 美元:
Open your section expert(right click on some white space, you should see it come up).
Go to the options for the group footerand turn on reset page numbers after. You should see the page numbers reset at the beginning of each report.
Also in the section expert, go to the options for the page headerand click on the blue button next to the Suppress (No Drill-Down)option.
In the Formula Editor, enter PageNumber=1
打开您的部分专家(右键单击一些空白区域,您应该会看到它出现)。
转到组页脚的选项并在之后打开重置页码。您应该会在每个报告的开头看到重置的页码。
同样在“专家”部分,转到页面标题的选项,然后单击“抑制(无钻取)”选项旁边的蓝色按钮。
在公式编辑器中,输入PageNumber=1
回答by Brian Webster
If you have reset the page number to 1 on change of group (as mentioned in your other question), then enter the formula
如果您在更改组时将页码重置为 1(如您的另一个问题中所述),则输入公式
PageNumber=1
in the "Suppress (No Drill-Down)" formula option in the Section Expert for the Group Header section, in the Crystal Reports Designer.
在 Crystal Reports 设计器中“组头”部分的“部分专家”中的“抑制(无钻取)”公式选项中。
回答by DJSampat
To hide the header for pages that are not page 1, you would change the Formula Editor, enter PageNumber > 1
要隐藏不是第 1 页的页面的页眉,您需要更改公式编辑器,输入 PageNumber > 1
回答by DJSampat
Place the following code to your Crystal Report Designer. Use the same code for your page footer.
将以下代码放置到您的 Crystal 报表设计器中。对页面页脚使用相同的代码。
'--------for Header--------------------------------------------------
Private Sub rptPageHeader_Format(ByVal pFormattingInfo As Object)
If PageNum.Value = 1 Then
rptPageHeader.Suppress = True
Else
rptPageHeader.Suppress = False
End If
End Sub
'-------------------------------------------------------------------

