Reports and relationship fields

Hi,

Unless I missed something, it is impossible to display or filter a report with relationship fields.

This is absolutely necessary for some kind of reports:

  • Opportunities report : Display the contact where opportunity role is Primary Decision Maker
  • Events report: find delegates having accepted the event (or attended the event) … or just display the delegates status/

Right now, we still need to use KReports for these reports.

Hello

1 - Try writing your report from a different focus point (contacts) with contact condition / then display opportunity fields

2 - Events report! We need this! As the “Status” of the Contact/Event sits inside the relationship table not the module tables AOR does not see it and will not report on it
:frowning:

That doesn’t work for Opportunities/Contacts, even starting from the Contacts module.
opportunity role is also a field inside the opportunities-contacts relationship table and it’s not available in reports

Yes you are right :frowning:

As a workaround/alternative approach, I recently discovered the possibilities of connecting a SuiteCRM database with Google graphs, see this post:

https://suitecrm.com/suitecrm/forum/developer-help/20227-how-to-add-other-charts-in-report-charts-for-ex-line-chart-bubble-chart-gauge-chart-funnel-chart-etc?start=%1$d

You can use any SQL query to set up the data, so that would solve your needs. Then you have plenty of chart types to choose form, or you can even display the data as a fancy interactive table. Great stuff you can do with that.

That’s certainly a solution, but not appropriate for most users, and certainly less flexible.
I guess KReports will still be the only viable solution.

Unfortunately KReports has issues on the latest versions of Suite:

  1. under apache + php-fpm getallheaders is missing so its broken (unless you add this in)
  2. the versions of SLIM that suite uses/KReports uses conflict - not sure what affect removing it from Suite has at this stage

Also I can’t find any documentation for KReports and its advanced code (any pointers there)?

Well, we still use KReports 3.1 with some fixes we made, especially for (1) support of PHP 7.0 and 7.1 and (2) fix javascript errors with some translations.
We have no problems with that version.
If you are interested, send us an email at support at quickcrm.fr and we will send it to you.

1 Like

Hi,

Many thanks for the Kreporter 3.1 modules, I have used it and it works well.
I have subsequently made another version of KREST, that basically renames all of the Slim to Slimv2 to allow it to work with the newer Slim included with SuiteCRM (Im not using it in anger as yet until our client answers a few questions so I may still use Kreporter3).

If anyone wants the Bodged up Krest I have do let me know!

Regards

mark

1 Like

Hey there,

Im trying to instal Kreports on suiteCRM 7.11.0

Added thoses 3 zip with the module builder loader :

krest_core_2_5_3.zip
KReporter_Base_4_2_0.zip
KReporter_Core_4_2_0.zip

Its not working, got a lot of 404 error searching for file that doesnt exist …

Can you please teach me how u done it ?

Thanks in advance

Ahhh that error is not a KReport problem, I have just installed a brand new 7.11 on Siteground and had that (the default permissions for a server like this seem to be insufficient).

Can you confirm your server set-up though becuase the KReporter requirements change a bit depending on the set-up (if you are using php-fpm or other proxy based setup there is a further requirement).

  1. To start with (for testing), go to the /vendor and rename the slim folder to something like slim_old
  2. go to the /KREST edit the index.php file and add this:

if (!function_exists('getallheaders'))
{
    function getallheaders()
    {
           $headers = [];
       foreach ($_SERVER as $name => $value)
       {
           if (substr($name, 0, 5) == 'HTTP_')
           {
               $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
           }
       }
       return $headers;
    }
}
  1. you need a css tweak so do this:

Add following lines at the top of of themes/SpiceTheme/extjs6/ext6_override.css

html{
height:inherit;
max-height:100%;
}

“Can you confirm your server set-up though becuase the KReporter requirements change a bit depending on the set-up (if you are using php-fpm or other proxy based setup there is a further requirement).”

Dont really understand this ? Its a basic empty suiteCRM on a 1&1 server…

I have tried the 3.1 Kreport cause I saw on another topic that the 4.2 do not work on suiteCRM, but I got a lot of error like this :

Uncaught SyntaxError: Invalid or unexpected token
at kreportsbase1.js:1
(anonymous) @ kreportsbase1.js:1
kreportsbase3.js:1 Uncaught TypeError: bi is not a function
at kreportsbase3.js:1
(anonymous) @ kreportsbase3.js:1
standardviewpanel.js:1 Uncaught TypeError: bi is not a function
at standardviewpanel.js:1
(anonymous) @ standardviewpanel.js:1
googlechartspanel.js:1 Uncaught TypeError: bi is not a function
at googlechartspanel.js:1
(anonymous) @ googlechartspanel.js:1
ksnapshot.js:1 Uncaught TypeError: bi is not a function
at ksnapshot.js:1
(anonymous) @ ksnapshot.js:1
kreportsbase5.js:1 Uncaught TypeError: Cannot read property ‘Toolbar’ of undefined
at kreportsbase5.js:1
at ext-all.js:38
at h.fire (ext-all.js:38)
at h.Ext.apply.readyEvent.e.fire (ext-all.js:38)
at fireReadyEvent (ext-all.js:38)
at ext-all.js:38

