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

finnhawk

Members
  • Posts

    15
  • 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 finnhawk

  1. For example, if the following crosstab design was used in a report template: size=393]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/crosstab2-8236a48d9f0cfd8c3de3d32e5eb35030.jpg Post edited by: finnhawk, at: 2007/05/01 19:39
  2. 2006 JR Help wrote: By: Maximiliano Ferreira Guzenski - maxguzenski Crosstab with autoresizing column width 2006-03-02 09:34 The question is, jasper´s crosstab implementation can dynamically redistribute its columns to fit the details space? By: Lucian Chirita - lucianc RE: Crosstab with autoresizing column width 2006-03-03 02:05 Hello I'm not sure what you're trying to do.. What do you mean by redistributing the crosstab columns? I would also like to know if this is possible, and, if not, request that it be added as a feature, if possible. We mean this: If the following crosstab design was used in a report template: size=393]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/crosstab2.jpg Post edited by: finnhawk, at: 2007/05/01 19:42
  3. xourge wrote: the other thing i want to do is make the crosstab table be always width 100% but the number of columns is variable, is there a way to make sure each column has a % enough so they all make width 100% together? I would also like to know if this is possible, and, if not, request that it be added as a feature, if possible. It would be nice if you could force all the columns of a crosstab to always use up all available space, regardless of how many columns are added. see next post for example... Post edited by: finnhawk, at: 2007/05/01 19:38
  4. Nevermind... I figured out that I just had to check the "Data is Presorted" check box in the Crosstab Dataset Properties (in iReport). man... iReport is a pain to learn with so many settings in so many different places...
  5. I've made a crosstab and I want the columns to be displayed from left to right in the order that I add them in, NOT in sorted order... I don't understand why the only options for the "Order" drop down menu in the "Add/Modify Crosstab Group" is Ascending and Descending. What about NO sorter order!? Why isn't that an option? Same questions goes for the row header too actually... Sal Post edited by: finnhawk, at: 2007/04/26 18:18
  6. EDIT: Ignore the following... Actually I managed to get it working!! I am wondering if there a way to populate a crosstab without connecting to a database? Most of my data isn't in a database (well it is, but as a synchronized java object, not as tables & columns). Post edited by: finnhawk, at: 2007/04/24 23:09
  7. PAGE 2 [file name=page2.jpg size=128358]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/page2.jpg[/file]
  8. The PDF was too large so I took screenshots of the first two pages attached to this message and the next. PAGE 1 [file name=page1.jpg size=142529]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/page1.jpg[/file] Post edited by: finnhawk, at: 2007/04/23 16:07
  9. teodord wrote: Hi, You could copy JRPrintPage objects from one JasperPrint to another. It would probably make sense to copy report styles too. This is not tested, but chances are hight it would work. I hope this helps. Teodor I tried this, but it didn't work for me. The final report had the right number of pages, but every page was blank. I've attached a PDF example of the final output that I'm looking for that I created using another reporting tool (ReportMill). However, we would prefer to use an open-source solution if we can get it to work. I want to be able to view the full report (all pages) in JasperViewer not just export to PDF. Basically, each page is it's own report, so I want to combine multiple one page reports into one full report. Here's my code. Am I doing something wrong? Code:ArrayList ReportPages = new ArrayList(); for (int a=0; a < testTypes.length; a++) { Map paramMap = new HashMap(); paramMap.put("Test Type", testTypes[a].type.toString()); paramMap.put("chart", testTypes[a].getImage()); Map map = new HashMap(); map.put("variable", "Average"«»); map.put("value", testTypes[a].getAverage()); varList.add(map); map = new HashMap(); map.put("variable", "Best"«»); map.put("value", testTypes[a].getBest()); varList.add(map); JRMapCollectionDataSource dataSource = new JRMapCollectionDataSource(varList); JasperPrint print = JasperFillManager.fillReport("Report.jasper", paramMap, dataSource); reportPages.add(print); } JasperPrint report = new JasperPrint(); for (int a=0; a < reportPages.size(); a++) { JasperPrint typeReport = (JasperPrint) reportPages.get(a); ArrayList list = (ArrayList) typeReport.getPages(); for (int j=0; j < list.size(); j++) { report.addPage((JRPrintPage) list.get(j)); } } JasperViewer jasperViewer = new JasperViewer(report, false); jasperViewer.setVisible(true);
  10. Well, I got it to work by taking out the line: JasperFillManager.fillReportToFile("Report.jasper", new HashMap(), dataSource); What is it even supposed to do and why would it interfere with PDF file creation? Post edited by: finnhawk, at: 2007/04/19 22:34
  11. I'm getting REALLY frustrated here... I need to be able to use a Map or Collection as a Data Source. But when I compile the following jrxml file and run the following java code, I get a blank report. If I change the Data Source to use new JREmptyDataSource() then I get the columns with one row of null values, so I guess there something wrong with my Map but I don't understand what!? What's going on? Report.jrxml Code:<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="Report"> <field name="one" class="java.lang.String" /> <field name="two" class="java.lang.String" /> <pageHeader> <band height="30"> <staticText> <reportElement x="0" y="0" width="69" height="24" /> <text><![CDATA[ColumnOne: ]]></text> </staticText> <staticText> <reportElement x="140" y="0" width="79" height="24" /> <text><![CDATA[ColumnTwo: ]]></text> </staticText> </band> </pageHeader> <detail> <band height="30"> <textField> <reportElement x="0" y="0" width="69" height="24" /> <textFieldExpression class="java.lang.String"><![CDATA[$F{one}]]></textFieldExpression> </textField> <textField> <reportElement x="140" y="0" width="69" height="24" /> <textFieldExpression class="java.lang.String"><![CDATA[$F{two}]]></textFieldExpression> </textField> </band> </detail> </jasperReport> Report.java Code:[code]import net.sf.jasperreports.engine.*; import net.sf.jasperreports.engine.data.*; public class Report { public Report() { HashMap[] row = new HashMap[2]; row[0] = new HashMap(); row[0].put("one", "Mike"«»); row[0].put("two", "Smith"«»); row[1] = new HashMap(); row[1].put("one", "John"«»); row[1].put("two", "Jones"«»); JRMapArrayDataSource dataSource = new JRMapArrayDataSource(row); try { JasperFillManager.fillReportToFile("Report.jasper", new HashMap(), dataSource); JasperRunManager.runReportToPdfFile("Report.jasper", new HashMap(), dataSource); JasperRunManager.runReportToHtmlFile("Report.jasper", new HashMap(), dataSource); } catch(Exception e) { e.printStackTrace(); } } }
×
×
  • Create New...