ConcourseSuite Support

Support
Corporate
PUBLIC PROFILE

Back to topics

Discuss Reports and Report Writing

Report Images and Parameters

You need to be logged in to post messages

Report Images and Parameters

1/14/2005 10:59 AM EST

Matt,

Thanks for that, my reports now compile :) Well they do in iReports 0.3.2
but not in 0.4.0, not that I'm too worried about that.

Now I have my reports compiling I have a couple of questions. (You knew that was coming didn't you? :p)

How should I reference the image which I wish to appear on the report?
A relative path would be better than an absolute path, maybe to Centric's
images directory, I just wonder which is the method you use.

How can I get new reports to work from within CentricCRM?
Where I am modifying existing Centric reports I do not have a problem
running them from within Centric.
Where I am creating totally new reports Centric reports an error on trying
to run them - most probably related to the passing of parameters to the
reports.

For instance:
I copied the Centric report accounts_list.xml to accounts_test.xml
I compiled accounts_test.xml to accounts.jasper with no modification or
compilation errors.
I created a new record in [REPORTS] table in centric_crm database for the new report.
Relied on magic for centric to pass the parameters to the report and ran it.
Whereupon I received a whole host of errors:

[The actual error is:
java.lang.NullPointerException
at
org.aspcfs.modules.reports.base.ParameterList.setParameters(Unknown Source)
at
org.aspcfs.modules.reports.actions.Reports.executeCommandParameterList(Unkno
wn Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.darkhorseventures.framework.servlets.ControllerServlet.service(Unknown
Source)
etc]

I think the last stage is where I'm having problems. How do I tell centric
to populate my report's parameters?

Regards,

Darren

1. 1/14/2005 11:15 AM EST
Default user photo

By Matt Rajkowski

Concursive Corporation
Product Design

airplane-icon-100x100.png

The following parameter allows you to access the relative images directory in v2.9. Keep in mind, when you upgrade to v3.0 your images directory will be overwritten so these should ultimately go in another place. We'll be adding a new parameter to access images in your fileLibrary path so that these will be preserved during upgrades.

In the meantime,
$P will get the web application's relative path: images/icons/

All of the report parameters that you can use are defined in the Centric CRM document "Writing Reports" -- for those that haven't ordered the documentation you might consider this since the technical documentation can be really useful.

As for installing your own custom reports, I'll answer this in another message. At some point we'll add this to the Admin module of the website.

2. 1/15/2005 10:13 AM EST
Default user photo

By Matt Rajkowski

Concursive Corporation
Product Design

airplane-icon-100x100.png

To manually install a report in Centric CRM, you can perform the following steps... (which I think you did)

1. Copy your report to the reports web directory... just the report.xml file, make sure to delete the compiled version if it already exists in the reports web directory -- Centric CRM will auto-compile any uncompiled report.
2. Determine the category_id of the report to be installed (look in [permission_category] table for the id)
3. Insert a record in the [report] table... reports have the following fields:
<report category_id="<from above>" filename="task_date.xml" type="user" permission="<myhomepage-tasks>" title="Task list by due date" description="What are the tasks due withing a date range?" entered,modified="CURRENT_TIMESTAMP" enteredby,modifiedby="0" enabled="true" />

The report will now appear under the Reports module, if you have the permission to see it.

Now... as to the error message you got...

3. 1/15/2005 10:20 AM EST
Default user photo

By Matt Rajkowski

Concursive Corporation
Product Design

airplane-icon-100x100.png

I haven't seen this error before... so to help diagnose...

First let me know if you compiled the report outside of Centric CRM and copied it into the web reports folder. That could indicate a JasperReport incompatibility -- you're not supposed to mix different versions of JasperReports. If so, remove the compiled report and just copy the report.xml file.

4. 1/17/2005 12:27 PM EST

Ahh, well I copied the compiled report in first and then tried the xml file itself, both giving the same error.

It turns out that I had a typo in the reports table... I could swear I checked that record five or six times! 0_o

No errors now, all running great, thanks for the help.

Incidentally, can I create a new reporting category?

5. 1/17/2005 1:05 PM EST
Default user photo

By Matt Rajkowski

Concursive Corporation
Product Design

airplane-icon-100x100.png

Reporting categories are being driven by the module categories. It would take a bunch of new records to enable a new category and provide a user access to the category and report, although that can be done without any code changes.

We're using the module names as the report categories... do you see another category that might fit here? or maybe a suggestion as to how we might change this?

5 results found