net.sf.jasperreports.engine.JREmptyDataSource Java Examples
The following examples show how to use
net.sf.jasperreports.engine.JREmptyDataSource.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XChartApp.java From jasperreports with GNU Lesser General Public License v3.0 | 6 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); Map<String, Object> parameters = new HashMap<String, Object>(); try { JRCsvDataSource xyds = new JRCsvDataSource(JRLoader.getLocationInputStream("data/xyDatasource.csv"), "UTF-8"); xyds.setRecordDelimiter("\r\n"); xyds.setUseFirstRowAsHeader(true); parameters.put("xyDatasource", xyds); } catch (Exception e) { throw new JRException(e); } JasperFillManager.fillReportToFile("build/reports/XYChart.jasper", new HashMap<String, Object>(parameters), new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #2
Source File: I18nApp.java From jasperreports with GNU Lesser General Public License v3.0 | 6 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); Locale locale = chooseLocale(); if (locale != null) { // Object[] aw = new Object[] {1000000.45d, "$", "Ferrari", 20, 88}; Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("number", 1234567 + Math.random()); // parameters.put("array", aw); parameters.put(JRParameter.REPORT_LOCALE, locale); JasperFillManager.fillReportToFile("build/reports/I18nReport.jasper", parameters, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); } }
Example #3
Source File: BatchExportApp.java From jasperreports with GNU Lesser General Public License v3.0 | 6 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile( "build/reports/Report1.jasper", null, new JREmptyDataSource(2) ); JasperFillManager.fillReportToFile( "build/reports/Report2.jasper", null, new JREmptyDataSource(2) ); JasperFillManager.fillReportToFile( "build/reports/Report3.jasper", null, new JREmptyDataSource(2) ); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #4
Source File: VirtualizerApp.java From jasperreports with GNU Lesser General Public License v3.0 | 6 votes |
private static JasperPrint fillReport(JRFileVirtualizer virtualizer) throws JRException { long start = System.currentTimeMillis(); // Virtualization works only with in memory JasperPrint objects. // All the operations will first fill the report and then export // the filled object. // creating the data source JRDataSource dataSource = new JREmptyDataSource(1000); // Preparing parameters Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer); // filling the report JasperPrint jasperPrint = JasperFillManager.fillReport("build/reports/VirtualizerReport.jasper", parameters, dataSource); virtualizer.setReadOnly(true); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); return jasperPrint; }
Example #5
Source File: TableApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); Map<String, Object> params = new HashMap<String, Object>(); params.put("TableDataSource", new JREmptyDataSource(50)); JasperFillManager.fillReportToFile("build/reports/TableReport.jasper", params); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #6
Source File: JRViewerMain.java From JasperViewerFx with GNU General Public License v2.0 | 5 votes |
@Override public void start(Stage primaryStage) throws Exception { JasperPrint jasperPrint=null; try { jasperPrint = JasperFillManager.fillReport("target/classes/TestReport.jasper", new HashMap(), new JREmptyDataSource()); } catch (JRException e) { // TODO Auto-generated catch block e.printStackTrace(); }; JRViewerFx viewer = new JRViewerFx(jasperPrint, JRViewerFxMode.REPORT_VIEW,primaryStage); viewer.start(primaryStage); }
Example #7
Source File: HorizontalColumnHeaderTest.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
@Test public void test() { Report report = new Report("net/sf/jasperreports/bands/infinite/repo/ColumnOverflowTest"); report.init(); HashMap<String, Object> params = new HashMap<>(); params.put(JRParameter.REPORT_DATA_SOURCE, new JREmptyDataSource()); report.runReport(params); }
Example #8
Source File: EmptyDataAdapterService.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void contributeParameters(Map<String, Object> parameters) throws JRException { EmptyDataAdapter emptyDataAdapter = getEmptyDataAdapter(); if (emptyDataAdapter != null) { parameters.put(JRParameter.REPORT_DATA_SOURCE, new JREmptyDataSource(emptyDataAdapter.getRecordCount())); } }
Example #9
Source File: LandscapeApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/LandscapeReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #10
Source File: I18nApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fillDefault() throws JRException { long start = System.currentTimeMillis(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("number", 1234567 + Math.random()); JasperFillManager.fillReportToFile("build/reports/I18nReport.jasper", parameters, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #11
Source File: HtmlComponentApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/HtmlComponentReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #12
Source File: XlsFormulaApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/XlsFormulaReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #13
Source File: JFreeChartApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/JFreeChartReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #14
Source File: UnicodeApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/UnicodeReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #15
Source File: StretchApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/StretchReport.jasper", null, new JREmptyDataSource(20)); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #16
Source File: XChartApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/XChartReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #17
Source File: BarbecueApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/BarbecueReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #18
Source File: JavaScriptApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/JavaScriptReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #19
Source File: ImagesApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/ImagesReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #20
Source File: Java5App.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); Map<String,Object> parameters = new HashMap<String,Object>(); parameters.put("greeting", Greeting.bye); JasperFillManager.fillReportToFile("build/reports/Java5Report.jasper", parameters, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #21
Source File: TabularApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/TabularReport.jasper", null, new JREmptyDataSource(50)); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #22
Source File: MapApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/MapReport.jasper", null, new JREmptyDataSource(5)); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #23
Source File: StyledTextApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/StyledTextReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #24
Source File: PdfEncryptApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/PdfEncryptReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #25
Source File: Barcode4JApp.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
/** * */ public void fill() throws JRException { long start = System.currentTimeMillis(); JasperFillManager.fillReportToFile("build/reports/Barcode4JReport.jasper", null, new JREmptyDataSource()); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); }
Example #26
Source File: HomeController.java From training with MIT License | 4 votes |
@RequestMapping(value = "first.pdf", produces = "application/pdf") public ModelAndView exportAPdf(ModelMap modelMap) { modelMap.put("datasource", new JREmptyDataSource()); modelMap.put("format", "pdf"); return new ModelAndView("FirstJasper.jasper", modelMap); }