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

burferd

Members
  • Posts

    87
  • 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 burferd

  1. All the examples I have seen so far pass parameters as strings using something like: HashMap hmap = new HashMap(); hmap.put( "ParamName", "value" ); How do you handle non-string parameters (int, double)? Are they passed as strings as well like: hmap.put( "ID", "13" ); or do they have to be passed as some other object type?
  2. Since I am not having any luck trying to create a report from a .jasper file, I tried creating one from a jrxml file with the following code: JasperReport jr = JasperCompileManager.compileReport( reportDir+"Classic.jrxml" ); JasperPrint jp = JasperFillManager.fillReport( jr, new HashMap(), mySQLConnection ); JasperViewer.viewREport( jp, true ); I get the following error: java.security.AccessContrtolException: access denied (java.io.FilePermission C:Program FilesSunCreatir2_1SunAppServer8domainscreatorconfigclassic_1175529714821_953742.java delete) It looks like it is trying to delete a temporary file from the server's config area and cannot do it. Is there some kind of security settings that need to be set in order to run Jasper Reports in this context????
  3. I have a canned repport that runs fine in iReport. I am trying to get it to print from my application. This is the code I am using: JasperPrint jp = JasperFillManager.fillReport( reportDir+"Test_Report.jasper", new HashMap(), mySQLConnection); JasperViewer.viewReport( jp, true ); I get the following error from the call to JasperFillManager.fillReport() "net.sf.jasperreports.engine.JRException: Error loading expression class : Test_Report_1175200944899_991206" Can anyone tell me what I am doing wrong and why I get this error??
  4. Newbie question: I need to find out how to set up the query in iReport so I can pass parameters from a Java program call. All the examples I have found so far for iReport seem to deal with self contained queries. I need to set up something that accepts parameters. If I were writing a stored procedure,it might look like: sp_get_userdata( IN id ) begin select * from usertable where userId = id; end; How would the iReport query look for something like this, or can I use database stored procedures? How do I set things up in iReport so the parameter 'id' can be passed in from the Java HashMap containing parameters?
  5. I found out why it was not displaying, the text fields were too short for the text. But now I have a different problem. The Static Text and variables are in the 'ColumnFooter' section and I would expect them to be printed at the end of the report, but they are beinig printed like they were PageFooters. I have a date and page in the page footer, and the totals are being printed just above them for each page. Is this how it should be displayed? The layout page and Document structure panel to the left both show the fields to be in the columnFooter section. How do I just get a single line summary at the end of the data set?
  6. I have a report with a couple columns that are subtotaled by group. I want to print a grand total at the bottom of the report, but I get nothing. I added the Grand Total: static text field and two variables $V{Total_Col1}, $V{Total_Col2} in the columnFooter section. Both total variables have: Calculation Type = sum Reset Type = Report The expression for each is the field for the data in each column. The report compiles and runs. The group subtotals are correct, but nothing is printed at the end of the report. Not even the static text "Grand Total:" What is wrong here?
  7. Thanks, that helps. Wish there were more such examples.
  8. I have a report with a single group. I can get the header and details to behave like I want, but I am having problems getting the column total to print in the group footer. The detail line has a field $F{itemCount} and I have a variable defined as $V{itemCount_SUM} in the footer. The variable properties for $V{itemCount_SUM} are: Variable Class type = integer Calculation type = Sum Reset type = Group Reset group = GroupName Increment type = None I suspect that I need to fill in the Variable Expression with some value, but I don't know what is. Where can I find some examples or references?
  9. I am trying to compile one of the test reports in my application and I get an "access denied" error when the program is trying to delete an intermediate file. What permissions are required and how do I set them up?? Using JR1.3.1, Java Studio Creator, Sun App server 8.2
  10. I think I found my way around this problem. I found a post that said they resolved this problem by adding the library "commons-javaflow-20060411.jar" to their project from iReport. What other libraries are necessary to run a report compiled in iReport??
  11. I have a report compiled in iReport. Can I use the following: JasperPrint jp = JasperFillManager.fillReport( reportName, new HashMap(), mySqlConnection ): where reportName is the .jasper file created from iReport. The report runs fine in iReport. Or do I need to recompile the .jrxml file within the java application first? If I can use the .jasper report, why would I get the following error from the JasperFillManager call: Error loading expression class : Test_Report_1175101457897_481266 My report is named Test_Report.jasper. What to do the numeric suffixes refer to? What should I look at first to figure out why I get this error? Like I said, it works fine in iReport and the database connection string is the same for both iReport and the application.
  12. Using JR1.3.1, Java Studio Creator, Sun App server 8.2. I am trying to add Jasper Reports to my project and am having problems when I try to access any of the Jasper functions. After several unsuccessful attempts to make a compiled report work, I backed off to use one of the demo examples: JasperPrint jp = JasperCompileManager( reportName, new HashMap(), new JREmptyDataSource()); JasperViewer.viewReport(jp, true); As soon as I attempt to execute the JasperCompileManager, I get the following error from the server: It looks like it can't find the JRXmlLoader.load() method. The JasperReports jar files are in the war file and the load method is in the jar files. Any idea what is happening? Am I doing something wrong here? =============================================== Exception Handler Description: An unhandled exception occurred during the execution of the web application. Please review the following stack trace for more information regarding the error. Exception Details: java.lang.NoClassDefFoundError org/apache/commons/digester/SetNestedPropertiesRule Possible Source of Error: Class Name: net.sf.jasperreports.engine.xml.JRXmlLoader File Name: JRXmlLoader.java Method Name: load Line Number: 202 Source not available. Information regarding the location of the exception can be identified using the exception stack trace below. Stack Trace: net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:202) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167) net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:151) net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:142) istha.SessionBean1.createIoReport(SessionBean1.java:2238) istha.ReportPage.ioCreateReportBtn_action(ReportPage.java:562)
×
×
  • Create New...