# Kreporter Subpanel Documentation

**URL:** <https://community.spicecrm.io/t/kreporter-subpanel-documentation/309>\
**Category:** KReporter\
**Created:** [July 12, 2018, 2:49pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309 "2018-07-12T14:49:30Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephen.roy](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@stephen.roy](https://community.spicecrm.io/u/stephen.roy)\
**Post date:** [July 12, 2018, 2:49pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/1 "2018-07-12T14:49:31Z")

</div>

Hi do you have a link or can you pint me to the documentation to get published reports into a sub panel please.  
Thanks

Stephen

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [August 7, 2018, 10:00pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/2 "2018-08-07T22:00:41Z")

</div>

Stephen,  
this document shall help  
[KReporter4\_SubpanelCapability.pdf](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/5d6999621bc39469bca92025949f878b048b1985.pdf) (742.8 KB)

---

<div class="post-metadata">

**Author:** ![stephen.roy](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@stephen.roy](https://community.spicecrm.io/u/stephen.roy)\
**Post date:** [October 30, 2018, 9:56am UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/3 "2018-10-30T09:56:16Z")

</div>

hi i have the subapnels displaying but they will not load the report or visualization

i get the following errors.

Uncaught ReferenceError: SpiceCRM is not defined  
at index.php?module=Accounts&offset=2&stamp=1540893037063556800&return\_module=Accounts&action=DetailView&record=e1c844bb-dfa6-7bce-fb6e-5757f1b8282f:3910  
index.php?module=Accounts&offset=2&stamp=1540893037063556800&return\_module=Accounts&action=DetailView&record=e1c844bb-dfa6-7bce-fb6e-5757f1b8282f:3958 Uncaught ReferenceError: SpiceCRM is not defined  
at index.php?module=Accounts&offset=2&stamp=1540893037063556800&return\_module=Accounts&action=DetailView&record=e1c844bb-dfa6-7bce-fb6e-5757f1b8282f:3958  
index.php?module=Accounts&offset=2&stamp=1540893037063556800&return\_module=Accounts&action=DetailView&record=e1c844bb-dfa6-7bce-fb6e-5757f1b8282f:4006 Uncaught ReferenceError: SpiceCRM is not defined  
at index.php?module=Accounts&offset=2&stamp=1540893037063556800&return\_module=Accounts&action=DetailView&record=e1c844bb-dfa6-7bce-fb6e-5757f1b8282f:4006

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [October 30, 2018, 12:48pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/4 "2018-10-30T12:48:58Z")

</div>

Looks like there is some javascript file missing.  
What’s the KReporter Version? In which CRM (name + version) did you install KReporter?

---

<div class="post-metadata">

**Author:** ![stephen.roy](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@stephen.roy](https://community.spicecrm.io/u/stephen.roy)\
**Post date:** [October 30, 2018, 1:00pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/5 "2018-10-30T13:00:25Z")

</div>

Kreporter 4.2 SuiteCRM 7.7.9

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [October 30, 2018, 3:06pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/6 "2018-10-30T15:06:26Z")

</div>

Let’s try this:  
Put following line at the top in file modules/KReports/js/KReporterCommon.js

```
if(typeof SpiceCRM == 'undefined') var SpiceCRM = {};
```

---

<div class="post-metadata">

**Author:** ![FibreCRM\_Simon](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@FibreCRM\_Simon](https://community.spicecrm.io/u/FibreCRM_Simon)\
**Post date:** [October 31, 2018, 12:41pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/7 "2018-10-31T12:41:47Z")

</div>

This is starting to look great 🙂  
Is there way to pass context to the subpanel report so that the visualisation is related to the current record?

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [October 31, 2018, 1:46pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/8 "2018-10-31T13:46:42Z")

</div>

Yes, there is. As an example in an Account:  
In “Select” drag account ID field and operator “assign from parent”

 ![grafik](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/aac7937d21b39130e66d4ca8cd5f93c6f48544d3.png)

---

<div class="post-metadata">

**Author:** ![FibreCRM\_Simon](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@FibreCRM\_Simon](https://community.spicecrm.io/u/FibreCRM_Simon)\
**Post date:** [October 31, 2018, 2:02pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/9 "2018-10-31T14:02:44Z")

</div>

Thanks Val. The “assign from Parent” doesnt seem to do anything.  
Examples:  
Run the report from KReporter and this filter is ignored (obviously there is no parent at this stage). I would expect the report to be empty but it contains everything as is there is no filter.  
Viewing the report within the subpanel just shows the report as if run from KReporter.  
What am I missing?

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/e7c0dc512149569f103a9b7e7084c14b24d079ab.png)

---

<div class="post-metadata">

**Author:** ![FibreCRM\_Simon](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@FibreCRM\_Simon](https://community.spicecrm.io/u/FibreCRM_Simon)\
**Post date:** [November 1, 2018, 8:33am UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/10 "2018-11-01T08:33:36Z")

</div>

Do you think we can fix this one?

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [November 1, 2018, 2:58pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/11 "2018-11-01T14:58:35Z")

</div>

Simon,  
it’s correct behaviour.  
Report iself will display all data.  
As a subpanel only the data related to the parent.  
I haven’t tried it unser SuiteCRM, I will keep you posted.  
Val

---

<div class="post-metadata">

**Author:** ![FibreCRM\_Simon](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@FibreCRM\_Simon](https://community.spicecrm.io/u/FibreCRM_Simon)\
**Post date:** [November 5, 2018, 10:21am UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/12 "2018-11-05T10:21:54Z")

</div>

OK. Hoping we can get this one sorted 🙂

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [November 6, 2018, 1:26pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/13 "2018-11-06T13:26:37Z")

</div>

Simon,  
on my installation Report in Subpanel is not loaded at all. Subpanel is rendered but there is not content and no query fired to database.  
DId you add anything elese despite of the of the code I sent?  
Val

---

<div class="post-metadata">

**Author:** ![FibreCRM\_Simon](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@FibreCRM\_Simon](https://community.spicecrm.io/u/FibreCRM_Simon)\
**Post date:** [November 6, 2018, 1:38pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/14 "2018-11-06T13:38:35Z")

</div>

Hi Val  
That’s the only change we made and it worked for us.  
Let me know if you would like FTP access etc.  
Simon

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [November 6, 2018, 2:08pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/15 "2018-11-06T14:08:12Z")

</div>

Hi Simon,  
yes please. I just need edit access on modules/KReport.php to add a debug line (see the query generated) and read access on sugarcrm.log. And a user for your crm so thta I can call the report.  
Val

---

<div class="post-metadata">

**Author:** ![FibreCRM\_Simon](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@FibreCRM\_Simon](https://community.spicecrm.io/u/FibreCRM_Simon)\
**Post date:** [November 13, 2018, 8:10am UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/16 "2018-11-13T08:10:33Z")

</div>

Did you manage to access the site Val?

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [November 15, 2018, 9:12am UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/17 "2018-11-15T09:12:32Z")

</div>

no time these days… trying to check access today

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [November 21, 2018, 12:32pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/18 "2018-11-21T12:32:32Z")

</div>

Simon,  
I found the problem and the fix will be published with v4.4.  
We were using a variable to get parent ID that only exists in SpiceCRM theme. The variable is not present in SuiteCRM that’s why parent ID is not passed to query.

Val

---

<div class="post-metadata">

**Author:** ![FibreCRM\_Simon](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@FibreCRM\_Simon](https://community.spicecrm.io/u/FibreCRM_Simon)\
**Post date:** [November 23, 2018, 2:18pm UTC](https://community.spicecrm.io/t/kreporter-subpanel-documentation/309/19 "2018-11-23T14:18:07Z")

</div>

Fantastic. Let me know how to test on 4.4.  
FYI - 4.4 installed on Suite 7.10.10. Integrate tab \> Publish Reports \> Publish as Subpanel\> Accounts Module with selected Tab and Sequence. Presentation tickbox ticked.  
Report dashlets not appearing in Accounts on any tabs.
