I could use some help with creating a report. I have the report setup to work on a single "built-in" file, but I want the code to point to the Selected files area in the report generator. Any help is appreciated as I don't know SQL.
@[RevisionDataOfSelectedFiles]
§Name [RevisionData of the selected files]
§Company [SolidWorks]
§Description
[This query will list the revision data of the selected files.]
§Version [1.0]
§Arguments
[
]
§Sql
[
SELECT TOP (1) Documents.DocumentID , Documents.Filename, Documents.LatestRevisionNo AS 'LatestVersion', UserRevs.RevNr AS 'RevisionVersion', UserRevs.Comment AS 'Revision'
FROM Documents INNER JOIN
UserRevs ON Documents.DocumentID = UserRevs.DocumentID
WHERE (Documents.Filename LIKE '%9200-004141%')
ORDER BY UserRevs.RevNr DESC
]
Hi Greg -
You will want to use an argument - look at the online help :
2016 SOLIDWORKS PDM Help - Report Query Arguments
If you look at the sample file provided (Report Examples 1.crp)
Usually found in: C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS PDM
you can see how arguments are used.
Regards,
Joy