Examples of ReportDefinition


Examples of com.google.api.ads.adwords.lib.jaxb.v201306.ReportDefinition

        "Impressions",
        "Clicks",
        "Cost"));

    // Create report definition.
    ReportDefinition reportDefinition = new ReportDefinition();
    reportDefinition.setReportName("Criteria performance report #" + System.currentTimeMillis());
    reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.YESTERDAY);
    reportDefinition.setReportType(ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT);
    reportDefinition.setDownloadFormat(DownloadFormat.CSV);
    // Enable to allow rows with zero impressions to show.
    reportDefinition.setIncludeZeroImpressions(false);
    reportDefinition.setSelector(selector);

    try {
      // Set the property api.adwords.reportDownloadTimeout or call
      // ReportDownloader.setReportDownloadTimeout to set a timeout (in milliseconds)
      // for CONNECT and READ in report downloads.
View Full Code Here

Examples of com.google.api.ads.adwords.lib.jaxb.v201309.ReportDefinition

        "Impressions",
        "Clicks",
        "Cost"));

    // Create report definition.
    ReportDefinition reportDefinition = new ReportDefinition();
    reportDefinition.setReportName("Criteria performance report #" + System.currentTimeMillis());
    reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.YESTERDAY);
    reportDefinition.setReportType(ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT);
    reportDefinition.setDownloadFormat(DownloadFormat.CSV);
    // Enable to allow rows with zero impressions to show.
    reportDefinition.setIncludeZeroImpressions(true);
    reportDefinition.setSelector(reportSelector);

    ReportDownloadResponse response =
        new ReportDownloader(session).downloadReport(reportDefinition);
    if (response.getHttpStatus() == HttpURLConnection.HTTP_OK) {
      FileOutputStream fos = new FileOutputStream(new File(reportFile));
View Full Code Here

Examples of com.google.api.ads.adwords.lib.jaxb.v201402.ReportDefinition

        "Impressions",
        "Clicks",
        "Cost"));

    // Create report definition.
    ReportDefinition reportDefinition = new ReportDefinition();
    reportDefinition.setReportName("Criteria performance report #" + System.currentTimeMillis());
    reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.YESTERDAY);
    reportDefinition.setReportType(ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT);
    reportDefinition.setDownloadFormat(DownloadFormat.CSV);
    // Enable to allow rows with zero impressions to show.
    reportDefinition.setIncludeZeroImpressions(false);
    reportDefinition.setSelector(selector);

    try {
      // Set the property api.adwords.reportDownloadTimeout or call
      // ReportDownloader.setReportDownloadTimeout to set a timeout (in milliseconds)
      // for CONNECT and READ in report downloads.
View Full Code Here

Examples of com.google.api.ads.adwords.lib.jaxb.v201406.ReportDefinition

        "ValuePerEstimatedTotalConversion",
        "ViewThroughConversions"
    ));

    // Create report definition.
    ReportDefinition reportDefinition = new ReportDefinition();
    reportDefinition.setReportName("Criteria performance report #" + System.currentTimeMillis());
    reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.YESTERDAY);
    reportDefinition.setReportType(ReportDefinitionReportType.CAMPAIGN_PERFORMANCE_REPORT);
    reportDefinition.setDownloadFormat(DownloadFormat.XML);
    // Enable to allow rows with zero impressions to show.
    reportDefinition.setIncludeZeroImpressions(true);
    reportDefinition.setSelector(selector);

    try
    {
      // Set the property api.adwords.reportDownloadTimeout or call
      // ReportDownloader.setReportDownloadTimeout to set a timeout (in milliseconds)
View Full Code Here

Examples of com.google.api.adwords.v201306.jaxb.cm.ReportDefinition

      fields.add("Impressions");
      fields.add("Clicks");
      fields.add("Cost");

      // Create report definition.
      ReportDefinition reportDefinition = new ReportDefinition();
      reportDefinition.setReportName("Keywords performance report #" + System.currentTimeMillis());
      reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.YESTERDAY);
      reportDefinition.setReportType(ReportDefinitionReportType.KEYWORDS_PERFORMANCE_REPORT);
      reportDefinition.setDownloadFormat(DownloadFormat.CSV);
      reportDefinition.setIncludeZeroImpressions(false);
      reportDefinition.setSelector(selector);

      FileOutputStream fos = new FileOutputStream(new File(reportFile));
      ReportDownloadResponse response = ReportUtils.downloadReport(user, reportDefinition, fos);
      if (response.getHttpStatus() == HttpURLConnection.HTTP_OK) {
        System.out.println("Report successfully downloaded: " + reportFile);
View Full Code Here

Examples of com.google.api.adwords.v201309.jaxb.cm.ReportDefinition

      fields.add("Impressions");
      fields.add("Clicks");
      fields.add("Cost");

      // Create report definition.
      ReportDefinition reportDefinition = new ReportDefinition();
      reportDefinition.setReportName("Keywords performance report #" + System.currentTimeMillis());
      reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.YESTERDAY);
      reportDefinition.setReportType(ReportDefinitionReportType.KEYWORDS_PERFORMANCE_REPORT);
      reportDefinition.setDownloadFormat(DownloadFormat.CSV);
      reportDefinition.setIncludeZeroImpressions(false);
      reportDefinition.setSelector(selector);

      FileOutputStream fos = new FileOutputStream(new File(reportFile));
      ReportDownloadResponse response = ReportUtils.downloadReport(user, reportDefinition, fos);
      if (response.getHttpStatus() == HttpURLConnection.HTTP_OK) {
        System.out.println("Report successfully downloaded: " + reportFile);
View Full Code Here

Examples of com.googlecode.g2re.domain.ReportDefinition

    }
   
    public ReportDefinition getPetLocationReport() {

        /* creat report */
        ReportDefinition report = new ReportDefinition();
        report.setName("Pet Location Report");
        report.setDescription("desc goes here");
        report.setAuthor("Brad Rydzewski");

        /* Create and add JDBC connection */
        JdbcConnection conn = getJdbcConnection();
        report.getDataConnections().add(conn);

        /* create report params */
        ReportParameterTextBox minParam = new ReportParameterTextBox();
        minParam.setName("Minimum Price");
        minParam.setPrompt("Enter the minimum price range");
        minParam.setValue(0);
        minParam.setRequired(true);
        ReportParameterTextBox maxParam = new ReportParameterTextBox();
        maxParam.setName("Maximum Price");
        maxParam.setPrompt("Enter the maximum price range");
        maxParam.setValue(999999999);
        maxParam.setRequired(true);
       
        /* add params to report */
        report.getReportParameters().add(minParam);
        report.getReportParameters().add(maxParam);

        /* Sql syntax for 1st query */
        String sqlA = new StringBuffer()
                .append("SELECT item.name, item.description, categoryid, price, imagethumburl, city, state, zip ")
                .append("FROM item, address, product ")
                .append("WHERE item.address_addressid = address.addressid ")
                .append("AND item.productid = product.productid ")
                .append("AND price between ? and ?").toString();
       
        /* Create a jdbc sql query and add to the report */
        JdbcQuery queryA = new JdbcQuery();
        queryA.setDataConnection(conn);
        queryA.setName("PetLocationQuery");
        queryA.setSqlQuery(sqlA);
        DataColumn col1 = new DataColumn("Name", 0, DataType.STRING);
        DataColumn col2 = new DataColumn("Description", 1, DataType.STRING);
        DataColumn col3 = new DataColumn("Category", 2, DataType.STRING);
        DataColumn col4 = new DataColumn("Price", 3, DataType.DOUBLE);
        DataColumn col5 = new DataColumn("Image", 4, DataType.STRING);
        DataColumn col6 = new DataColumn("City", 5, DataType.STRING);
        DataColumn col7 = new DataColumn("State", 6, DataType.STRING);
        DataColumn col8 = new DataColumn("Zip", 7, DataType.STRING);
        queryA.getColumns().add(col1);
        queryA.getColumns().add(col2);
        queryA.getColumns().add(col3);
        queryA.getColumns().add(col4);
        queryA.getColumns().add(col5);
        queryA.getColumns().add(col6);
        queryA.getColumns().add(col7);
        queryA.getColumns().add(col8);
        queryA.getParameters().add(new JdbcParameter(1, DataType.INTEGER, minParam));
        queryA.getParameters().add(new JdbcParameter(2, DataType.INTEGER, maxParam));
        report.getDataQueries().add(queryA);
       
       
        /* create data table, set the data query */
        DataTable table = new DataTable();
        table.setCellPadding(1);
        table.setDataQuery(queryA);

        /* create table header rows */
        GridRow tableHeader = new GridRow();
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Name")));
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Description")));
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("City")));
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("State")));
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Zip")));
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Price")));
        tableHeader.addCell(new com.googlecode.g2re.html.GridCell(new RawHTML("Image")));
        table.getHeaderRows().add(tableHeader);

        /* create table body rows */
        GridRow tableBody = new GridRow();
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(new DataElement(col1, 0)));
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(new DataElement(col2, 1)));
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(new DataElement(col6, 2)));
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(new DataElement(col7, 3)));
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(new DataElement(col8, 4)));
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(new DataElement("\"<img src='\" + row[4].toString() + \"' />\"",6)));
       
        /* add formatted price column */
        DataElement priceCellElement = new DataElement(col4, 5);
        priceCellElement.setNumberFormat("$###,###,###,##0.00");
        tableBody.addCell(new com.googlecode.g2re.html.GridCell(priceCellElement));
       
        /* add rows to table */
        table.getBodyRows().add(tableBody);

        /* add the table to the report */
        report.getWebPage().addChildElement(table);
       
        /* create and add a map */
        Map m = new Map();
        m.setDataQuery(queryA);
        m.setMapType(MapType.normal);
