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

sheppard.deangmail.com

Members
  • Posts

    20
  • Joined

  • Last visited

sheppard.deangmail.com's Achievements

Explorer

Explorer (4/14)

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

Recent Badges

0

Reputation

  1. I just installed a fresh copy of JasperServer 4.7.0 (64 bit) onto my system. When I go to http://localhost/jasperserver I see the login page fine, however, it is complaining about missing jQuery files. I look at the tomcat/webapps/jasperserver directory and there are jQuery files there but it is a different version that what the login.html file is referencing. Is this a common problem?? How is this resolved? I Files
  2. This ended up being a red herring, after I looked at the source code I noticed that it doesnt actually terminate execution. The problem ended up being that I did not have the fonts installed on my Unbuntu Server (10.4). In case anyone else gets this, I installed Microsofts True Type fonts as follows; sudo apt-get install msttcorefonts Thats resolved my problem. Thanks.
  3. Hello All, I am getting the following error when I attempt to generate a report from Java. Is there a way to add these preferences? I have this working on other systems, I do not recall this being a problem anywhere but I'm not running it on Unbuntu 10.4, so new challenges arising all over the place. The reports all generate from from the jasperserver repository application deployed on tomcat, just not through the java source. Any help would be immensely appreciated. Regards. Error Message Jan 10, 2012 5:45:42 PM org.openide.util.NbPreferences getPreferencesProvider WARNING: NetBeans implementation of Preferences not found: java.lang.Exception at org.openide.util.NbPreferences.getPreferencesProvider(NbPreferences.java:110) at org.openide.util.NbPreferences.forModule(NbPreferences.java:75) at com.jaspersoft.ireport.designer.IReportManager.getPreferences(IReportManager.java:1245) at com.jaspersoft.ireport.jasperserver.ws.WSClient.getManagementService(WSClient.java:642) at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:399) at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320) Post Edited by shepparddean at 01/11/2012 01:33
  4. I have successfully deployed my report to the jasper server. I basically created a folder under Reports, called MyReport and proceeded to upload every jrxml file to this folder, including any images. I did this through the iReport Repository Navigator. I then modified each jrxml file to use "repo:/reports/MyReport/file.jrxml" for any sub-reports or images instead of the local file reference. These files do not compile via the iReport Plugin. Once all my .jrxml and images where uploaded to the folder, I then choose to add a JasperServer Report, calling it MyReport and when prompted to select the .jrxml file, I choose one from the repository based on the files I had just uploaded. It now runs perfectly, through iReport, the JasperServer UI and through the Java API. Thanks.
  5. Hello, I have a large report designed in iReport Designer 4.0.2, it has a large number of sub reports and some of these sub reports also have sub reports. The hierarchy is similar to the following; Master1 | +----SubReport1 | | | +--- ListLookupReport | +----SubReport2 | +----SubReport3 | +--- ListLookupReport As you can see, the sub-reports can call the same sub-reports in certain scenarios. The challenge I have is how to publish this my Jasper Server Repository so that I can run it through a web application. The report works great through the internal viewer, and pdf viewer. I have no issue connecting to the server repository, the challenge is getting this report published/deployed/etc to the server. I’m not sure how to reference a sub report properly, when attempting to deploy it recommends changing the sub-reports to be reference as “repo:ListLookupReport” as an example, but this never works when I attempt to run the report from the server directly. Also, do all of these sub-reports have to exist under the Resources of the main report? I’d prefer that the sub-reports where capable of standing alone. Any help, documentation, tutorial, example of referencing a sub-report on the repository would be phenomenal. I’ve tried many different variations, but I’m at a loss currently. Thank you. Dean.
  6. Hi All, I am looking to deploy my local report to the server, using the Repository Navigator that is a part of the iReport Designer. The report in question contains numerous sub-reports and a few images. When I attempt to add the master report to the repository it finds the sub-reports and asks to change their reference to "repo:MySubReport" as an example. The import then seems to fail due to the stream being closed to javax.mail (interesting..). Once this change is made to the report expression becoming "repo:xxx", the report no longer works locally either which seems counter intuitive. Is there a guide on how to deploy/publish a report to the repository? I would really appreciate any guidance, advice, etc. Regards, Dean. www.power-project.ca
  7. Hi All, I'm working on creating some styles, namely for the purpose of showing negative numbers as red and others as black. I assume this is a fairly standard style. I can see how I can create a style for a specific field in my sql results, but is there a way to create a style that accepts a variable so that I can apply the style to any numeric field I choose? Thank you, Dean. www.power-project.ca
  8. Hi Carl, Thanks for the response, unfortunately neither of those options is what I am looking to do. I've achieved what I am looking to do through sub-reports, which works well but I'm not sure it is a best design practice. Essentially, I have some reports that contain a foreign key, which is easy enough to do through a join in the report query. However, a couple of my reports have 10 references and I didnt want to join the table so many times. I thought it would be easier to have a field that called a SQL query directly which I could pass a parameter into. Which is now what I have done through sub-reports. I'm probably not explaining this really well, but a field type of sqlfield would be ideal ;) Thanks, Dean. www.power-project.ca
  9. Hi All, I am creating a report where the report query contains a number of foreign keys to various tables such as statuses, codes, etc. I was wondering, is it possible to have a lookup function? I would like to be able to call the function with a passed in id and have it run a sql query to return the value such that I can display the returned value. Any help would be immensely appreciated. Regards, Dean.
  10. Hi, I've created a very simple report in iReport (4.0.2) and I have uploaded it to JasperServer. The issue is that I can not get it to properly show an image (wood.jpg). Is there a tutorial on using images and publishing to the server? It works locally through iReport Preview, but once I push it to the server it simply states: Error filling print... Byte data not found at location : repo:wood.jpg Setting up the file resolver... net.sf.jasperreports.engine.JRException: Byte data not found at location : repo:wood.jpg at net.sf.jasperreports.engine.util.JRLoader.loadBytesFromLocation(JRLoader.java:563) at net.sf.jasperreports.engine.JRImageRenderer.getInstance(JRImageRenderer.java:217) at net.sf.jasperreports.engine.fill.JRFillImage.evaluateImage(JRFillImage.java:1057) at net.sf.jasperreports.engine.fill.JRFillImage.evaluate(JRFillImage.java:1004) 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.fillTitle(JRVerticalFiller.java:326) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:262) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128) 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:878) 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... Code:<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report4" language="groovy" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <style name="Title" forecolor="#FFFFFF" fontName="Arial" fontSize="26" isBold="true" pdfFontName="Helvetica-Bold"/> <style name="SubTitle" forecolor="#666666" fontName="Arial" fontSize="18"/> <style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/> <style name="Detail" fontName="Arial" fontSize="12"/> <queryString language="SQL"> <![CDATA[select * from projects]]> </queryString> <field name="name" class="java.lang.String"/> <field name="description" class="java.lang.String"/> <background> <band splitType="Stretch"/> </background> <title> <band height="70" splitType="Stretch"> <image> <reportElement x="-20" y="0" width="595" height="64"/> <imageExpression class="java.lang.String"><![CDATA["repo:wood.jpg"]]></imageExpression> </image> <staticText> <reportElement style="Title" x="0" y="5" width="263" height="33"/> <textElement verticalAlignment="Middle"/> <text><![CDATA[Wood Title]]></text> </staticText> <staticText> <reportElement style="SubTitle" x="63" y="39" width="200" height="22" forecolor="#FFFFFF"/> <textElement textAlignment="Right"/> <text><![CDATA[Wood SubTitle]]></text> </staticText> </band> </title> <pageHeader> <band splitType="Stretch"/> </pageHeader> <columnHeader> <band height="36" splitType="Stretch"> <line> <reportElement positionType="FixRelativeToBottom" x="0" y="35" width="555" height="1"/> <graphicElement> <pen lineWidth="0.5" lineColor="#999999"/> </graphicElement> </line> <staticText> <reportElement style="Column header" x="0" y="19" width="277" height="15"/> <textElement/> <text><![CDATA[name]]></text> </staticText> <staticText> <reportElement style="Column header" x="277" y="19" width="277" height="15"/> <textElement/> <text><![CDATA[description]]></text> </staticText> </band> </columnHeader> <detail> <band height="16" splitType="Stretch"> <line> <reportElement positionType="FixRelativeToBottom" x="0" y="15" width="555" height="1"/> <graphicElement> <pen lineWidth="0.5" lineColor="#999999"/> </graphicElement> </line> <textField> <reportElement style="Detail" x="0" y="0" width="277" height="15"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{name}]]></textFieldExpression> </textField> <textField> <reportElement style="Detail" x="277" y="0" width="277" height="15"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{description}]]></textFieldExpression> </textField> </band> </detail> <columnFooter> <band height="45" splitType="Stretch"> <line> <reportElement positionType="FixRelativeToBottom" x="0" y="3" width="555" height="1"/> <graphicElement> <pen lineWidth="0.5" lineColor="#999999"/> </graphicElement> </line> </band> </columnFooter> <pageFooter> <band height="20" splitType="Stretch"> <textField> <reportElement style="Column header" x="433" y="0" width="80" height="20"/> <textElement textAlignment="Right"> <font size="10" isBold="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression> </textField> <textField evaluationTime="Report"> <reportElement style="Column header" x="513" y="0" width="40" height="20"/> <textElement> <font size="10" isBold="false"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression> </textField> <textField pattern="EEEEE dd MMMMM yyyy"> <reportElement style="Column header" x="0" y="0" width="197" height="20"/> <textElement> <font size="10" isBold="false"/> </textElement> <textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression> </textField> </band> </pageFooter> <summary> <band splitType="Stretch"/> </summary></jasperReport>
  11. Thanks, I just found it difficult to find the proper org-openide-util.jar and the xerces-2.8.0.jar to allow the sample to run. Of course, my report now runs, but I haven't figured out how to actually get the report data and write it to a file or whatever... any suggestions on where I can look?
  12. Is it required to use the Java Distribution included with Jasper Server (<installdir>/java) in order to properly execute the samples? I ask, because there are required jar dependencies (org-openide-util.jar) that are included with that specific distribution that are not referenced elsewhere. Regards, Dean.
  13. I've included these jar, but also required the commons-logging-1.0.4.jar. When I attempt to run the runReport method, I get the following exception; Exception in thread "main" java.lang.NoClassDefFoundError: org/openide/util/Lookup at com.jaspersoft.ireport.jasperserver.ws.WSClient.getManagementService(WSClient.java:642) at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:399) at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320) at MyJIClient.runReport(MyJIClient.java:36) at MyJIClient.main(MyJIClient.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110) Am I missing a jar? I can't find this. If I choose a random openide.jar from the net, i then get an error as follows; Exception in thread "main" java.lang.NoClassDefFoundError: org/openide/util/NbPreferences at com.jaspersoft.ireport.designer.IReportManager.getPreferences(IReportManager.java:1245) at com.jaspersoft.ireport.jasperserver.ws.WSClient.getManagementService(WSClient.java:642) at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:399) at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320) at MyJIClient.runReport(MyJIClient.java:34) at MyJIClient.main(MyJIClient.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110) Caused by: java.lang.ClassNotFoundException: org.openide.util.NbPreferences at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Code:import com.jaspersoft.ireport.jasperserver.JServer;import com.jaspersoft.ireport.jasperserver.ws.WSClient;import com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.ResourceDescriptor;import net.sf.jasperreports.engine.JasperPrint;import java.util.HashMap;/** * Created by IntelliJ IDEA. User: dean Date: May 10, 2011 Time: 1:03:04 PM To change this template use File | Settings * | File Templates. */public class MyJIClient{ private JServer server = null; public MyJIClient(String webServiceUrl, String username, String password) { server = new JServer(); server.setUsername(username); server.setPassword(password); server.setUrl(webServiceUrl); } public void runReport(String reportUri, java.util.Map parameters) throws Exception { ResourceDescriptor rd = new ResourceDescriptor(); rd.setWsType(ResourceDescriptor.TYPE_REPORTUNIT); rd.setUriString(reportUri); WSClient client = server.getWSClient(); JasperPrint print = client.runReport(rd, parameters); } public static void main(String[] args) throws Exception { MyJIClient rp = new MyJIClient("http://192.168.2.16:8080/jasperserver", "jasperadmin", "jasperadmin"); rp.runReport("/reports/test", new HashMap()); }}
  14. I am looking to get the example running in the Web Services Guide, with a few problems. I have updated the jars based on another thread, however, I am now getting an error stating that the class below is no located. Is this available in a distribution, or is there better documentation available on getting a java client running using the web services? Exception in thread "main" java.lang.NoClassDefFoundError: org/openide/util/NbPreferences at com.jaspersoft.ireport.designer.IReportManager.getPreferences(IReportManager.java:1245) at com.jaspersoft.ireport.jasperserver.ws.WSClient.getManagementService(WSClient.java:642) at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:399) at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320) at MyJIClient.runReport(MyJIClient.java:34) at MyJIClient.main(MyJIClient.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110) Caused by: java.lang.ClassNotFoundException: org.openide.util.NbPreferences at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 11 more
  15. Never mind, guess it make sense to also include the jasperreports-4.0.2.jar file :)
×
×
  • Create New...