Jump to content
Changes to the Jaspersoft community edition download ×

Java_Jasper

Members
  • Posts

    71
  • 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 Java_Jasper

  1. My inital guess would be the path you are using is incorrect, frist check this. As when the XML is executed it cannot find on the classpath said locaiton. Thus the URL path to your XML file must be wrong/ missing. You should post your path you are using. The correct format would look like this: file:///C:/Documents+and+Settings/iReport/ Take note of the '3' slashes and '+' signs for spaces as URLs dont like spaces.
  2. Hmm, so what you are saying is you have 2 reports each with a separate data source. And when you execute both in same window only one data source is available, however separate they behave as expected. It sounds like you are taking about virtual data sources, which is in the commercial 5.0 version only. It allows multiple JDBC and/or JNDI data sources and use the combination as a single data source. Hope this helps.
  3. This may be a bit of a hack but I would recommend you use several group headers, a sub-report (for City) and an ID for each (Province). This will allow for evaluation once per cycle. Example: 1) Make each province ID from the database usable in the sql query Province - Ontario ID = 1 Province - Nova Scotia ID = 2 Province - Quebec ID = 3 In order to make the IDs trigger for each iteration you can use group headers, as they are evaluated once per cycle - per say. 2) Now, insert some group headers more then one. 3) Then place a sub report (for you it would be the City) into the footer and pass into the 'Field' which is $F{ID} This results in a sub report that triggers every time the header is evaluated, and the header will only print at the end of each sub-report. Enjoy!
  4. I belive there are two ways to acomplish this witht he latter being best practices. 1) You could hard code it like so: String date = 14121114235959 $P{FormattedDate} = new SimpleDateFormat("EEEE MMM dd, yyyy") $P{FormattedDate}.format($P{date}) ; 2) Or you could use the JVM But the better choice would be to use the JVM like so: DateFormat.getDateInstance(DateFormat.MEDIUM, $P{REPORT_LOCALE}).format( $F{FormattedDate} ) DateFormat.getDateInstance(DateFormat.LONG, $P{REPORT_LOCALE}).format( $F{FormattedDate} ) This way it automatically reflects formatting choices already chosen by the user on his own PC. Enjoy!
  5. You will want to use a servlet, for this. public void doGet( HttpServletRequest request, HttpServletResponse response) throws ServeltException, IOException { String directory = " "; directory = request.getPram("dir"); --your defined direcotry on your system. paramater = new HashMap(subReport(direcory)); -- this will define your sub report as a paramater in a hash map } Where subReport is the method: public Map subReport(String direcotry) throws JRExcption, FileNotFoundExcption { String japerFile = directory + " Name_of_your_file "; JaperDesign subReportDef = JRXmlLoader.load(new FileInputStream(new File( jasperFile))); JasperReport subReport = JasperCompilerManager.compileReport( subReportDef ); Map result = new HashMap(); result.put( "paramater_name_in_jasper_template, subReport); return result; } Enjoy!
  6. I am glad you found the problem, based on my reply.
  7. Yes it is possible, but not recommended; everything but the main report connection must be defined within a parameter, and unless JNDI name spaces are configured for the various data sources, usernames and passwords must be stored within the JRXML itself; which for various reasons is not good design practice. Jasper is intended to use one datasource per report This info was obtained via "gertbeedfrobe" Enjoy!
  8. Hello, You will need to do something like this example: SimpleDateFormat("dd/MM/yy").parse("01/01/01") Where the fields evaluation time needs to be set to "Report" & Calculation Type to "First" & reset type = "None". Below is an example of use: (New SimpleDateFormat("dd/mm/yy").format($F{birthDate}) Enjoy!
  9. A thread I posted a while ago concerning such a task. http://community.jaspersoft.com/questions/542773/blob-jrdesignimage Here is a video on how to do such a task. http://ireport-tutorial.blogspot.com/2008/11/show-blob-image-in-ireport.html Enjoy!
  10. Not sure if this is possible, but here is some documentation on it. http://community.jaspersoft.com/documentation/jasperreports-server-user-guide/ad-hoc-view-panel Enjoy!
  11. Hello, Here is a link to get you started, a quick tutorial. http://www.tutorialspoint.com/jasper_reports/jasper_crosstabs.htm B.
  12. Hello, This link may help. http://community.jaspersoft.com/wiki/using-custom-bean-definitions-file-50 Enjoy!
  13. Hello, Is the font you spoke of in the Windows font folder as well? B.
  14. Hello, Sure this can be done, follow the steps in this link. http://community.jaspersoft.com/wiki/how-set-role-based-jasperreports-server-home-pages Enjoy!
  15. No, You will need to use a subreport. Think of the template as a script, it will run from begning to end, and repeat. Enjoy!
  16. Hello, Your system is using an incompatible SAX Parser (there are many implementations). You can either track down and remove the jar that isn't working from your classpath or override the default setting as follows: java -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl This will set the default parser to Xerces which will work with JasperReports / iReports. For iReports, this should work: iReports.sh -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl Enjoy!
  17. Hello, Check out this link and see if you can help your problem. http://community.jaspersoft.com/questions/542548/problems-displaying-pdf Enjoy!
  18. Here is the actual code for JRPrintText: http://www.javadocexamples.com/net/sf/jasperreports/engine/net.sf.jasperreports.engine.JRPrintText-source.html#line./var/www/javadocexamples.com/src/net/sf/jasperreports/engine/JRPrintText.java:37 B.
  19. Check out this link for more: http://www.javadocexamples.com/net/sf/jasperreports/engine/net.sf.jasperreports.engine.JRPrintText.html B.
  20. I would start by looking at JRPrintText() net.sf.jasperreports.engine.JRPrintElement This may lead to some help.
  21. Hello, JR does no have this functionality, you will need to use JFreeChart along with JRs "Chart Customizers" Here is an example: The Class: package yourPackage; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.LogarithmicAxis; import net.sf.jasperreports.engine.JRAbstractChartCustomizer; import net.sf.jasperreports.engine.JRChart; public class MyChartCustomizerLogXAxis extends JRAbstractChartCustomizer { JFreeChart chart; public void customize(JFreeChart chart, JRChart jrChart); } public void customize(JFreeChart chart, JRChart jrChart) { final CategoryAxis categoryAxis = new CategoryAxis("Category"); final ValueAxis valueAxis = new LogarithmicAxis("Percentage (%)"); this.chart = chart; LogarithmicAxis logScale = new LogarithmicAxis("Percentage (%)"); logScale.setStrictValuesFlag(false); logScale.setAutoTickUnitSelection(true); logScale.autoAdjustRange(); chart.getCategoryPlot().setRangeAxis(logScale); categoryAxis.setUpperMargin(0.5); } You will however need to customize this for your needs, hope it helps Enjoy!
  22. Hello, My first guess when seeing repeted values is a group is triggering for every iteration of the main report thus giving you 92 pages of repeted information. I would double check the bands you are using are in fact triggering in the order you think they should. A simple way to do this just of the top of my head would to be, create a group and in the group header place the main report, then in the group footer place the subreports. Thus not using the detail band, which wants to run every iteration of the main group. B.
×
×
  • Create New...