0
Good morning, everyone.
I am developing a system for employee registration that needs to generate the individual point sheets of each employee, for this I am using Reportviewer. In the body of the report, I inserted a tablix with several rows and columns in a similar way to a checkered sheet where I will draw the stitch sheet. All rows and columns are grouped in a single group, so that for each database record a group will be generated, that is, a report page.
My question is: I need to number 31 lines referring to the days of the month and I would like to know if there is a formula in Reportviewer that does this line count within a group similar to Excel’s Row() function. I tried the function Rownumber("Group name"), but this function only returns the value 1, which refers to the only record that will be in each group and consequently in each page.
If the problem was just to number the days a single time, I could do it manually, but I need to insert expressions that returned the name of the day of the week based on the day of the month, which would be extremely laborious in future maintenance.
Example of the function I will use in at least 4 fields/line to display the day of the week if it is Saturday or Sunday:
=iif(Weekday(DateAdd("d", NúmeroDaLinha, Parameters!Competência.Value), FirstDayOfWeek.Sunday) <> 1, "", WeekdayName(Weekday(DateAdd("d", NúmeroDaLinha, Parameters!Competência.Value),0)))
Where NúmeroDaLinha
is the line number within the group - the number of lines with employee data and Parameters!Competência.Value
is the date of the first day of the month.