Package net.sf.jasperreports.engine.data

Examples of net.sf.jasperreports.engine.data.JsonDataSource


  public JRDataSource createDatasource() throws JRException
  {
    InputStream jsonInputStream = (InputStream) getParameterValue(JsonQueryExecuterFactory.JSON_INPUT_STREAM);
    if (jsonInputStream != null) {
      datasource = new JsonDataSource(jsonInputStream, getQueryString());
    } else {
      String jsonSource = getStringParameterOrProperty(JsonQueryExecuterFactory.JSON_SOURCE);
      if (jsonSource != null) {
          datasource = new JsonDataSource(jsonSource, getQueryString());
      } else {
        if (log.isWarnEnabled()) {
          log.warn("No JSON source was provided.");
        }
      }
View Full Code Here


                final JRXmlDataSource jrXmlDataSource = new JRXmlDataSource(resourceInputStream);
                setCommonJRDataSourceProperties(jrXmlDataSource);
                return jrXmlDataSource;
            }
            if (res.endsWith(".json")) {
                final JsonDataSource jsonDataSource = new JsonDataSource(resourceInputStream);
                setCommonJRDataSourceProperties(jsonDataSource);
                return jsonDataSource;
            }
            throw SupportMessages.MESSAGES.invalidReaderWriterProperty(null, resource, "resource");
        } else {
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.data.JsonDataSource

Copyright © 2018 www.massapicom. 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.