Jump to content

shekhar

Members
  • Posts

    18
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by shekhar

  1.  

    HI Experts,

    Please refer my screen shots for more understanding

    The issue here is using Asian language jasper report viewer showing all the Asian language  perfectly but when i export it into pdf format file the content alignment is totally chopped into second line (marked in RED)

    Previous version of jasper report 3.0.0  there is no issue at all but after upgrading into 4.0.2 problem started.

    Please help me what i need to update...

    Cheers Shekhar.

     

     

     

     



    Post Edited by rshekhar2000 at 09/28/2011 07:08



    Post Edited by rshekhar2000 at 09/28/2011 07:10
  2. Hi Ganapathi,

    For A3 paper this is the size Width 842 Height 1190 pixels by default, if you try to increase or decrease the settings, the system will take it as a custom paper.

    Cheers, Shekhar
     

  3. HI, You need to change the page size proprety it is very import what size you fix for A4 also orientation should be landscape, please refer my screen shot for your more understanding. thanks :)

     

  4.  Hi,

    Yes, please take look at this class  MediaSize for more details. You can customize your media size as you want or you can use standard ISO sizes. i hope the following code could help you. :)

    JasperDesign jasperDesign = JRXmlLoader.load(filename.jrxml);
       

    JasperReport jasRep = JasperCompileManager.compileReport(jasperDesign);

    JasperPrint jasPrnt = JasperFillManager.fillReport(jasRep, null ,con);

    PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();

    MediaSizeName mediaSizeName = MediaSize.ISO.A4.getMediaSizeName();


    printRequestAttributeSet.add(mediaSizeName);


    JRPrintServiceExporter exporter = new JRPrintServiceExporter();

    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);


    exporter.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET,
           printRequestAttributeSet);
    exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG,
         Boolean.FALSE);
    exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG,
         Boolean.FALSE);
       
    exporter.exportReport();



    Post Edited by rshekhar2000 at 04/09/2010 09:02



    Post Edited by rshekhar2000 at 04/09/2010 09:03
  5. Hi,

    We are having mulitithread report generating environment and our main report XXX.jrxml calling subreport called YYYY.jasper. the problem here is that in the (Thread) object JasperFillManager accessing the XXX.jrxml file concurrently one of the thread successfully generated report file and anther thread encountering the java.io.FileNotFoundException for subreport file. i hope it is (file) resource sharing problem, Could any one help me. thanks

  6. I'm not sure about your problem but we can set the MediaSizeName, here is the code will look like this
    ... instead of JasperPrinterManager use JRPrintServiceExporter


    i hope this solve your problem. :)

     

     

     

     

     

     

     

    Code:
    JasperDesign  jasperDesign = JRXmlLoader.load(f);JasperReport  jasperReport = JasperCompileManager.compileReport(jasperDesign);JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,parameters,con);PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();   MediaSizeName mediaSizeName = MediaSize.ISO.A4.getMediaSizeName(); printRequestAttributeSet.add(mediaSizeName);  printRequestAttributeSet.add(new Copies(1));JRPrintServiceExporter exporter = new JRPrintServiceExporter();exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);exporter.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET,       printRequestAttributeSet);exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG,     Boolean.FALSE);exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG,     Boolean.FALSE);exporter.exportReport();
  7. I have a problem in splitting the string

    Assume my below query return’s me 3 rows with the address details

    Select add, from add_tbl

    But the ‘add’ column having data like

     

    Row 1. #15 South street, Bendfast Area, 500402

    Row 2. Chennai

    Row 3 India

     

    In ireport side I need to split those add data and display it in following manner into detail band

     

    Address #15 South street,

    Bendfast Area,

    500402

    Chennai

    India

     

    pls help me with sample

  8. I’m generating A4 paper PDF report and printing through AcroRd32.exe which is printing without any print range problem but when I try to print JRPrintServiceExporter the print range is not correct and print out is going out the A4 size paper

    This is my code

     

    Code:
    JasperReport jasRep = null;
    JasperPrint jasperPrint = null;
    JasperDesign jasperDesign = null;

    try {
    jasperDesign = JRXmlLoader

    .load(“std_delivery_note.jrxmlâ€);

    jasRep = JasperCompileManager.compileReport(jasperDesign);
    jasperPrint = JasperFillManager.fillReport(jasRep, parameters, db
    .getConnection());

    PrinterJob job = PrinterJob.getPrinterJob();
    PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
    int selectedService = 0;
    for(int i = 0; i <services.length;i++){
    if(services.getName().contains("HP"«»)){
    selectedService = i;
    }
    }

    System.out.println("Selected " + services[selectedService].getName());


    job.setPrintService(services[selectedService]);
    PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();
    MediaSizeName mediaSizeName = MediaSize.ISO.A4.getMediaSizeName();
    printRequestAttributeSet.add(mediaSizeName);
    printRequestAttributeSet.add(new Copies(1));


    JRPrintServiceExporter exporter;
    exporter = new JRPrintServiceExporter();
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE, services[selectedService]);
    exporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE_ATTRIBUTE_SET, services[selectedService].getAttributes());
    exporter.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET, printRequestAttributeSet);
    exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);
    exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.FALSE);

    exporter.exportReport();
    System.out.println("Done"«»);
    } catch (JRException e) {
    // lg.error(prog, module + ", Error" + e.getMessage());
    System.out.println("ERRor " + e.getMessage());
    } catch (PrinterException e) {
    // lg.error(prog, module + ", Error" + e.getMessage());
    System.out.println("ERRor " + e.getMessage());
    }

     

    Please help me whether am I missing any print range property :(

×
×
  • Create New...