Jump to content
We've recently updated our Privacy Statement, available here ×

maguri

Members
  • Posts

    4
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by maguri

  1. Hi, After struggling with chart customizations I found out that the best way to work with charts is to generate the JFreechart outside the report and give it as a parameter. You have the advantage that you can have full customization of your chart and the generated chart may be used in your web pages adn in the reports. The procedure is as follows. 1) Build a java class that generates the chart and returns a JFreeChart object. 2) Send the chart as a parameter: IndiChart chart = new IndiChart(selectedYear, chartStartYear, chartEndYear, chartTitle, chtType, frequency, chartResultsCount, "", chartRangeAxisLabel, dataSeriesNames, dataSeriesColors, chartTargetValues, chartResultValues); --> Initialize de java class JFreeChart indiChart = chart.createChart(true); --> Build the chart parameters.put("indicatorChart", new JCommonDrawableRenderer(indiChart)); --> put the chart as a parameter 3) in your report, define a parameter of type java.lang.object (lets say its named "indicatorChart") 4) include an Image object in your report and : 4.1) In the image expression enter: (net.sf.jasperreports.engine.JRRenderable)$P{indicatorChart} 4.2) In the expression class enter: net.sf.jasperreports.engine.JRRenderable 4.3) select the Scale Image property option that suits your needs. By using this procedure I'm getting really good images! Hope this helps you
  2. I have this situation: 1) Several objects with a score assigned: good poor and bad. 2) By configuration options the user assigns a color to each score (so, scroe colors are not hardcoded). 3) I need to print the score as a coloured text, or as a coloured box. I cant figure out how to do this without dynamic colour assignmet. Is it possible? Thanks in advance for any light on the subject.
  3. Hi, I cant find a real usage for element groups or frames. At first, I thought they could help me to get report fields glued together but it is not the case. I have this use case: A report, somehow like a form: line 1 --> label1: text1 label2: text2 line 2 --> label3: text3 label4: text4 Each line must be vertically aligned: if text1 or text2 stretches, all fields in line 2 must move downwards accordingly. The result must be like: line 1 --> label1: xxxxxxxxxxxx yyyyyyyyyy zzzzzzzz label 2: qqqqqqqqqqqqqqqqqqqqqqqqqq aaaaaaaaaaaaa bbbbbbbbbb cccc line 2 --> label 3: kkkkkkkkkkkkkkkkkkkkkkkk label 4: wwwwwwwwwwwwwwwwwwwww I tried using elementGroup, putting fields of each line in different groups with no success. labels and texts align by their own way. I tried using Frames with partial success. If the report is simple it works. If the report contains subreports, charts, images, etc. it stops working. The only way to solve the problem is by using report grous. It is terrible!! One report group for each line!! (But it works). So, I havent found a useful usage for element Groups and Frames. Could someone please give me a light on this? I've searched the internet for this with no success. Thanks in advance for any help.
  4. I have exactly the same problem. I tried first to solve the problem using <elementGroup> with no success. After, I tried to use frames with little success. It works sometimes. By using frames, I managed to get correct stretches but I think it was just by chance. If any element of the report was moved a single bit, strtches got scrambled. The only way I could solve the problem was by using Groups: One group for each report line!! That is a very ugly solution but works.
×
×
  • Create New...