我需要生成一份报告,汇总上传到文档库的文件数量,包括各个版本。
例如,如果我有一个文档库,其中包含 20 个唯一文档,其中只有两个项目具有多个版本(假设每个项目有两个版本),我希望能够返回一份报告,表明已经有 22 个上传。
使用内置的 MOSS 2007 工具可以实现这一点吗?我必须直接查询数据库吗?
提前致谢
I need to generate a report that sums the number of files uploaded to a document library, including individual versions.
For example, if I have a document library that contains 20 unique documents, with only two items having more than one version (say two versions each), I'd like to be able to return a report that indicates that there have been 22 uploads.
Is this possible using the built-in MOSS 2007 tools? Do I have to query the database directly?
Thanks in advance
发布评论
评论(1)
您无法直接查询数据库。不支持它。
这可以通过审计报告来实现。在库上启用审核,然后您可以在共享点对象模型中查询审核。
项目级审计的代码示例:
http://www .microsoft.com/downloads/en/details.aspx?FamilyID=0e4dd1e7-4b1d-4cb1-b906-6d5d272c8e9d&displaylang=en
启用审核:
http://www.shareesblog.com/?p=195
You cannot query the database directly. Its not supported.
This is possible using Audit reports. Enable Auditing on library and then you can query the Auditing in sharepoint object model.
Code sample on Item level auditing:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0e4dd1e7-4b1d-4cb1-b906-6d5d272c8e9d&displaylang=en
Enable Auditing:
http://www.shareesblog.com/?p=195