The report generator can be a very powerful tool provided we know how to wield it. It allows us to query the database for information without the use of SQL Management Studio. We’ve explored adding reports to the Report Generator, but we haven’t explored creating custom reports in SOLIDWORKS PDM.
Doing this requires a little bit of SQL knowledge and understanding of where to look for items in the SOLIDWORKS PDM Database; meaning, some of this knowledge can be taught, but, for example, the structure of the database and information you are looking for will likely only come through experience.
It is okay to play around and potentially make bad queries here because we won’t be changing any values in PDM. If we make a mistake, we can remove the bad query and then replace it with an altered/corrected version. The report generator inherently doesn’t support any T-SQL that would perform any changes to the database.
To create reports, we start with either an existing CRP file or a blank text file. In the case of a blank text file, we save it as a CRP extension and edit it with notepad.
Each query that we add to this file will follow a similar format.
Each of these items can be defined as variables on the execution to take an input. Each time we specify a type, we then give it a name, a count, and a prompt in that order. Counts can be a hard-coded value or the characters N, S, or M.
With all these notes on the separate clauses, there are also a few rules to follow when writing these reports.
If you’re struggling with basic knowledge of SQL, I recommend brushing up using W3 Schools. The tools and guides here can show a novice user how to start to put queries together.
Furthermore, if you are not quite sure where to get information from the PDM database, this will be a trickier question to answer. There are several examples of where to find certain pieces of information in the example reports. You can explore your own database (with lots of caution and recommended as a read-only user) to begin to understand the database structure using SQL Management Studio. Our blog contains several other examples of what can be retrieved (and how) through the report generator.
For information on sharing and using these reports please see our blog entry on using the report generator.
Managing SOLIDWORKS PDM Licenses
SOLIDWORKS PDM: Excel Document as a Form
Ultimate Guide to SOLIDWORKS PDM Permissions
SOLIDWORKS PDM Professional SQL Server Changes for 2022
About Bryce Hooper
Bryce has been using SOLIDWORKS since 2008 in multiple roles across multiple industries from industrial vacuum to RV frame design. He spent many of those years spent as a PDM administrator, implementing 3 PDM vaults along the way. He earned his CSWP in 2019, followed by his CSWE in 2013. Programming is a passion that has followed Bryce through his various positions, writing custom business applications to improve design processes. In his spare time Bryce is a gamer, a maker, and a brewer.
Get our wide array of technical resources delivered right to your inbox.
Unsubscribe at any time.