How to give page break in SSRS

2019-08-16 23:01发布

I am making a very simple report in SSRS. I am trying to do the following:

On page 1 display following text

THIS IS PAGE 1

On page 2 display following text

THIS IS PAGE 2

I added "Text" field in my report in which I have set the value field to "THIS IS PAGE 1". But I can't find any option to add page break after it. How do I give page break?

1条回答
Fickle 薄情
2楼-- · 2019-08-16 23:49

I am not sure what is the purpose of having Page Break for you without any content.. but still i tried by adding a table on a report with one column and hide that and it works

Step 1

Create a DataSet with query (commandtext)

 Select 'A' AS GRP
 UNION
 Select 'B' AS GRP

Step 2

Insert a table & set DataSetName as created in step1

Step 3

Click on Table Group & press F4 to Set Page Break Properties value, Set BreakLocation to Between & PageName to =Fields!GRP.Value (See screenshot for your Ref)

enter image description here Step 4 From above Step you will see report break into 2 page as there are 2 records from query step 1.. Now next step is to Display Page Number for the insert PageHeader

Step 5

Insert Page Header with textbox expression value as

 ="THIS IS PAGE " &  CSTR(Globals!PageNumber)

Last but not least, Hide unexpected table columns (TextBox) as you just want to display Page Number or Page Header

Output of the report will be like

enter image description here

查看更多
登录 后发表回答