Announcement

Collapse
No announcement yet.

Report Panel: Same entity type as report possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Report Panel: Same entity type as report possible?

    Hi!

    Is it not possible to create a report panel of the same entity type as the report?

    I would like to have a side panel in Contacts that shows me a specific value from a report (entity type: Contact). But neither a list report nor a grid report works.

    Do report panels only work with different entities, i.e. report and report panel must have different entities?​

  • #2
    Hello Stefan
    you have to understand how these panels works. I've created on official demo few things and it worked. Please correct me if i'm wrong, maybe you wanted to achieve something different.

    1. I've created relation between contacts - we have to filter on panels based on something.
    Click image for larger version

Name:	image.png
Views:	54
Size:	45.6 KB
ID:	111491
    2. I've linked test records to primary contact
    Click image for larger version

Name:	image.png
Views:	45
Size:	40.3 KB
ID:	111492
    3. I've created list report with runtime filter - i've pointed there this relation. This is important!
    Click image for larger version

Name:	image.png
Views:	47
Size:	62.1 KB
ID:	111493​4. Next i've created a report panel
    Click image for larger version

Name:	image.png
Views:	45
Size:	39.0 KB
ID:	111494​5. I've rebuilt panels
    6. Tadaa
    Click image for larger version

Name:	image.png
Views:	47
Size:	155.0 KB
ID:	111495

    Comment


    • #3
      Thank you very much emillod !

      This is really interesting and helpful!

      Is it only possible if there is a Contact - Contact connection?

      So it would not be possible to display information (a currency amount, for example) about the current contact without a relationship?

      (I am aware that I can also display this value of the contact directly via the layout editor. But with the report panels it would be clearer and more prominent).​

      Comment


      • #4
        Stefan
        if i understand correctly, you need to have a relation between record which is displayed on your screen and records which should be displayed in panel. That's because there have to be way to filter usefull records.

        In regard to your question, i don't know the structure of your Espo, but if you have amount entered in contact and you would like to show these amounts in contact panel, it'll not show you the TOTAL amount for all accounts, but you can display this amount next to each contact in panel.
        You can also accomplish total amount by:
        1. Creating hook which will calculate total each time when you relate or unrelate contact to the main contact
        2. Creating formula which will calculate amount from related contacts
        3. Creating custom notStorable field which will calculate amount each time you load a contact record

        Comment


        • #5
          emillod I think I know how to get the value. Thank you very much!

          Can I somehow display a value of an entity, which I calculated via formula, as an own block in side panel, like you could do with reportpanel?

          I attached a screenshot from espocrm documentation. That's what I want to achieve, but with a value that is saved in the same entity.

          Comment


          • #6
            Stefan i'm glad i could help.
            I think you can consider creating custom view for field with total income and in tpl file you could specify custom css style.

            Comment


            • #7
              I have now managed to create my own panel with these instructions: https://docs.espocrm.com/development.../record-panels (in case it might be helpful to anyone else in the future)

              Comment

              Working...
              X