Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Repport whit New document in folder end subfolder?
Marco_Capozzo_(sglcadmin35_-_(deleted))
I copy thi simple report:select * from dtree where ((createdate>%1) and subtype=144) and %2 and parentID= 71773 order by createdate desc%1=last week-end%2=filter permissionbut i find only the new document in a specific folder (ID=71773).I would want all new document in this folder and in all sub-foldeer?I have MS-SQL serverI would want all new document in this folder and in all sub-foldeer?Thanks
Find more posts tagged with
Comments
eLink User
Message from via eLinkYou have to use a stored proc to get this information.I use one like this.....You would have to make changes to include a datefilter. This can be called from LiveReports.CREATE PROCEDURE sp_GetAllChildren (
@DataID
int) ASDeclare
@Count
int Declare
@SQL
varChar(8000)set nocount on set
@Count
= 1 CREATE TABLE #Tmp ( ID int NOT NULL IDENTITY (1, 1), FolderLevel int NOT NULL, Name varChar(255), DataID int NOT NULL, ParentID int NOT NULL, ChildCount int, SubType int, DataSize int, Version int ) ON [PRIMARY] While
@Count
< 50 Begin Set
@SQL
= 'insert into #tmp select ' + cast(
@Count
asvarchar(50)) + ', Name, DataID, ParentID, childCount, subtype,IsNull(datasize,0), IsNull(version, 0) from dtree A with (nolock) left outerjoin dversdata B with (nolock) on A.dataID = B.DocID ' if
@Count
= 1 Set
@SQL
=
@SQL
+ 'where dataID = ' + Cast(
@DataIDas
varchar(50)) else Set
@SQL
=
@SQL
+ 'where ParentID in (select dataIDfrom #tmp where FolderLevel = ' + cast(
@Count-1
as varchar(50)) + ')' exec (
@RowCount
= 0 BREAK ELSE Set
@Count
=
@Count
+ 1 end select * from #tmp-----Original Message-----From: eLink Discussion: Livelink LiveReports Discussion[mailto:livereportsdiscussion@elinkkc.opentext.com]Sent: October 23, 2003 6:37 AMTo: eLink RecipientSubject: Repport whit New document in folder end subfolder?Repport whit New document in folder end subfolder?Posted by Capozzo, Marco on 10/23/2003 06:27 AMI copy thi simple report:select * from dtree where ((createdate>%1) and subtype=144) and %2 andparentID= 71773 order by createdate desc%1=last week-end%2=filter permissionbut i find only the new document in a specific folder (ID=71773).I would want all new document in this folder and in all sub-foldeer?I have MS-SQL serverI would want all new document in this folder and in all sub-foldeer?Thanks[To reply to this thread, use your normal e-mail reply function.]============================================================Discussion: Livelink LiveReports Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2249677&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exe
Len_Palmeri_(kmartadmin_-_(deleted))
If it was oracle you can use the START WITH parentid and CONNECT BY dataid=parentid clause to get all objects beneath a parent id. SQL Server - check for any equivalent the above statement