Topic Options
#32296 - 06/18/12 06:51 AM GridView: Display the input of a Query?
Samuel Kopstick Offline
Adagio Maestro

Registered: 06/15/07
Posts: 920
Loc: GTA & North America (Remote Su...
Is it possible to display the input of a Query?

For example, we want to summarize transaction amounts up to a specific date. We use QueryDate to Prompt the user to select the Date.

The user is likely to either print this View, or send it over to Excel.

It would be very helpful if the Date that they selected could be displayed as part of their results. (For example, if this were done in Crystal Reports, I would have a title something like: “Transactions as at xx/xx/xx”.)

Any suggestions?
_________________________
Samuel Kopstick
S Kopstick & Associates Inc
Toronto, ON

Top
#32301 - 06/18/12 08:14 AM Re: GridView: Display the input of a Query? [Re: Samuel Kopstick]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Hi Samuel,

Place the QUERYDATE() in a calculated column and display the column. The Filter can refer to the calculated column.
_________________________
Andrew Bates

Top
#32303 - 06/18/12 08:36 AM Re: GridView: Display the input of a Query? [Re: Retired_Guy]
Samuel Kopstick Offline
Adagio Maestro

Registered: 06/15/07
Posts: 920
Loc: GTA & North America (Remote Su...
Andrew:
I create a Calculated Column as you suggested, as follows: QUERYDATE("Enter the As-Of Date")

As well, I am using the following Filter: {Trx Date} <= QUERYDATE("Enter the Last Date")

The column appears with my As-Of Date, but when I run my View, GV prompts me twice to select a Date (i.e. "Enter the As-Of Date", and then again "Enter the Last Date").

How can I have GV only prompt once for the run date?
_________________________
Samuel Kopstick
S Kopstick & Associates Inc
Toronto, ON

Top
#32304 - 06/18/12 08:44 AM Re: GridView: Display the input of a Query? [Re: Samuel Kopstick]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Remove the QUERYDATE() from the Filter and replace it with the Calculated Column. As in:
Code:
{Trx Date} >= {As of Date}
_________________________
Andrew Bates

Top
#32307 - 06/18/12 09:22 AM Re: GridView: Display the input of a Query? [Re: Retired_Guy]
Samuel Kopstick Offline
Adagio Maestro

Registered: 06/15/07
Posts: 920
Loc: GTA & North America (Remote Su...
Andrew:

This is working nicely – thank you. (I am right-clicking on the calculated column and displaying it using one of the date formats, so that it displays the correct date.)

But I still have a problem (sorry!).

I run the View and then I summarize it. I hide most of the columns (since they are not relevant for the summary). But I would like to display the As-Of Date.

The problem is that the As-Of Date column is out-to-lunch when I use Summarize. What appears to be happening is that the Summarize feature is treating this column as a numeric and therefore is summing all the values in the column.

Edited response – I just discovered if I right-click on the calculated column title and select Display Minimum, my Dates are maintained when I summarize! whistle


Edited by Samuel Kopstick (06/18/12 09:27 AM)
_________________________
Samuel Kopstick
S Kopstick & Associates Inc
Toronto, ON

Top
#32309 - 06/18/12 09:44 AM Re: GridView: Display the input of a Query? [Re: Samuel Kopstick]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Glad to hear it's all working for you now!
_________________________
Andrew Bates

Top


Moderator:  Christa_Meissner 
Who's Online
0 registered (), 45 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1865 Members
5 Forums
14467 Topics
70660 Posts

Max Online: 432 @ 01/20/25 10:17 PM
April
Su M Tu W Th F Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30