Hide Table of Contents

Report Query Syntax

The table below illustrates typical syntax for a .crp file.

The following rules apply:
  • Each query in the file starts with @, followed by a unique query name in brackets.
  • Each query contains a number of sections.
    • Sections are written §Label [variable]
    • The order of sections can vary.
    • Section names are case-insensitive.
  • You can use pairs of slash / characters to add comments or separate multiple queries in a single .crp file.

    Text between two pairs of slash characters is ignored when the query is executed.

Syntax Description Example
@[query_identifier]
Unique identifier for query
@[GroupMembers]
§Name [display_name]
Name displayed in Report Generator Query pane
§Name [User details of selected groups]
§Company [company_name]
Name of company writing the query

Displays in query Properties.

§Company [SOLIDWORKS]
§Description 
[description]
Description

Displays in query Properties.

§Description 
[Lists all members of the selected groups.]
§Version [version_number]
Query version number

Displays in query Properties.

§Version [1.1]
§Arguments
[
type name[count] [instruct]
]
Must be on one line.
Variable declaration section

Can prompt user for input.

§Arguments 
[
GroupID TheGroupID[N] [Select groups]
]
§Sql
[
SELECT column
FROM table_name
WHERE selection_criteria
]
Section defining the T-SQL statement
§Sql
[
SELECT U.Username, G.Groupname,
       G.Description
WHERE {G.GroupID, TheGroupID,
       =, OR} AND
       G.GroupID=M.GroupID AND
       U.UserID = M.UserID]


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Report Query Syntax
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: SOLIDWORKS PDM 2014 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.