Give the user a form gird view with an editable query underneath.

Hi everyone,

I often receive the request to give the user an organised set of data to be exported to an Excel spreadsheet.


The quickest way to do this is making a query (with ranges, grouping and whatever…) and use it as datasource in a view. Then I export the data from the view to Excel and i give the spreadsheet to the user. But all this word is always on my desk and I have to work on the AOT each time…


I would like to find a way to give the user the facility to open this interrogation straight from a menu, change the query by his needs (even adding tables to the query that populates the result if possible) and then launch it to get a form grid filled with data ready to be exported to Excel.


I would use a RunBaseBatch class with a query object:

-User sets up the query and clicks OK on the class prompt dialog

-The run method of the class populates a table “MyTable” with data (one field of the table identifies the user who has launched the class, so concurrent runs are managed)

-The class eventually opens a form which has “MyTable” table as datasource.

Now my questions are:

Is there some standard class or form which does this job in a similar way?

The SQL group by clause is managed correctly or there is some exception I should be aware of before starting?

Thank you in advance for the patience to read all this.

I hope you can give me some hints about this.


Note that this question is already being discussed in a duplicate thread on another forum.