Jump to content
Changes to the Jaspersoft community edition download ×

xml datasourse for python


raul.mendez

Recommended Posts

Hi everyone,

I'm trying to use a xml datasourse in python code for openerp, so I want to use a xml generated as datasource and fill my report. The following code is used to that purpose but it is used in java code, does someone now how to convert to python?

public void fill() throws JRException  {    long start = System.currentTimeMillis();    Map params = new HashMap();    Document document = JRXmlUtils.parse(JRLoader.getLocationInputStream("data/northwind.xml"));    params.put(JRXPathQueryExecuterFactory.PARAMETER_XML_DATA_DOCUMENT, document);    params.put(JRXPathQueryExecuterFactory.XML_DATE_PATTERN, "yyyy-MM-dd");    params.put(JRXPathQueryExecuterFactory.XML_NUMBER_PATTERN, "#,##0.##");    params.put(JRXPathQueryExecuterFactory.XML_LOCALE, Locale.ENGLISH);    params.put(JRParameter.REPORT_LOCALE, Locale.US);    JasperFillManager.fillReportToFile("build/reports/CustomersReport.jasper", params);    System.err.println("Filling time : " + (System.currentTimeMillis() - start));  }[/code]

Thank you.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...