The Crystal Enterprise query language allows you to use simple SELECT statements to search for and retrieve Crystal Enterprise InfoObjects from the APS InfoStore. This query language is a subset of the commonly used Structured Query Language (SQL). While it utilizes the powerful capabilities of SQL, it does not support table joins or embedded SELECT statements.
The syntax of a typical SELECT statement follows:
SELECT <Properties> FROM <Categories> WHERE <Conditions>
You can also use a number of Functions and clauses with your SELECT statement.
Select TOP 20 SI_NAME, SI_ID, SI_DISABLED From CI_SYSTEMOBJECTS Where SI_PROGID = 'CrystalEnterprise.Server'
This example retrieves a collection of servers. Because the TOP N function is used, at most 20 server objects will be returned. Once you retrieve the objects, you can access their available properties using the SDK. In this case, you could use the server object's Disabled property to enable or disable particular servers.
Tip: To search for a string that includes an apostrophe literal, use the character twice. For example, if you are trying to do a pattern match for "Jonathan's folder", you would use two apostrophes: WHERE SI_NAME LIKE 'Jonathan''s%'
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |