Home : Products : Job Cal Plus : Documentation : Custom Reports : VBScript Functions : R.SQLRESULT vbscript Function
Q13588 - INFO: R.SQLRESULT vbscript Function

R.SQLRESULT  is a custom report vbscript function that returns the result of the specified SQL query. 

Syntax

=R.SQLRESULT("SQL Statement")

Where

SQL Statement is a valid SQL query that is executed against the current Job Cal/Plus Database. 

Examples

=R.SQLRESULT("SELECT COUNT(*) FROM WO") - returns the number of records in the WO table. 

=R.SQLRESULT("Select Count(*) FROM WO WHERE [DateComplete ] >=  #SD# and  [DateComplete ] < #ED#") - returns the number of work orders that have a DateComplete in the report date range.  #SD# is replaced with the report start date and #ED# is replaced with the report end date. 

Notes

Use Locate, SQL Results in the Custom Report Designer to locate the formula into the report.

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 10/10/2011 6:04 PM.
Last Modified on 10/12/2011 2:20 PM.
Last Modified by Scott Dorner.
Article has been viewed 3221 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article