Reports and reference to multi-enum-field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ari
    Junior Member
    • Aug 2020
    • 22

    Reports and reference to multi-enum-field

    Hi everyone,
    I would like to create a report witch shows me the statistics of my categories.
    My setup is as follows:
    I have a table “clients” with all details including a reference (entity = n:n) to the table “category”. The field cat_name is a multi-enum-field in table clients.

    So far this is working and the results are shown correctly.

    E.g. in clients:
    Name 1, Address, Category: red, blue
    Name 2, Address, Category: yellow
    Name 3, Address, Category: blue, yellow, red

    Category:
    Blue
    Red
    Yellow
    White
    Green

    The report should look like this:
    category Sum
    red 2
    blue 2
    yellow 2
    White 0
    green 0
    There is no way to select the group field “category”!?
    How can I create a report like this?

    Thanks in advance
    Ari
  • emillod
    Active Community Member
    • Apr 2017
    • 1405

    #2
    I'm not sure do i understand you correctly, but i've tried to reproduce your issue.
    1. I've created enum field in Account entity called "category";
    2. I've assigned categories to specific clients;
    3. I've created report for that field.

    Here you have result: https://i.imgur.com/tV9s2V1.png
    Here you have report https://demo.espocrm.com/?lang=en_US...748d7770a1b998 (please be aware that demo will reset in few hours).


    If you have another configuration, please let me know. I think that there is a possibility that you have another entity for categories(like in documents and knowledgebase entities). Then you should create notStorable field in categories entity which will count all related records and after that create report for categories report.

    Comment

    • Ari
      Junior Member
      • Aug 2020
      • 22

      #3
      Hi emilod,
      thank you for response. It works ("notStorable field"). Great!

      Comment

      Working...