Incremental Number in textbox header

ilm 21 Reputation points
2022-10-01T15:05:55.577+00:00

Hi! I just started on SSRS. I've tried and searched but I can't. I have this report from dataset1, I need the Header to contain 3 textbox with incremental numbers, where the first must be a field of dataset1. Thank you very much in advance.

246671-ficha2.jpg

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,061 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2022-10-04T09:02:22.853+00:00

    Hi @ilm
    If you want to implement a number increment in the header, then I think you can use the built-in field "PageNumber" to increase the number by increasing the number of pages.
    I have added 3 textboxes in the header with their expressions set to:

    textbox1: =First(Fields!MATCHESPRIMARY.Value, "DataSet1")+3*(Globals!PageNumber-1)  
    textbox2: =First(Fields!MATCHESPRIMARY.Value, "DataSet1")+3*(Globals!PageNumber-1)+1  
    textbox3: =First(Fields!MATCHESPRIMARY.Value, "DataSet1")+3*(Globals!PageNumber-1)+2  
    

    Preview:
    247288-5.png
    247351-6.png
    Best regards,
    Aniya


2 additional answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,631 Reputation points
    2022-10-03T09:38:16.4+00:00

    Hi @ilm ,
    Are you referring to using increments in the page header? As far as I know, this is hard to achieve.
    Even though you can set the content of the header textbox to a different value on each page via built-in expressions, you can also get the first value of a field in the dataset, and get three textboxes with incremental number in the first page. But you can't use the IIF function, combining variables and report items to get the incremental number for the second page.
    Best Regards,
    Joy


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. ilm 21 Reputation points
    2022-10-03T17:31:12.39+00:00

    Hi i'm already try this folowing some Answers in another questions, but doenst work. What i need is incremental number text box in page header, doesn't need exactly the first number to come from the dataset, can be from a variable, but i need to set this variable for a starter number, example where variable starts in 53:
    Page1 textbox1 = 53 , textbox2 = 54, textbox3 = 55,
    Page2 textbox1 = 56 , textbox2 = 57, textbox3 = 58, etc...
    Thank you for your answer!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.