Examples of JasperPrint


Examples of dori.jasper.engine.JasperPrint

      msg = "Cannot find jasper file: " + jasperFileName;
      System.out.println(msg);
      return;
    }

    JasperPrint jasperPrint = null;
    try {
      jasperPrint =
        JasperFillManager.fillReport(
          jasperFileName,
          null,
View Full Code Here

Examples of net.sf.jasperreports.engine.JasperPrint

        try {
            FastReportBuilder reportBuilder = new FastReportBuilder();
            reportBuilder.setTitle("IWebMvc - Sample Grid Report").setSubtitle("Generated at " + new Date()).setUseFullPageWidth(true);
            for (String column : data.getColumns()) reportBuilder.addColumn(column, column, String.class.getName(), 1);
            JRDataSource ds = new JRBeanCollectionDataSource(data.getData(), false);
            JasperPrint jp = DynamicJasperHelper.generateJasperPrint(reportBuilder.build(), new ClassicLayoutManager(), ds);
            return "EXCEL".equals(docType) ? exportToExcel(jp) : exportToPDF(jp);
        } catch (Exception e) {
            throw new IWebMvcException("Error building grid report", e);
        }
    }
View Full Code Here

Examples of net.sf.jasperreports.engine.JasperPrint

  /**
   *
   */
  protected void convert(boolean ignoreContent)
  {
    jasperPrint = new JasperPrint();
   
    jasperPrint.setDefaultFont(report.getDefaultFont());
    jasperPrint.setFormatFactoryClass(report.getFormatFactoryClass());
    //FIXME locale and timezone settings jasperprint object
    //jasperPrint.setLocaleCode(JRDataUtils.getLocaleCode(Locale.getDefault()));
View Full Code Here

Examples of net.sf.jasperreports.engine.JasperPrint

        try
        {
          System.out.print("File : " + srcFileName + " ... ");

          JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(srcFileName);
         
          JasperExportManager.exportReportToXmlFile(jasperPrint, destFileName, false);
         
          System.out.println("OK.");
        }
View Full Code Here

Examples of net.sf.jasperreports.engine.JasperPrint

   */
  public Object createObject(Attributes atts)
  {
    JRPrintText element = (JRPrintText) digester.peek();
    JRPrintXmlLoader printXmlLoader = (JRPrintXmlLoader)digester.peek(digester.getCount() - 1);
    JasperPrint jasperPrint = (JasperPrint)digester.peek(digester.getCount() - 2);

    if (atts.getValue(JRXmlConstants.ATTRIBUTE_reportFont) != null)
    {
      Map fontsMap = jasperPrint.getFontsMap();

      if ( !fontsMap.containsKey(atts.getValue(JRXmlConstants.ATTRIBUTE_reportFont)) )
      {
        printXmlLoader.addError(new JRRuntimeException("Unknown report font : " + atts.getValue(JRXmlConstants.ATTRIBUTE_reportFont)));
      }
View Full Code Here

Examples of net.sf.jasperreports.engine.JasperPrint

public class JRPrintFrameFactory extends JRBaseFactory
{

  public Object createObject(Attributes attributes)
  {
    JasperPrint jasperPrint = (JasperPrint)digester.peek(digester.getCount() - 2);

    return new JRBasePrintFrame(jasperPrint.getDefaultStyleProvider());   
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JasperPrint

  /**
   *
   */
  public Object createObject(Attributes atts)
  {
    JasperPrint jasperPrint = (JasperPrint)digester.peek(digester.getCount() - 2);

    JRBasePrintEllipse ellipse = new JRBasePrintEllipse(jasperPrint.getDefaultStyleProvider());
   
    return ellipse;
  }
View Full Code Here

Examples of net.sf.jasperreports.engine.JasperPrint

  /**
   *
   */
  public Object createObject(Attributes atts)
  {
    JasperPrint jasperPrint = (JasperPrint)digester.peek(digester.getCount() - 2);

    JRBasePrintText text = new JRBasePrintText(jasperPrint.getDefaultStyleProvider());

    HorizontalAlignEnum horizontalAlignment = HorizontalAlignEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_textAlignment));
    if (horizontalAlignment != null)
    {
      text.setHorizontalAlignment(horizontalAlignment);
View Full Code Here

Examples of net.sf.jasperreports.engine.JasperPrint

  }


  public static JRPrintImage getImage(List jasperPrintList, JRPrintElementIndex imageIndex)
  {
    JasperPrint report = (JasperPrint)jasperPrintList.get(imageIndex.getReportIndex());
    JRPrintPage page = (JRPrintPage)report.getPages().get(imageIndex.getPageIndex());

    Integer[] elementIndexes = imageIndex.getAddressArray();
    Object element = page.getElements().get(elementIndexes[0].intValue());

    for (int i = 1; i < elementIndexes.length; ++i)
View Full Code Here

Examples of net.sf.jasperreports.engine.JasperPrint

  /**
   *
   */
  public Object createObject(Attributes atts)
  {
    JasperPrint jasperPrint = (JasperPrint)digester.peek(digester.getCount() - 2);

    JRBasePrintImage image = new JRBasePrintImage(jasperPrint.getDefaultStyleProvider());

    // get image attributes
    ScaleImageEnum scaleImage = ScaleImageEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_scaleImage));
    if (scaleImage != null)
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.