View Full Code Here

Examples of com.javaeye.jert.domain.ReportDefinition

*/
public class ReportInstanceTest extends DatabaseTestCase {
    private static final String CREATE_TABLE = "DROP TABLE USER IF EXISTS; CREATE TABLE USER (USER_NAME varchar(255), EMAIL varchar(255));";
   
    public void testGenerateStaticQueryReport() {
        ReportDefinition rd = getReportDefinition();

        ReportInstance instance = new ReportInstance(2);
        instance.setReportDefinition(rd);
        instance.generateItems(null);
        ResultSetOutput output = instance.getResultSetOutput();
View Full Code Here

Examples of com.projity.configuration.ReportDefinition

  }

  public void restoreWorkspace(WorkspaceSetting w, int context) {
    Workspace ws = (Workspace)w;
    if (ws.reportName != null) {
      ReportDefinition def = ReportUtil.getFromName(ws.reportName);
      if (def != null)
        reportChoice.setSelectedItem(def);
    }
    if (ws.fieldArrayName != null) {
      SpreadSheetFieldArray s = (SpreadSheetFieldArray) Dictionary.get(reportDefinition.getMainSpreadsheetCategory(),ws.fieldArrayName);
View Full Code Here

Examples of org.opentides.bean.ReportDefinition

           *
           *  :[paramName] - where paramName will be replaced by the value passed as parameter to the jasper
           *    report with the same name as [paramName]
           */
          // add to missingParameter
          ReportDefinition missed = new ReportDefinition();
          // set the name
          missed.setName(name.getValue());
          // set the class
          Attribute clazz = elem.attribute("class");
          missed.setClazz(clazz.getValue());
          List<Element> props =elem.elements("property");
          Properties property = new SortedProperties();
          for (Element prop:props) {
            String propName = prop.attributeValue("name");
            String propValue = prop.attributeValue("value");
            if ("prompt.type".equals(propName)) {
              missed.setType(propValue);
            } else if ("prompt.query".equals(propName)) {
              // extract the native query to database             
              String queryName = propValue;
              if(!StringUtil.isEmpty(queryName)){
                //try to match :[paramName]
                Matcher matcher = Pattern.compile(":(\\w+)").matcher(queryName);
                while (matcher.find()) {
                  String paramName = matcher.group(0).substring(1);
                  if (!StringUtil.isEmpty(paramName) && requestParams.get(paramName)!=null){
                    String[] paramValueArr = requestParams.get(paramName);
                    String paramValue = StringUtil.explode(',', paramValueArr);
                    queryName = queryName.replaceAll(":" + paramName, paramValue);
                  }
                }
              }
             
              List<Object[]> rs = ((ReportDAO) getDao()).getParamOptionResults(queryName);
              for (Object[] option : rs) {
                property.put(Long.valueOf(option[1].toString()), option[0].toString());
              }
            }else if("prompt.command".equals(propName)){
              missed.setType(propName);
              property.put(propValue, dynamicParameters.get(propValue));
            }else
              property.put(propName, propValue);
          }
          missed.setProperties(property);
          missing.add(missed);
        }
      }
      if (!requestParams.containsKey(DynamicReport.REPORT_FORMAT)) {
        ReportDefinition missed = new ReportDefinition();
        missed.setName("reportFormat");
        missed.setClazz("java.lang.String");
        missed.setType("dropdown");
        Properties props = new Properties();
        props.put(DynamicReport.FORMAT_EXCEL, "Excel");
        props.put(DynamicReport.FORMAT_HTML, "Html");
        props.put(DynamicReport.FORMAT_IMAGE, "Graph Image");
        props.put(DynamicReport.FORMAT_PDF, "PDF");
        missed.setProperties(props);
        missing.add(missed);
      }
    } catch (DocumentException e) {
      _log.error(e,e);
    }
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.