Occasionally clients will want to be able to create a report that they can run each month without modifying the query. The following steps will give you the steps needed to create a query to find data within a given time period.
- Go to File->Reports->Names.
- Click on Query and then select Query Manager.
- Click Add button.
- In the Query ID give this query a new unique name.
- Click Add button.
- (For this example we will use the OPEN field.) Click Lookup button in the Field selection.
- Highlight the OPEN field and then click Done button.
- Change the comparison so that it reflects “greater than or = to”.
- Leave the date that was automatically placed into the field alone.
- Click Add button again.
- Choose AND.
- Follow steps 6 through 9 again and then click Done button.
- Highlight your new query and then click Expert button.
- Click “Edit this Query”.
- A new window will open and should look like this.
- We will now modify the details of the query so that this query can be used in perpetuity to extract all the names entered for the current year.
- In the editor section enter the following string.
- month(names->open) >= 1 .and. year(names->open) = year(today)
- Click Done button at the bottom to save the query.
- Click Yes to save the query.
The query can now be used to show all the names that were opened in the current year. You can use the following examples for other queries.
This will show names opened in the current month
- month(names->open) >= month(today) .and. year(names->open) = year(today)
This will show all CLIENTS opened this year
- Class=”CLIENT”.and.month(names->open)>= 1.and.year(names->open)= year(today)
Comments
0 comments
Article is closed for comments.