Stonefield Query
 
Stonefield Site Map
Stonefield Support

  Overview
  Submit Support Ticket
  Forums
  Online Help Files
  Services
  Pre-Sales Support
Online Webinars
Video Demonstrations
Feature Requests
  Software Maintenance
  Support Testimonials
  FAQ's
Quick Links
Buy Now!
Download Free Trial
Watch a Video
Contact Us

 
 You are here: Support * Support Forums   Search

 Stonefield Query Support Forum

Welcome to the Stonefield Query Support Forum. Please note that in order to participate in the support forums, registration at our site is required. If you are already a member of our site, please sign-in.

 

Subject: How Can I Use Filter Condition As Parameters for Script?

You are not authorized to post a reply.   

Author Messages
jhibbs
Posts:22

06/23/2008 5:01 PM Alert 

I have a current report that list total billable time per employee for a data range. I have been asked to include the number of business days for this date range and the number of hours per employee per business day. I have created a script to calculate the business days. The only problem is this script requires a beginning and ending dates as parameters. How can I capture the date range entered for the report and use these values as the parameters? If this is possible how can I store the number of business days to a report variable so it can be used to calculate the average number of billable hours per business day? Is there a better way I should be doing this?

 

Thanks In Advance

 

Jeff Hibbs

The Blencowe Group

Chris Wolf
Posts:217

06/24/2008 8:47 AM Alert 
Hello Jeff,

You can access the filter conditions for a report by using the FilterConditions collection of the DataEngine object.

You can read more about this at: http://www.stonefieldquery.com/OnlineHelp/SDK/_0ow0srlgb.htm

In the BeforeData section of the report you can declare a global variable like this: public gnVar

Then you can assign a value to that variable in the AfterData section of the report by calling a script and returning a value.

Finally you will need to release this variable in the AfterRun section of the report like this: release gnVar

- Chris Wolf
Stonefield Software Inc.
Adam
Posts:40

09/04/2008 4:38 PM Alert 

Chris

I'm doing a report and have 4 "ask at runtime" filter conditions and need access to the user's selection for one of them.

But I'm at a loss on how to access each individual value...

Will you show a little VFP code that would list the Values of the FilterCondition object?

Thank you,

Tim

dhennig
Posts:100

09/04/2008 6:02 PM Alert 
Hi Adam.

There's a built-in function called GetConditionValue that returns the value entered by the user for the condition of a particular field. For example, if one of the conditions is Customers.Country = "Germany" (where "Germany" is the value entered by the user in the ask-at-runtime dialog), GetConditionValue('Customers.Country') will return "Germany". In the latest build, released earlier today, we added an optional second parameter to that function: the condition number. That's used if you have more than one condition on the same field (eg. Country = "Germany" or Country = "France"), so GetConditionValue('Customers.Country', 2) would return "France".

Doug
You are not authorized to post a reply.
Forums > Stonefield Query SDK > General Support > How Can I Use Filter Condition As Parameters for Script?



ActiveForums 3.6

 
 
   Privacy Statement  |  Terms Of Use
© 1996-2008 Stonefield Software Inc. All rights reserved.