i have a database table which stores the categories like this
Id ParentId Name
1 0 catOne
2 0 catTwo
3 1 subCatOne
4 1 subCatTwo
5 2 subCatThree
the ones with parentId 0 are the root categories
and I have items table which is like
id categoryId name
1 3 myName
2 4 yourName
now I need to present a report like this
CatOne
subCatOne
myName
subCatTwo
yourName
CatTwo
subCatThree
i tried recursive subreporting, but the recusion goes on endlessly..
ISNT THERE ANY THING LIKE
IF (condition)
INCLUDE THIS SUBREPORT
ELSE
EXIT;