Dont rly understand … I will try u 2 piece of code with a re-instalation of the 4.2 …

But for now I got a 404 error on XXX.com/KREST/sysinfo
Its look like the rewriterules does not work or something like that …

The instructions I provided were for Kreporter 4. No idea about 1&1’s hosting sorry. However I had a load of 404’s on Siteground and its adefault permissions issue, you can search here to find out how to fix that.

Okay soooo I have done this :

Delete every 3 module.

Repair & rebuild

Installed the 3 zip :

krest_core_2_5_3.zip
KReporter_Base_4_2_0.zip
KReporter_Core_4_2_0.zip

Repair & rebuild

Renamed slim to slim_test

Added your 2 codes

Put 775 right on the folder I’ve got 403 in the chrome console:

Modules/KReports
Theme/SpiceTheme

Now when I refresh and try to create a report I got something ! (The interface is displaying with all label as undefined)

But in my console I still have a lot of 404 error :

ext-all.js:22 GET https://XXX.com/KREST/KReporter/core/config?_dc=1547736989266 404
ext-all.js:22 GET https://XXX.com/KREST/KReporter/bucketmanager/groupings?_dc=1547736989224&page=1&start=0&limit=25 404
ext-all.js:22 GET https://XXX.com/KREST/metadata/modules?_dc=1547736989227&session_id=&page=1&start=0&limit=25 404
ext-all.js:22 GET https://XXX.com/KREST/metadata/modules?_dc=1547736989228&session_id=&page=1&start=0&limit=25 404
ext-all.js:22 GET https://XXX.com/KREST/KReporter/core/layouts?_dc=1547736989229&page=1&start=0&limit=25 404
ext-all.js:22 GET https://XXX.com/KREST/KReporter/bucketmanager/groupings?_dc=1547736989231&page=1&start=0&limit=25 404
ext-all.js:22 GET https://XXX.com/KREST/KReporter/core/whereinitialize?_dc=1547736989517 404
ext-all.js:22 GET https://XXX.com/KREST/KReporter/plugins?_dc=1547736989724&addData=["sysinfo"] 404
KReporterDesigner.js:14 server-side failure with status code 404
ext-all.js:22 GET https://XXX.com/KREST/KReporter/core/vizcolors?_dc=1547736989755&nodeid=&page=1&start=0&limit=25 404
ext-all.js:22 GET https://XXX.com/KREST/KReporter/dlistmanager/dlists?_dc=1547736989756&page=1&start=0&limit=25 404
ext-all.js:22 GET https://XXX.com/KREST/KReporter/core/wherefunctions?_dc=1547736989757&page=1&start=0&limit=25 404

Pretty sure it because of the rewriting rules…

Thanks a lot for helping me man !

Thats definately a permissions issue, from an ssh console do this:

chmod -R 755 .
chmod -R 775 cache custom modules themes data upload config_override.php

You also need to check that the owner:group permissions are set properly.

Thanks for you’re reply. Changed nothing.

Im pretty sure its the URL Rewriting that does not work.

/KREST/sysinfo give a 404

/KREST/index.php work well…

Im trying to follow the KREST installation guide.pdf (https://www.spicecrm.io/download/krest-installation-guide/)

I got to c/c this into an htaccess:

DocumentRoot “C:/htdocs”
<Directory “C:/htdocs”>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted

But idk wich htaccess… When I put it into my suitecrm folder I got a 500 error :frowning:

It could be the redirect, but that code is unlikely to work:
C:/htdocs is a windows drive/folder (are you using a 1&1 windows server?)

You would usually put all of that in a in the core apache config (which is unlikely for you to have permissions for), you would then be adding other commands to the .htaccess.

However with most reasonable hosting this is already pre-working (most modern CMS’s require this functionality).

Regards

Mark

1 Like

Thanks for trying to help a noob ahah

Yep, its a 1&1 linux server, Im looking if I can access to httpd.conf to put the code in it right now

UPDATE : IT WORK !

Sooo Finally made it,

I was right, it was a rewriterule problem.

In /SuiteCRM/KREST/ I edited the .htaccess and add : “RewriteBase /KREST/”

Now everything works great, Thanks again cause this report module look really better than the default one !

can you recapitulate how you managed to make it work?