web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Give the user a view with an editable query underneath.

(0) ShareShare
ReportReport
Posted on by 1,087

Hi everyone,

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

BY NOW:

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... 

MY WISH:

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.

POSSIBLE SOLUTION:

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.

Regards

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,844 Most Valuable Professional on at

    It might be easier if you generate a CSV file and open it in Excel, instead of writing data to a table and opening a form.

  • vv1984 Profile Picture
    1,087 on at

    This could be a solution, but I would like to give the users the most straightforward process possible. They feel not so confident with text data import on Excel...

    Isn't there a way to give them chance to setup ranges of a query and open a grid form with data?

    Thank you very much

  • Suggested answer
    Martin Dráb Profile Picture
    237,844 Most Valuable Professional on at

    I thought that opening an Excel spreadsheet directly would be more straightforward than opening a form and letting users to do the step for exporting data from AX form to Excel. But I obviously don't know your specific requirements.

    The way you decided to implement can be done, but there is nothing like that out-of-the-box. Nevertheless look at DEV_QueryBrowser for inspiration.

  • vv1984 Profile Picture
    1,087 on at

    I see. So there's nothing standard (an extraction of invoices, salesLines or whatever) which shows the user a query which can be edited a bit (ranges mainly) and then shows the result in a grid?

    Thank you

  • Suggested answer
    Martin Dráb Profile Picture
    237,844 Most Valuable Professional on at

    You can modify queries of (almost) all forms. If you have a list of invoices that shows what you want, press Ctrl+F3 and set any filters you like.

    I thought you wanted something that would generate a form from your query, which is a very different problem.

  • vv1984 Profile Picture
    1,087 on at

    I'll try to explain it better.

    The queries I need to give my users aren't already available on standard forms. And there is no form whose query can be edited with Ctrl+F3 to achieve that.

    So I'm trying to build a solution for this. I'm just wondering if the standard Ax has some Classes which display a query to the user (as the one you see when pressing Ctrl+F3 on standard forms) and then give the user the result of that query in a grid form.

    Something I can observe to get some inspiration.. ;-)

    Thank you again

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    are you looking for something where users can add tables by own need and by joining them as per need, develop a dynamic/run-time kind of inquiry or report or export data, based on developed query at runtime???

  • Martin Dráb Profile Picture
    237,844 Most Valuable Professional on at

    Yes, that's what I addressed in my second reply.

  • vv1984 Profile Picture
    1,087 on at

    No no, didnt mean that. That would probably made me lose my job ;-))

    I would develop a single form/class for each need. But i would like them to be able to edit the query a bit (changing ranges mostly) before launching the data extraction.

    I'm just looking for the best way to achieve this.

  • Martin Dráb Profile Picture
    237,844 Most Valuable Professional on at

    This approach was already discussed too. You can create forms and let users use Advanced filter/sort (Ctrl+F3).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans