Showing posts with label reset. Show all posts
Showing posts with label reset. Show all posts

Friday, March 30, 2012

RowNumber reset at start of each grouping

I'm creating a report where I'd like to list out the lines of the report. I
deceided to use RowNumber function but it is keeping a running total when I
use it like this: RowNumber(Nothing)
I used the report wizard to create a report and used the page grouping to
seperate pages by "team". How do I find the scope to tell RowNumber to
startover for each team?
ColinYou can set the scope of RowNumber by replacing Nothing with the name of the
group where you want the reset to occur. If your group name is Team then you
would use RowNumber("Team").
"Colin" wrote:
> I'm creating a report where I'd like to list out the lines of the report. I
> deceided to use RowNumber function but it is keeping a running total when I
> use it like this: RowNumber(Nothing)
> I used the report wizard to create a report and used the page grouping to
> seperate pages by "team". How do I find the scope to tell RowNumber to
> startover for each team?
> Colin
>
>sql

Wednesday, March 21, 2012

Row Number within the Current Page

Is there an expression that can be placed in text box, within a table, that
generates a sequential number which gets reset on every page?
Assuming that the report was 2 pages long.
Page 1
Seq# Description
1 line one
2 line two
...
Page 2
Seq# Description
1 Line one on page two
2 Line two on page twoOn Mar 6, 12:48 pm, Fidencio <Fiden...@.discussions.microsoft.com>
wrote:
> Is there an expression that can be placed in text box, within a table, that
> generates a sequential number which gets reset on every page?
> Assuming that the report was 2 pages long.
> Page 1
> Seq# Description
> 1 line one
> 2 line two
> ...
> Page 2
> Seq# Description
> 1 Line one on page two
> 2 Line two on page two
As far as I know there is not, outside of the RowNumber("tableName")
option, which does not reset per page. You might implement this easier
in the stored procedure or report query that sources the report. Sorry
that I could not be of further assistance.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||Thank you Enrique for the response.
I will come up with an alternative.|||This resetting of the no works with groups so what you can do is to give a
group expression something like this..=Int((RowNumber(Nothing)-1)/20)
this infact breaks every 20 rows and goes to next page. so you can vary this
no as per your requirements and at the same time your no will get reset due
to group expression.
Amarnath, MCTS
"Fidencio" wrote:
> Is there an expression that can be placed in text box, within a table, that
> generates a sequential number which gets reset on every page?
> Assuming that the report was 2 pages long.
> Page 1
> Seq# Description
> 1 line one
> 2 line two
> ...
> Page 2
> Seq# Description
> 1 Line one on page two
> 2 Line two on page two