Perforce 2003.2 P4Report User's Guide
<< Previous Chapter
P4Report Functions
Table of Contents
Index
Perforce on the Web
Next Chapter >>
Index

Appendix C
Sample Crystal Report Queries

The following table lists the SQL used in the sample compiled Crystal Reports included with P4Report. Note that some of the SQL uses ODBC-specific syntax.

Report Description
SQL

ChangesByMonth

SELECT changes."change", changes."date", changes."description"

FROM "changes" changes

ChangesByUser

SELECT changes."change", changes."date", changes."user", changes."client", changes."description"

FROM "changes" changes

ORDER BY changes."user" ASC, changes."change" DESC

ChangesPerMonth

SELECT changes."change", changes."date", changes."description"

FROM "changes" changes

ClientsByUser

SELECT clients."client", clients."owner", clients."root", clients."description"

FROM "clients" clients

ORDER BY clients."owner" ASC

ClientsNotUsed

SELECT clients."client", clients."owner", clients."accessed", clients."description"

FROM "clients" clients

WHERE timestampdiff(8, clients."accessed", now()) > 1

ORDER BY clients."owner" ASC

JobChanges

SELECT fixes."job", changes."change", changes."date", changes."user", changes."description"

FROM { oj "fixes" fixes

INNER JOIN "changes" changes

ON fixes."change" = changes."change"}

ModsPastWeek

SELECT files."file", files."time"

FROM "files" files

WHERE timestampdiff(5, files."time", now()) < 1

ORDER BY 2

MostChangedFiles

SELECT files."file"

FROM "files" files

ORDER BY files."file" ASC

OpenedFilesByUser

SELECT opened."clientfile", opened."revision", opened."action", opened."change", opened."type", opened."user"

FROM "opened" opened

ORDER BY opened."user" ASC


Perforce 2003.2 P4Report User's Guide
<< Previous Chapter
P4Report Functions
Table of Contents
Index
Perforce on the Web
Next Chapter >>
Index
Please send comments and questions about this manual to manual@perforce.com.
Copyright 2002-2003 Perforce Software. All rights reserved.
Last updated: 12/12/03