ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 12 replies, has 2 voices, and was last updated by  abel 1 year, 3 months ago.

  • Creator
    Topic
  • #21761

    abel
    Participant

    Hi all! I was created a datagrid with code:

    But when I run, it cannot group by with my field.
    Row grand-total run ok, but row page-total run uncorrect, it show value like grand-total (total of all value in grid, not in 1 page)
    Some one can help me.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Author
    Replies
  • #21765
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    Try to delete

    #21769

    abel
    Participant

    Great, It’s working. But why?
    I think it does not affect the result?

    #21770

    abel
    Participant

    And I have one more question. I create success report table with that grid. And now I want create line char with Charjs and data in report table. And my question is: How to get correct data from data grid?
    Thanks again!

    #21786
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    Chart feature is supported by default, you can choose required columns when you editing a report. Here is description of ChartBundle. If you have datagrid object, that for example you can retrieve data the following approach:

    #21804

    abel
    Participant

    Thanks you, I will try.
    Sorry, I have 1 more question.
    I was created 2 table with 2 column as follow:
    – In table Order:

    – In table Store

    When I import Order from xlsx file throw cron, it’s failed (before that I create column store_id in table Order with annotion @ORM\Column(…), import ok).
    And when I use inner join in my grid

    and when I call that grid in view.html.twig, this error occurred

    #21809

    abel
    Participant

    I was try to get data from datagrid follow you. But I can’t get datagrid.
    I use class BuildAfter to get datagrid, is that true way?

    #22060
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi,

    Try to clear cache: /app/cache/dev and /app/cache/prod. If it didn’t help, try to rename $store_id variable in Order entity, for example to $store. In any case probably doctrine can’t find our field.

    I don’t think that events like buildAfter, buildBefore can help you. If you want to create custom report page you must change and extend either report view action or create own action. It is depends what you want.

    #22073

    abel
    Participant

    I was used event buildBefore but it occurred same error as BuildAfter

    And I don’t think class report controller can help me, because I want to create many report for 1 table (with date, channel, team, …). As I saw, that class created 1 chart for 1 entity (no parameter) but I want create 1 chart for 1 datagrid of entity (with some input parameter).

    My idea is: create report crub (with report entity), field of report entity are name, start_date, end_date (order create date), and description. In my view report, have 3 tag:
    – Report info
    – Datagrid of all order was created between start_date and end_date
    – Last, line chart of order in this datagrid

    I was use

    for get data in datagrid. But I can’t pass parameters to datagrid so it’s show error

    #22077

    abel
    Participant

    Update:
    I was use ParameterBag to passed 2 parameter start_date and end_date to my datagrid. But I can’t get those field in current report (create chart for any report with it’s start_date and end_date).
    How to do that?

    #22078

    abel
    Participant

    Sorry, I can get all data I want, but when I render chart to template, nothing show.
    This is my chart.yml

    This is my controller (include view report and create chart):

    And this is my template:

    #22082
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Try this:

    #22101

    abel
    Participant

    Great! It’s work, but have a problem. Date in horizontal not true

    My report started at 25/7 and ended at 31/7. But it’s not have 25/7 instead is 24/7 (same value). And when I hover in this point, it’s show day is 25/7.
    How to fix that problem?

Viewing 12 replies - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.