Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how can i perform ordered numbering of hierarchical data in SSRS 2005 Reporting ???? Expand / Collapse
Author
Message
Posted Friday, August 7, 2009 1:32 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, July 23, 2010 5:02 AM
Points: 43, Visits: 52
well i ve hierarchical data of some categories. and i wanted to render it in the following format in SSRS 2005 reporting


1 Cat-A
1.1 cat-A1
1.2 cat-A2
1.2.1 cat-A121
1.2.2 cat-A122
1.3 cat-A3
2 Cat-B
.
.
.
.
.
And so on

i m able to pad the items as per desire but unable to give them numbering like 1,1.1,1.1.1,.....

one way to do this is to make this numbering in my dataset query. but for this i got to use cursor and so on which is bit resource intensive. is SSRS 2005 have some power to get the job done of this numbering.
anticipatory thnx and little urgent plz

Post #766727
Posted Friday, August 7, 2009 3:03 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, November 13, 2012 5:18 AM
Points: 37, Visits: 166
Hi,
if Cat-A,Cat-A1,Cat-A121 are 3 levels of grouping then rownumber can be used with the scope as the groupname .
not sure how to do it without grouping if it is supposed to do so. if the category name has the order no with it(A1,A2 etc.). then can't that itself be extracted and shown?

Thanks
Post #766769
Posted Friday, August 7, 2009 3:19 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, May 5, 2010 7:28 AM
Points: 289, Visits: 28
You need to Group by the categorynames and need to order by the categoryid
Post #766772
Posted Friday, August 7, 2009 3:19 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, May 5, 2010 7:28 AM
Points: 289, Visits: 28
You need to Group by the categorynames and need to order by the categoryid
Post #766773
Posted Tuesday, August 11, 2009 1:04 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, January 21, 2014 6:48 AM
Points: 626, Visits: 77
you can use it in the below fashion.

RowNumber("Group1") =1
RowNumber("Group1").RowNumber("Group2")= 1.1
RowNumber("Group1").RowNumber("Group2").RowNumber("Group3")=1.1.1
This will Iterate through all rows and provide you the hierarchical numbers.
Post #768395
Posted Wednesday, August 12, 2009 9:02 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, July 23, 2010 5:02 AM
Points: 43, Visits: 52
well guys thnx for ur concern but either i cud nt explain the problem or u guys thinking in wrong direction. first of all its a recursive tree dataset with unlimited nodes or undefined nodes at design time ofcourse. so i got to create a single group with catid as expression and ParentCat as its parent group expression so that this dataset can be presented in tree view mode with the help of padding on basis of Level() function

As far as numbering is concerned i ve deviced a way finally. though i ve not tested it yet i ll check it out tomorrow in my office. but psudo code is that i ve to use a function in report coding area which ll do all the working by reviewing the previous() built in function. after completing the task successfully by the grace of ALLAH i ll post the code.
but simply the idea is to device a function in report code area which ll take previous numbering value as parameter do the work and return the value for the current row. THATS ALL

thnx to all
regards
Hammad
Post #769379
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse