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

dev_1312

Members
  • Posts

    21
  • Joined

  • Last visited

dev_1312's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Hi Anita, Please go through the webniar mentioned by Matt, Download the mega_interactive_dashboard example and look at the last 2 functions of the javascript. Play around with these 2 functions and you must be able to achieve the drill down on other report in the dashboard. If your requirement is to display the drill down in the same report then just use the hyperlink feature . ~Dev
  2. Hi All, Is there anyone who can help me out with this ? Any experts , Moderator ? Please help me out with this , I already spent a week but no gain . Thanks in advance ¬Dev
  3. Hi All, I have created a dashboard and for input controls I am using combobox but the problem here is by default NULL is coming . I dont want NULL to come in the drop down list as it can confuse the end user. Is there any way I can get rid of this NULL text. I saw the source code and find out there is some javascript which it is calling and putting all the values in an array but can figure out what changes needs to be done. Can anyone help me out in this regards ? Thanks in Advance ¬Dev
  4. Hi All, I created a dashboard and when I use '&viewAsDashboardFrame=true' in the URL , page is not displayed complete i.e vertical scroll bars are missing . can anyone let me know what changes needs to be done so that vertical scroll bars comes automatically when page is big or overflowing . Thanks in Advance ¬Dev Post Edited by dev_1312 at 06/06/2011 03:19
  5. Anybody here who can help me on this Thanks in advance ~Dev
  6. Please find below the code : Code:package colorLimiter;import net.sf.jasperreports.engine.JRAbstractChartCustomizer;import net.sf.jasperreports.engine.JRChart;import org.jfree.chart.JFreeChart;import org.jfree.chart.plot.CategoryPlot;public class ChartCustomizer extends JRAbstractChartCustomizer { public void customize(JFreeChart chart, JRChart jasperChart) { System.out.println("in chart customizer"); //Chart is a bar chart if(jasperChart.getChartType() == JRChart.CHART_TYPE_BAR) { ColorBarRenderer renderer = new ColorBarRenderer(); ((CategoryPlot)chart.getCategoryPlot()).setRenderer(renderer); }} } //Renderer Class package colorLimiter;import java.awt.Color;import java.awt.Paint;import org.jfree.chart.renderer.BarRenderer;import org.jfree.data.CategoryDataset;public class ColorBarRenderer extends BarRenderer { /** * */ private static final long serialVersionUID = 1L; public ColorBarRenderer() { super(); } public Paint getItemPaint(int row, int col) { System.out.println("in paint"); CategoryDataset cd = getPlot().getDataset(); System.out.println("after cd"); if(cd != null) { Integer l_rowKey = (Integer)cd.getRowKey(row); String l_colKey = (String)cd.getColumnKey(col); double l_value = cd.getValue(l_rowKey, l_colKey).doubleValue(); if (l_value < 0.0) { return Color.red; } else { return Color.green; } } return Color.blue; } }
  7. Hi All, Can anyone help me out . Now I am facing another error. Please find below : Code:Error filling print... java.lang.NoSuchMethodError: org.jfree.chart.plot.CategoryPlot.setRenderer(Lorg/jfree/chart/renderer/CategoryItemRenderer;)V null Setting up the file resolver... in chart customizer java.lang.NoSuchMethodError: org.jfree.chart.plot.CategoryPlot.setRenderer(Lorg/jfree/chart/renderer/CategoryItemRenderer;)V     at colorLimiter.ChartCustomizer.customize(ChartCustomizer.java:17)     at net.sf.jasperreports.engine.fill.JRFillChart.evaluateChart(JRFillChart.java:1345)     at net.sf.jasperreports.engine.fill.JRFillChart.evaluateRenderer(JRFillChart.java:1305)     at net.sf.jasperreports.engine.fill.JRFillChart.evaluate(JRFillChart.java:1294)     at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)     at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummaryNoLastFooterSamePage(JRVerticalFiller.java:1072)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillSummary(JRVerticalFiller.java:1037)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportEnd(JRVerticalFiller.java:301)     at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:135)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)     at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:845)     at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)     at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)     at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:877)     at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)     at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Print not filled. Try to use an EmptyDataSource...
  8. I am done with this .. Thanks Matt !
  9. Hi, Thanks Sevenn,I tried your code and created the jar file .After this I added the jar files in the class path and given the name of the customizer class as colorLimiter.ChartCustomizer in the customizer class option in the properties of the bar chart. I am able to compile the jrxml file but at run time I am getting the below mentioned error : Please help me out with this as it is really critical Error filling print... Could not create chart customizer instance. Setting up the file resolver... net.sf.jasperreports.engine.JRRuntimeException: Could not create chart customizer instance. at net.sf.jasperreports.engine.fill.JRFillChart.<init>(JRFillChart.java:298) at net.sf.jasperreports.engine.fill.JRFillObjectFactory.visitChart(JRFillObjectFactory.java:746) at net.sf.jasperreports.engine.base.JRBaseChart.visit(JRBaseChart.java:727) at net.sf.jasperreports.engine.JRAbstractObjectFactory.getVisitResult(JRAbstractObjectFactory.java:88) at net.sf.jasperreports.engine.fill.JRFillElementGroup.<init>(JRFillElementGroup.java:82) at net.sf.jasperreports.engine.fill.JRFillElementContainer.<init>(JRFillElementContainer.java:89) at net.sf.jasperreports.engine.fill.JRFillBand.<init>(JRFillBand.java:89) at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getBand(JRFillObjectFactory.java:549) at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:556) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:87) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:57) at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:142) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:52) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247) at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:877) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: java.lang.IllegalAccessException: Class net.sf.jasperreports.engine.fill.JRFillChart can not access a member of class colorLimiter.ChartCustomizer1 with modifiers "" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65) at java.lang.Class.newInstance0(Class.java:349) at java.lang.Class.newInstance(Class.java:308) at net.sf.jasperreports.engine.fill.JRFillChart.<init>(JRFillChart.java:296) ... 18 more Print not filled. Try to use an EmptyDataSource... Code:package colorLimiter;import java.awt.Color;import java.awt.Paint;import net.sf.jasperreports.engine.JRAbstractChartCustomizer;import net.sf.jasperreports.engine.JRChart;import org.jfree.chart.JFreeChart;import org.jfree.chart.renderer.BarRenderer;import org.jfree.data.CategoryDataset;class ChartCustomizer extends JRAbstractChartCustomizer { public void customize(JFreeChart chart, JRChart jasperChart) { //Chart is a bar chart if(jasperChart.getChartType() == JRChart.CHART_TYPE_BAR) { ColorBarRenderer renderer = new ColorBarRenderer(); chart.getCategoryPlot().setRenderer(renderer);}} } //Renderer Class class ColorBarRenderer extends BarRenderer { /** * */ private static final long serialVersionUID = 1L; public ColorBarRenderer() { super(); } public Paint getItemPaint(int row, int col) { System.out.println("in paint"); CategoryDataset cd = getPlot().getDataset(); System.out.println("after cd"); if(cd != null) { Integer l_rowKey = (Integer)cd.getRowKey(row); String l_colKey = (String)cd.getColumnKey(col); double l_value = cd.getValue(l_rowKey, l_colKey).doubleValue(); if (l_value < 0.0) { return Color.red; } else { return Color.green; } } return Color.blue; } }
  10. Hi All, I followed the above posts and able to do most of the customization. The only thing left is the welcome page - welcome image and the jaspersoft logo on the top left . I searched all the images and replaced with my company one but still no luck. Do anyone have any idea where I can find these 2 images . Thanks in Advance ~Dev
  11. Matt, Could you please provide me pointers on the this function Target frames . function replaceManyFrames(TargetReports,TargetParameterStrings,TargetFrames) replaceManyFrames('/reports/report1@@/reports/report2','Country=France@@StoreID=4','2@@3') It is very urgent for us as we have to showcase jaspersoft capabilties to client for BI implementation . Please help me. Regards, Dev
  12. Hi Matt, Please let me know what is target frame means ? where I will get the values of it . I tried creating the dashboard using the reports u used for showing MeGa Dashbard. But when I do preview , Things won't work for me like updating the other report, but If I use the demo used by you I works . Is there anything I need to do apart from writing the javascript command in hyperlink section in Ireport ( as shown in webinar) and dropping the java script file in the folder. Regards, Dev
  13. Matt, I tried doing the way as you showed in the webinar , but stuck at TargetFrames number . "javascript:window.parent.replaceManyFrames('/reports/MegaDashboard/tabs@@/reports/Fusion/bars@@/supermart/details/TopFivesReport@@/reports/Fusion/pie@@/reports/MegaDashboard/parameters','View="+$P{View}+"&top=1@@View="+$P{View}+"&top=1@@View="+$P{View}+"&top=1@@top=1@@top=1','1@@3@@6@@4@@2')" where I will see the TargetFrames number? How I will assign the TargetFrames number to the reports ? Any pointers will be helpful ¬Dev Post Edited by dev_1312 at 05/26/2011 05:02
  14. Hi All, I am new to scriptlet functionality. I wrote a code in java and trying to use scriptlet but need some help. Here is my req - In the barchart I have values for represnting the profit and loss for particular months. I want to display the positive bars as green and negative bars as red. I wrote a code for changing the bar renderer but dont know what is the standard way to call this code in ireport. Any help would be highly appreciated. ~Dev
  15. Hi jpuaze, Do you have a sample code through which I can achieve this kind of functionality ? ~Dev
×
×
  • Create New...