ConcourseSuite Support

Support
Corporate
PUBLIC PROFILE

Back to topics

Discuss Reports and Report Writing

iReport installation questions.

21. 6/7/2005 1:31 PM EDT

Ricardo,

Every text value displayed on the report is wrapped in a function call whose syntax looks like below:

For eg: "QUOTATION" text is wrapped as follows:
((org.aspcfs.utils.JasperScriptletUtils) $P).getLabel($P, "reports.quotes.quote.quotation", "QUOTATION")

getLabel() method takes the dictionary as an argument and looks up the key "reports.quotes.quote.quotation". If there is a value provided in the dictionary's language for this key, then that value is displayed. Otherwise the default value "QUOTATION" is displayed.

Since you are working on the report within iReport (external to Centric...), the dictionary CENTRIC_DICTIONARY will be empty. Hence only default values will be displayed. In this case "QUOTATION" will be displayed. So you can replace "QUOTATION" with any other string literal which will then be displayed.

Now if you make changes to quote.xml and try to execute the report within Centric, then you should be aware that the dictionary is available to the report and the values returned by the keys will be used to display on the report. So you should be modifying the dictionary files in centric i.e. add new key value pairs and modify the report to use these values if you are using centric to generate the reports.

-Ananth

22. 6/7/2005 2:49 PM EDT

Hi Ananth, that sound good for the CENTRIC_DICTIONARY I understand that perfecly, the thing is when I'm doing some design modification, adding new database fields into the report, all those kind of things are not showing up after compiling the quote.xml.
I'm doing the quote report from scrach but will be important for me to solve this problem for the rest of the reports.

Thanks a lot for your help and support.

Regards,

Ricardo

23. 6/8/2005 8:15 AM EDT
Default user photo

By Matt Rajkowski

Concursive Corporation
Product Design

airplane-icon-100x100.png

When a new *.xml file is copied into the Centric CRM WEB-INF/reports directory, the existing *.jasper files should be deleted. If they exist, then Centric CRM will use those already compiled reports instead of a new source XML report.

24. 6/8/2005 10:01 AM EDT

Some of the bands on the quote report are either visible or hidden based on the values of certain boolean parameters. So if you happen to modify the quote report and change some values on the bands, you might still not be able to see those on the generated report if the display value happened to be false.

These values are programmatically provided by centric to the report. For working in iReport, you can modify the parameter value, and see if you get the desired output.

25. 6/8/2005 10:36 AM EDT (edited) by Moderator

Hi Ananth good morning, so where can I change those display values?

Another thing, I trying to use a function coming from the original quote.xml (I'm trying to use it in a new report), and during the runtime I'm getting this error message:

What I'm trying is to print the contact address using this function:

((org.aspcfs.utils.JasperScriptletUtils) $P).getQuoteContactAddress($P, $F.intValue())

Filling report... Error filling print... java.lang.ClassCastException: net.sf.jasperreports.engine.JRDefaultScriptlet     
at quote5.evaluate(quote5:134)     at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:461)     
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:389)     
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:295)     
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:282)     
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:339)     
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:262)     
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:202)     
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:118)     
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:622)     
at
 net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:489)     
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:76)     
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)     
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:163)     
at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:550)     
at java.lang.Thread.run(Thread.java:595)
NESTED BY : java.lang.ClassCastException: net.sf.jasperreports.engine.JRDefaultScriptlet     
at quote5.evaluate(quote5:134)     
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:461)     
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:389)     
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:295)     
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:282)     
at net.sf.jasperrepo
rts.engine.fill.JRFillBand.evaluate(JRFillBand.java:339)     
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:262)     
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:202)     
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:118)     
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:622)     
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:489)     
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:76)     
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)     
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:163)     
at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:550)     
at java.lang.Thread.run(Thread.java:595)
NESTED BY : net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error
 evaluating expression : textField_11     
Source text : ((org.aspcfs.utils.JasperScriptletUtils) 
$P).getQuoteContactAddress(
$P, $F.intValue())     
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:472)     
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:389)     
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:295)     
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:282)     
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:339)     
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:262)     
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:202)     
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:118)     
at net.sf.jasperreports.engine.fill.JRBaseFill
er.fill(JRBaseFiller.java:622)     
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:489)     
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:76)     
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)     
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:163)     
at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:550)     
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: net.sf.jasperreports.engine.JRDefaultScriptlet     
at quote5.evaluate(quote5:134)     
at net.sf.jasperreports.engine.fill.JRCalculator.evaluate(JRCalculator.java:461)     
... 14 more Print not filled. Try to use an EmptyDataSource...!

26. 6/8/2005 11:30 AM EDT

Hi Ananth, I found the problem with the functions I was missing the Scriptlet class org.aspcfs.utils.JasperScriptletUtils.

But still I would like to know where can I change the parameters to see the changes regarding bands etc....

Regards,

Ricardo

27. 6/8/2005 12:07 PM EDT

Ricardo,

Since you are creating a new report in iReport you might have to do the following initialization:

1. Go to View > Report properties menu. Under the "Scriptlet" tab for Scriplet Class, provide 'org.aspcfs.utils.JasperScriptletUtils' as its value.

You will have copied aspcfs.jar library into iReport's lib folder. This contains the JasperScriptletUtils class which contains various utitlity methods which can be called from the reports. All centric reports use this scriptlet.

2. Go to View > Report Parameters menu. This lists all the parameters used in the report. Some are built in params and others are defined to be used by centric. The classType of parameters is also important. Boolean datatype parameters are used in quote report to hide/show some bands or text elements.

3. If you double click on a text element, you can view its properties and in the Common tab you will see a Print When Expression which takes a boolean values. So of the text fields in quote report use this to determine when to display the text.

4. Go to View > Bands menu. This displays all the bands that make up the quote report. Bands can also have 'Print When Expression' that determines when the band should be displayed/hidden

5. The exception you are getting looks like a class cast exception. Every textual element placed on the report has a Text Field Expression Class which corresponds to the datatype of the text value returned by the evaluation of text field expression. In your case the getQuoteAddress returns a string containing the address. So the text field used to capture this address should specify 'java.lang.String' as its textFieldExpressionClass.

Hope this information helps.
-Ananth
 

28. 6/8/2005 3:26 PM EDT

Hi Ananth, finally I got my brand new quote.xml report!!!

Thanks a lot for your help.

Regards,

Ricardo

28 results found