OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions Reports and Segments – custom report

This topic contains 8 replies, has 5 voices, and was last updated by  Yevhen Shyshkin 8 years, 6 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #35808

    manhapt
    Participant

    Dear Oro,

    Your UI functionality to create a custom report that is very good and easy to use.
    But my project need to have some complex reports. Remember that is the custom report in ADMIN UI.

    How do i configure some function like SELECT DISTINCT the return result?
    Are there anyway to custom SELECT query a report using source code file (PHP, YML, XML…) ?

    Because the report is created in admin, so if we have something like a place to add custom query, or some way to map the report #ID to source code file (like Drupal does with CMS page), that would be easy to customize.

    Thanks,
    Manh from Balance Internet.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Author
    Replies
  • #35809

    Dima Soroka
    Keymaster

    Hi Manh

    Yes, we have a way to define reports based on complex queries. As example you can take a look into OroCRM ReportBundle, there are a couple of customer reports defined in datagrid.yml. Please let me know if it helps or you have some other needs.

    #35810

    manhapt
    Participant

    Sorry @dima for the late response !

    I checked the customer report in crm-platform. Too much works to do for only creating a new report.

    step 1: create a new datagrid child node in datagrid.yml
    step 2: call thats grid in view file
    step 3: create router and call view file in controller
    step 4: register the router in navigation.yml

    I want something like “Reports and Segments > Custom Reports” but it’s able to make a complicated report.
    I expected it could register everything automatically to Oro system. We just need to create a child node of datagrid in datagrid.yml file.

    Do you have another way to do it?

    #35811

    manhapt
    Participant

    Hello,
    OroCRM ReportBundle is a good example. Thank you for that.

    One question that do you know how to import a sub-datagrid for datagrid.yml file?

    Our reports could reach 100-1000 reports. So we can’t write everything in only 1 yml file.

    #35812

    Alexandr Smaga
    Participant

    Hello.

    In order to import multiple datagrid configuration from separated files imports directive could be used.

    it’s native symfony2 way how to split config files, also your configuration of grids could be generated by PHP code, for this you should implement ConfigurationProviderInterface and register as a service with tag oro_datagrid.configuration.provider

    #35813

    manhapt
    Participant

    Hello,

    I also though it could works but it doesn’t. I don’t know why. Oro may rewrite the way how to load yml for datagrid.

    implement ConfigurationProviderInterface and register as a service with tag oro_datagrid.configuration.provider

    It sounds cool. Do you have any documentation for this implementation? or some examples which were implemented by Oro.

    Thanks,

    #35814

    Alexandr Smaga
    Participant

    Hello!

    Sorry for misguided you, symfony’s yaml loader supports imports only when parses services configuration files, in oro this possibility was only implemented for workflows and processes config files. We will plan an improvement to add this behavior for all configs.

    As an example of datagrid configuration provider you can check this one

    #35815

    golriz.nourani
    Participant

    Hi
    I read your forum and it was so useful but I want to have some process on data after select query and after that pass it to grid . is there any way?
    thanks

    #35816

    Yevhen Shyshkin
    Participant
Viewing 8 replies - 1 through 8 (of 8 total)

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top