Jump to content
Changes to the Jaspersoft community edition download ×

zerglicious

Members
  • Posts

    24
  • 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 zerglicious

  1. I am using JasperServer Professional 2.1 and I am having a problem with ad hoc reports. I have entered a topic, my jrxml file, and certain parameters into JasperServer. However, some of the parameters that I have marked as optional are coming up as required on the filter popup. Does anyone know a workaround or a patch to address this issue? I do need the filters/parameters in the reports but having them as required is not workable.
  2. Hey SuperMonkey, You may not want to go to this level of depth but you can pass the IGNORE_PAGINATION flag as a parameter to the filling process. In a recent project I did, we customized the Excel and CSV generation processes because we didn't want those reports to be paginated. You can of course override the export class implementations by updating the appropriate appliationContext files. Attached is a CustomReportExcelReporter class which uses the IGNORE_PAGINATION flag. You could probably pass this flag as one of the input controls but you might have to do a little customization of the EngineServiceImpl to pick it up before report generation.
  3. did you find a solution to this? I am seeing this rather cryptic error too. Actually, I am seeing it not only when I try to save my Oracle datasource but also when I try to save any resource to the repository.
  4. Ok....That could come in handy. I'll try this out over the next couple of days and post the results of the test here. Thanks lshannon, very helpful.
  5. Well it might possible but would be really ugly in my case because I already have a 30 reports or so that I need to support. I don't really want to double the maintenance. Plus I'm not sure I'll really know about the datasources before JasperServer is deployed. The QueryExecutor thing sounds promising. This is really what I need -- to be able to select a DataSource as a parameter for running the report as part of my input controls.
  6. I have a report which might run against one of two standard jdbc datasources. I haven't associated the datasource with the report because I'm not sure which datasource I'll need to execute the report against. However, when I don't define a datasource for the report, JasperServer 2.1 isn't prompting me for a datasource. It just returns an empty report. Do I need to create a customized web flow to achieve this functionality or am I just missing something?
  7. JasperServer has a Custom Report View step in Version 2.1 when uploading or editing a new Jasper Report. It allows the uploading of an optional JSP file? What is the purpose of this feature? How does this optional page interact with the report template or does it?
  8. There is a white paper that JasperSoft has on the site currently that is very helpful. I tried to upload it to the forum but it is too big. You can find it on the JasperSoft site under white papers. You have to register etc., but it is still there. It is called - Customizing and Rebranding the JasperSoft User Interface Post edited by: zerglicious, at: 2008/04/29 13:16
  9. I am evaluating JasperServer and I need to do two tasks. 1. I have a series of inputs which will be repeated for approximately 30 reports -- I don't want to input all the controls for each report, I'd rather configure these so I'd like to create a custom generated JSP page which will have dynamic inputs. It looks like I'll be able to create a custom web flow and use this to generate my sql. Is this possible? That brings me to question #2. 2. How do I get my sql param $P!{SQL} into a report hosted on JasperServer? I want to just a pass my sql statement into the report as a single parameter. This is simple enough when I'm doing the API level report generation myself. How I pass parameters to a report hosted on the server? Thanks in advance.
  10. I have a report with a Scriptlet which works fine in IReport but is failing validation on JasperServer because JasperServer can't find the scriptlet class on the classpath. I built the JasperServer from the source so it will be easy enough to put the scriptlet class in the /WEB-INF/classes directory but I was trying to upload the scriptlet as a jar in the JasperServer console. Is this the proper procedure for reports with Scriptlets?
  11. I had this exact symptom too but when I dropped from JDK 1.6.0_04 to 1.5.0_05 then the server started working.
  12. Ok I figured it out. I rolled back to source build 2.0.1 and just used a fresh settings.xml rather than trying to 'add' the JasperServerProfile to my existing settings file. I deleted my local repository and although it took 30 minutes to pull all the stuff out the maven repositories it built without a hitch. B)
  13. Thanks for your reply I've tried what you suggested and I'm getting some more output but it doesn't seem to resolve the problem. It looks like Maven is trying to find the following file but can't. Downloading: file://C:/work/JasperServer/jasperserver-repo/com/jaspersoft/jasperserver/api/metadata/impl/jasperserver-repository-hibernate/2.1.0/ jasperserver-repository-hibernate-2.1.0.jar This file isn't in the jasperserver-repo that I downloaded. Was it supposed to be constructed by the code build?
  14. Thanks for your reply I've tried what you suggested and I'm getting some more output but it doesn't seem to resolve the problem. It looks like Maven is trying to find the following file but can't. Downloading: file://C:/work/JasperServer/jasperserver-repo/com/jaspersoft/jasperserver/api/metadata/impl/jasperserver-repository-hibernate/2.1.0/ jasperserver-repository-hibernate-2.1.0.jar This file isn't in the jasperserver-repo that I downloaded. Was it supposed to be constructed by the code build?
  15. Thanks for your reply I've tried what you suggested and I'm getting some more output but it doesn't seem to resolve the problem. It looks like Maven is trying to find the following file but can't. Downloading: file://C:/work/JasperServer/jasperserver-repo/com/jaspersoft/jasperserver/api/metadata/impl/jasperserver-repository-hibernate/2.1.0/ jasperserver-repository-hibernate-2.1.0.jar This file isn't in the jasperserver-repo that I downloaded. Was it supposed to be constructed by the code build?
  16. Thanks for your reply I've tried what you suggested and I'm getting some more output but it doesn't seem to resolve the problem. It looks like Maven is trying to find the following file but can't. Downloading: file://C:/work/JasperServer/jasperserver-repo/com/jaspersoft/jasperserver/api/metadata/impl/jasperserver-repository-hibernate/2.1.0/ jasperserver-repository-hibernate-2.1.0.jar This file isn't in the jasperserver-repo that I downloaded. Was it supposed to be constructed by the code build?
  17. I have been working on building Jasper Server from the source. I got the server code to build but now I'm stuck trying to run the tasks that are going to create and popoulate the Jasper Server Database. I'm using the latest version of Jasper Server 2.1.0. When I run the mvn clean install on the jasperserver-repository-hibernate directory I getting the following issues: Code:[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) [iNFO] Error for project: Jasper Server Hibernate Mappings (during install) [iNFO] ------------------------------------------------------------------------ [iNFO] Failed to resolve artifact. Missing: ---------- 1) com.jaspersoft.jasperserver.api.common.impl:jasperserver-api-common-impl:jar:2.1.0 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.jaspersoft.jasperserver.api.common.impl -DartifactId=jasperserver-api-common-impl -Dversion=2.1.0 -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) com.jaspersoft.jasperserver.api.metadata.impl:jasperserver-repository-hibernate:jar:2.1.0 2) com.jaspersoft.jasperserver.api.common.impl:jasperserver-api-common-impl:jar:2.1.0 2) com.jaspersoft.jasperserver.api.metadata.impl:jasperserver-api-metadata-impl:jar:2.1.0 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.jaspersoft.jasperserver.api.metadata.impl -DartifactId=jasperserver-api-metadata-impl -Dversion=2.1.0 -Dpackaging=jar -Dfile=/path/to/file Path to dependency: 1) com.jaspersoft.jasperserver.api.metadata.impl:jasperserver-repository-hibernate:jar:2.1.0 2) com.jaspersoft.jasperserver.api.metadata.impl:jasperserver-api-metadata-impl:jar:2.1.0 ---------- 2 required artifacts are missing. for artifact: com.jaspersoft.jasperserver.api.metadata.impl:jasperserver-repository-hibernate:jar:2.1.0 from the specified remote repositories: Repo1 Maven (http://repo1.maven.org/maven2/), JasperForge Maven Repository (http://www.jasperforge.org/maven2), Maven Snapshots (http://snapshots.maven.codehaus.org/maven2), ji-repo-svn (file://C:/work/JasperServer/jasperserver-repo), central (http://repo1.maven.org/maven2) [iNFO] ------------------------------------------------------------------------ [iNFO] For more information, run Maven with the -e switch [iNFO] ------------------------------------------------------------------------ [iNFO] + Ignoring failures [iNFO] ------------------------------------------------------------------------ [iNFO] BUILD SUCCESSFUL [iNFO] ------------------------------------------------------------------------ [iNFO] Total time: 3 seconds [iNFO] Finished at: Fri Apr 11 09:24:21 EDT 2008 [iNFO] Final Memory: 5M/9M [iNFO] ------------------------------------------------------------------------ I know this error is typically from not setting up the path properly to my jasper server repository in my settings.xml but I think this is ok. I was able to build the source for the main project. I have noticed however that the paths referred to by this pom.xml such as com.jaspersoft.jasperserver.api.metadata.impl and com.jaspersoft.jasperserver.api.common.impl are missing in the repository. I am new to Maven2 so any help would be appreciated.
  18. Here is a Chart Customizer class that rotates 3DBarChart labels: Code: import java.awt.Font; import net.sf.jasperreports.engine.JRChart; import net.sf.jasperreports.engine.JRChartCustomizer; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.CategoryLabelPositions; import org.jfree.chart.labels.ItemLabelAnchor; import org.jfree.chart.labels.ItemLabelPosition; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.renderer.category.BarRenderer3D; import org.jfree.ui.TextAnchor; public class ItemStatusBarChartCustomizer implements JRChartCustomizer{ public void customize(JFreeChart jfc, JRChart jrchart) { CategoryPlot plot = jfc.getCategoryPlot(); CategoryAxis axis = plot.getDomainAxis(); axis.setCategoryLabelPositions(CategoryLabelPositions.UP_45); axis.setLabelFont(new Font("Verdana",Font.PLAIN, 7)); axis.setTickLabelFont(new Font("Verdana",Font.PLAIN, 7)); BarRenderer3D renderer = (BarRenderer3D) plot.getRenderer(); renderer.setItemLabelsVisible(true); renderer.setPositiveItemLabelPositionFallback( new ItemLabelPosition(ItemLabelAnchor.OUTSIDE10, TextAnchor.TOP_CENTER)); renderer.setNegativeItemLabelPositionFallback( new ItemLabelPosition(ItemLabelAnchor.OUTSIDE10, TextAnchor.TOP_CENTER)); } }
  19. OK, I managed to figure this one out on my own but I thought I would list the solution I found in case someone else has the same issue. If you've done most of the work in your query then getting the chart to work isn't too difficult. You don't even need to do group or variable calculations or anything -- you just make categoryExpressions and valueExpressions for the bar chart part of the same seriesExpression. It is a little crude but this seems to work fine. Code: <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="counterfeit_items_chart" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="250" pageHeight="200" columnWidth="250" columnSpacing="0" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenNoDataType="NoPages" scriptletClass="com.keys.reports.DemoScriptlet" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="2" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <parameter name="COLUMN_VALUE" isForPrompting="false" class="java.lang.Long"/> <queryString><![CDATA[select SUM(DECODE(TRACKING_CODE, 'INF-1002', COUNTER, 0)) UNAUTHORIZED_ITEMS, SUM(DECODE(TRACKING_CODE, 'INF-1004', COUNTER, 0)) COUNTERFEIT_ITEMS, SUM(DECODE(TRACKING_CODE, 'INF-1005', COUNTER, 0)) STOLEN_ITEMS, SUM(DECODE(TRACKING_CODE, 'INF-1006', COUNTER, 0)) LOST_ITEMS, SUM(DECODE(TRACKING_CODE, 'INF-1007', COUNTER, 0)) EXPIRED_ITEMS, SUM(DECODE(TRACKING_CODE, 'INF-1008', COUNTER, 0)) RECALLED_ITEMS from ( select ih.tracking_code AS TRACKING_CODE, i.key, 1 as COUNTER from item_history ih, item i where ih.item_id = i.id and ih.tracking_code in ('INF-1002', 'INF-1004', 'INF-1005', 'INF-1006', 'INF-1007', 'INF-1008') group by ih.tracking_code, i.key order by ih.tracking_code asc )]]></queryString> <field name="UNAUTHORIZED_ITEMS" class="java.lang.Long"/> <field name="COUNTERFEIT_ITEMS" class="java.lang.Long"/> <field name="STOLEN_ITEMS" class="java.lang.Long"/> <field name="LOST_ITEMS" class="java.lang.Long"/> <field name="EXPIRED_ITEMS" class="java.lang.Long"/> <field name="RECALLED_ITEMS" class="java.lang.Long"/> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="200" isSplitAllowed="true" > <bar3DChart> <chart isShowLegend="false" evaluationTime="Report" hyperlinkTarget="Self" > <reportElement x="6" y="11" width="233" height="174" key="element-1"/> <box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/> </chart> <categoryDataset> <dataset resetType="None" > </dataset> <categorySeries> <seriesExpression><![CDATA["ITEM_STATUS"]]></seriesExpression> <categoryExpression><![CDATA["UNAUTHORIZED_ITEMS"]]></categoryExpression> <valueExpression><![CDATA[$F{UNAUTHORIZED_ITEMS}]]></valueExpression> <itemHyperlink > </itemHyperlink> </categorySeries> <categorySeries> <seriesExpression><![CDATA["ITEM_STATUS"]]></seriesExpression> <categoryExpression><![CDATA["COUNTERFEIT_ITEMS"]]></categoryExpression> <valueExpression><![CDATA[$F{COUNTERFEIT_ITEMS}]]></valueExpression> <itemHyperlink > </itemHyperlink> </categorySeries> <categorySeries> <seriesExpression><![CDATA["ITEM_STATUS"]]></seriesExpression> <categoryExpression><![CDATA["STOLEN_ITEMS"]]></categoryExpression> <valueExpression><![CDATA[$F{STOLEN_ITEMS}]]></valueExpression> <itemHyperlink > </itemHyperlink> </categorySeries> <categorySeries> <seriesExpression><![CDATA["ITEM_STATUS"]]></seriesExpression> <categoryExpression><![CDATA["LOST_ITEMS"]]></categoryExpression> <valueExpression><![CDATA[$F{LOST_ITEMS}]]></valueExpression> <itemHyperlink > </itemHyperlink> </categorySeries> <categorySeries> <seriesExpression><![CDATA["ITEM_STATUS"]]></seriesExpression> <categoryExpression><![CDATA["EXPIRED_ITEMS"]]></categoryExpression> <valueExpression><![CDATA[$F{EXPIRED_ITEMS}]]></valueExpression> <itemHyperlink > </itemHyperlink> </categorySeries> <categorySeries> <seriesExpression><![CDATA["ITEM_STATUS"]]></seriesExpression> <categoryExpression><![CDATA["RECALLED_ITEMS"]]></categoryExpression> <valueExpression><![CDATA[$F{RECALLED_ITEMS}]]></valueExpression> <itemHyperlink > </itemHyperlink> </categorySeries> </categoryDataset> <bar3DPlot > <plot /> <categoryAxisFormat> <axisFormat > </axisFormat> </categoryAxisFormat> <valueAxisFormat> <axisFormat > </axisFormat> </valueAxisFormat> </bar3DPlot> </bar3DChart> </band> </title> <pageHeader> <band height="0" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="0" isSplitAllowed="true" > </band> </detail> <columnFooter> <band height="0" isSplitAllowed="true" > </band> </columnFooter> <pageFooter> <band height="0" isSplitAllowed="true" > </band> </pageFooter> <summary> <band height="0" isSplitAllowed="true" > </band> </summary> </jasperReport> Post edited by: zerglicious, at: 2007/10/08 18:41
  20. I would like to display the following information in a Barchart? Is this possible? What would be the simplest implementation? Code:UNAUTHORIZED_ITEMS COUNTERFEIT_ITEMS STOLEN_ITEMS LOST_ITEMS EXPIRED_ITEMS RECALLED_ITEMS ------------------ ----------------- ------------ ---------- ------------- -------------- 172 0 0 0 0 0
  21. Are you trying to use the barbecue renderer shown in the examples? If so this link may help. The example shown in the examples is simplistic. I think this link might be helpful: http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=8&id=7209#7209 Also remember that the jasper examples uses barbecue-1.06b.jar and IReport is currently at barbecue-1.1.jar. This can be a pain when your trying to get your code to compile because the interfaces are slightly different
  22. Code provided by hima-t - hima-t works great but is a little out of date with IReport 2.0 which is shipping with the barbecue-1.1.jar. Here is the BarbecueRenderer2 slightly updated for the new version. Of course you can change the sizes as needed: Code: package net.sf.jasperreports.renderers; import java.awt.*; import java.awt.geom.*; import net.sf.jasperreports.engine.JRAbstractSvgRenderer; import net.sf.jasperreports.engine.JRException; import net.sourceforge.barbecue.Barcode; import net.sourceforge.barbecue.output.OutputException; /** * A wrapper for the Drawable interface in the JCommon library: you will need the * JCommon classes in your classpath to compile this class. In particular this can be * used to allow JFreeChart objects to be included in the output report in vector form. * */ public class BarbecueRenderer2 extends JRAbstractSvgRenderer { /** * */ private Barcode barcode = null; private static final Font DEFAULT_FONT = new Font("monospace", Font.PLAIN, 8); private static final int DEFAULT_BAR_WIDTH = 1; private static final int DEFAULT_BAR_HEIGHT = 10; public BarbecueRenderer2(Barcode barcode) { this.barcode = barcode; this.barcode.setBarWidth(DEFAULT_BAR_WIDTH); this.barcode.setBarHeight(DEFAULT_BAR_HEIGHT); this.barcode.setFont(DEFAULT_FONT); } /** * */ public void render(Graphics2D g2d, Rectangle2D rect2d) throws JRException { if (barcode == null) { return; } double scaleX; double scaleY; Rectangle r = this.barcode.getBounds(); scaleX = rect2d.getWidth() / r.getWidth(); scaleY = rect2d.getHeight() / r.getHeight(); try { AffineTransform oldTF = g2d.getTransform(); AffineTransform scaler = AffineTransform.getScaleInstance(scaleX, scaleY); g2d.transform(scaler); this.barcode.draw(g2d, (int) (rect2d.getX() / scaleX), (int) (rect2d.getY() / scaleY)); g2d.setTransform(oldTF); } catch(OutputException e) { throw new JRException(e); } } public Dimension2D getDimension() { return this.barcode.getBounds().getSize(); } }
  23. Thanks for your reply. I am using the IReport 2.0 but it isn't giving me any errors. Would mind posting the errors that your setup is giving you? This might point me in the direction of the invalid code in my jrxml file. I am sort of new to Jasper and I have modified the xml files a couple of times manually as I was trying to find all the various features that Jasper has. I might have corrupted something.
  24. I have created a report using the IReport Wizard and tried to add a Summary Band to it. However, the fields in the Summary Band won't render. If I change the isSummaryNewPage param to true -- I just get a blank page at the end of the report. Attached is my jrxml file. [file name=Sales_Activity_Report.jrxml size=17129]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Sales_Activity_Report.jrxml[/file]
×
×
  • Create New...