Serial number in ssrs

Hi...

In my report i used serial no but it is now coming 1 2 3 like this it showing 1 4 6 like this.

may i know what is the reason behind that please help me

June 28th, 2012 2:44pm

Hi,

How you are generating the serial numbers?

Hope you are using Row_Number() or Row_Number("DataSet name") or Row_Number("Table name"). If not try using this. Do you have some expression for hidden

Free Windows Admin Tool Kit Click here and download it now
June 28th, 2012 3:33pm

Try this one

=RowNumber("tablename")

June 28th, 2012 3:46pm

Ya i tried that but its showing error

=RowNumber("tablename")

Example :

=RowNumber("emp")

i used like this means its shows error like this

Free Windows Admin Tool Kit Click here and download it now
June 28th, 2012 4:15pm

Unfortunatly not able to read your error
June 28th, 2012 4:17pm

k

the error is "the scope parameter must be set to a string constant that is equal to either the name of a containing group ,the name of a containing data region, or the name of a dataset"

Free Windows Admin Tool Kit Click here and download it now
June 28th, 2012 4:21pm

Hi,

Try this expression : RowNumber("<dataset name>")

e.g.

RowNumber("Dataset1")

June 28th, 2012 4:42pm

ya i tried but its not working.
Free Windows Admin Tool Kit Click here and download it now
June 29th, 2012 7:07am

Hi There

Thanks for your Posting. You need to make sure that data set name or tablix name is case sensitive in SSRS so please put the exact case as well

Can you please share your expression as well as you design view

If you have any questions please do ask.

Many thanks

Syed Qazafi Anjum

Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.

June 29th, 2012 7:11am

Hi...

I used same dataset but its not giving serial number for me its giving  like this 4 ,7 ,21

Free Windows Admin Tool Kit Click here and download it now
June 29th, 2012 8:48am

Hi There

Thanks for your posting. I think you might be putting this expression in your group that is why it is giving you this number which mean that there are four three, and 14 details rows inside your group,

Please have a look you need to put this expression inside your details row not inside your group row

I hope this will help

If you have any question please do ask

Many thanks

Syed Qazafi Anjum



June 29th, 2012 9:20am

i tried by giving that expresion out side its giving only one number
Free Windows Admin Tool Kit Click here and download it now
June 29th, 2012 9:28am

Hi There

I would suggest you please share your design mode of tablix as well as group and where you are putting your expression, it will help us to identify the issue. Did you have a look on the screenshot i have put above

I hope this will help

If you have any question please do ask

Many thanks

Syed Qazafi Anjum

June 29th, 2012 9:33am

Hi There

Thanks for your posting.

Please try this. Open the report properties (right click on blank area outside the layout and click properties) or (Menu-->Report-->Report Properties)

 Click on the code pane on the left

 In the code window enter below script

dim Counter as integer=0

Public function getCounter() as Integer

 Counter=Counter+1

 return Counter

end function

dim Counter as integer=0
Public function getCounter() as Integer
 Counter=Counter+1
 return Counter
end function

 Go to the properties of the group (based on which group you need the group serial number)

 Click the variables tab on the left

 Click on Add and set Name as GroupCountValue and set the expression (in the expression window) as

=Code.getCounter, click ok and close the window.

 Now in the textbox where you want to display the Serial number, set the expression as

=Variables!GroupCountValue.Value

 Run the report and observe the result

I hope this will help

If you have any question please do ask

Many thanks

Syed Qazafi Anjum

Free Windows Admin Tool Kit Click here and download it now
June 29th, 2012 10:07am

Hi need Sr. Np. under group

like

Group name A:

1

2

3

Group B:

1

2

3

4

beacus above code its take same number and repeat same number under group.

May 9th, 2013 1:38pm

Hello,

May be your problem have solved but any how you can use this expression in the text box.

=rownumber("Group1")

NB: Group name by default Group1 but if you have changed it then you need to check it like that:

Right click on group -> Textbox property -> then in the name field you can see the name of your group.

It will display serial number like that:

Group1

1

2

3

Group2

1

2

3

4

Free Windows Admin Tool Kit Click here and download it now
August 13th, 2013 2:23pm

Thanks a lot, this is the best and easy to apply solution.
August 5th, 2014 2:43am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics