Package no.ugland.utransprod.util.report

Examples of no.ugland.utransprod.util.report.ReportViewer


          .getBean()).getObject();
      if (externalOrder != null
          && externalOrder.getExternalOrderLines() != null) {
        labelInfo.setText("Genererer fax...");

        ReportViewer reportViewer = new ReportViewer("Fax");

        WindowInterface window;

        if (owner instanceof JDialogAdapter) {
          window = new JDialogAdapter(new JDialog((JDialog) owner
              .getComponent(), "Fax"));
        } else if (owner instanceof JFrameAdapter) {
          window = new JDialogAdapter(new JDialog((JFrame) owner
              .getComponent(), "Fax"));
        } else {
          window = new JInternalFrameAdapter(new JInternalFrame(
              "Fax", true, true, true, true));
          ProTransMain.PRO_TRANS_MAIN.addInternalFrame(window);
        }

        window.add(reportViewer.buildPanel(window));

        try {
          String uglandAddress = ApplicationParamUtil
              .findParamByName("ugland_adresse");
          String uglandFax = ApplicationParamUtil
              .findParamByName("ugland_fax");
          Map<String, Object> parameters = new HashMap<String, Object>();
          parameters.put("ugland_adresse", uglandAddress);
          parameters.put("ugland_fax", uglandFax);

          ArrayListModel list = new ArrayListModel();
          list.addAll(externalOrder.getExternalOrderLines());
          reportViewer.generateProtransReport(
              new FaxTableModel(list), "Fax", ReportEnum.FAX,
              parameters);
          window.pack();
          window.setSize(new Dimension(850, 700));
          Util.locateOnScreenCenter(window);
View Full Code Here


          assembly.getOrder(), vismaOrderLines);

      mailConfig.addToHeading(" for ordrenummer "
          + assembly.getOrder().getOrderNr());

      ReportViewer reportViewer = new ReportViewer("Montering",
          mailConfig);
      List<AssemblyReport> assemblyReportList = new ArrayList<AssemblyReport>();
      assemblyReportList.add(assemblyReport);
      reportViewer.generateProtransReportFromBeanAndShow(
          assemblyReportList, "Montering", ReportEnum.ASSEMBLY, null,
          null, window, true);

    }
  }
View Full Code Here

      owner.setSize(getWindowSize());
    }

    public Object doWork(Object[] params, JLabel labelInfo) {
      labelInfo.setText("Genererer rapport...");
      ReportViewer reportViewer = new ReportViewer(keyReportSetting
          .getReportType().getReportName());
      WindowInterface window;
      window = new JDialogAdapter(Util.getDialog(owner, keyReportSetting
          .getReportType().getReportName(), false));

      window.add(reportViewer.buildPanel(window));

      try {

        NokkelReport nokkelReport = new NokkelReport(keyReportSetting
            .getYear(), keyReportSetting.getWeek(),
            keyReportSetting.getProductArea());
        List<NokkelReport> reportList = new ArrayList<NokkelReport>();
        reportList.add(nokkelReport);
        reportViewer.generateProtransReportFromBean(reportList,
            getWindowTitle(), keyReportSetting.getReportType(),
            null, keyReportSetting.getReportType()
                .getReportFileName());
        window.pack();
        Util.locateOnScreenCenter(window);
View Full Code Here

     * @see no.ugland.utransprod.util.Threadable#doWork(java.lang.Object[],
     *      javax.swing.JLabel)
     */
    public Object doWork(Object[] params, JLabel labelInfo) {
      labelInfo.setText("Genererer utskrift...");
      ReportViewer reportViewer = new ReportViewer(getWindowTitle());

      try {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("ASSEMBLY_WEEK", yearWeek.getWeek());
        reportViewer.generateProtransReportFromBeanAndShow(
            getAssemblyWeekReportList(yearWeek, teams),
            "Montering", ReportEnum.MONTERING, parameters,
            "Montering", owner, true);
      } catch (ProTransException e) {
        e.printStackTrace();
View Full Code Here

  }


  @Test
  public void testShowReport() throws Exception {
    ReportViewer reportViewer = new ReportViewer("Takstolinfo");
    Collection<TakstolInfoV> heads = new ArrayList<TakstolInfoV>();
    TakstolInfoV takstolInfo = new TakstolInfoV();
    takstolInfo.setTakstolInfoVPK(new TakstolInfoVPK("100", 1));

    takstolInfo.setKundenr(200);
    takstolInfo.setNavn("Navn");
    takstolInfo.setLeveringsadresse("Leveringsadresse");
    takstolInfo.setPostnr("PostNr");
    takstolInfo.setPoststed("Poststed");
    takstolInfo.setHoydeOverHavet(500);
    takstolInfo.setBeregnetFor(" beregnetfor");
    takstolInfo.setSnolast(500);
    takstolInfo.setEgenvekt(1000);
    takstolInfo.setUtstikkType(1);
    takstolInfo.setKode("kode");
    takstolInfo.setAntall(BigDecimal.valueOf(1));
    takstolInfo.setProdno("prodno");
    takstolInfo.setBeskrivelse("beskrivelse");
    takstolInfo.setTakstoltype("takstoltype");
    takstolInfo.setVirkesbredde(BigDecimal.valueOf(5.5));
    takstolInfo.setUtstikkslengde(200);
    takstolInfo.setSvilleklaring(200);
    takstolInfo.setRombreddeAStol(30);
    takstolInfo.setBaeringGulv("baeringgulv");
    takstolInfo.setIsolasjonshoyde("isoloasjonsh");
    takstolInfo.setLoddkutt(BigDecimal.valueOf(12.6));
    takstolInfo.setNedstikk(BigDecimal.valueOf(90));
    takstolInfo.setBeregnetTid(BigDecimal.valueOf(2));
    heads.add(takstolInfo);

    takstolInfo = new TakstolInfoV();
    takstolInfo.setTakstolInfoVPK(new TakstolInfoVPK("100", 1));

    takstolInfo.setKundenr(200);
    takstolInfo.setNavn("Navn");
    takstolInfo.setLeveringsadresse("Leveringsadresse");
    takstolInfo.setPostnr("PostNr");
    takstolInfo.setPoststed("Poststed");
    takstolInfo.setHoydeOverHavet(500);
    takstolInfo.setBeregnetFor(" beregnetfor");
    takstolInfo.setSnolast(500);
    takstolInfo.setEgenvekt(1000);
    takstolInfo.setUtstikkType(1);
    takstolInfo.setKode("kode2");
    takstolInfo.setAntall(BigDecimal.valueOf(11));
    takstolInfo.setProdno("prodno2");
    takstolInfo.setBeskrivelse("beskrivelse2");
    takstolInfo.setTakstoltype("takstoltype2");
    takstolInfo.setVirkesbredde(BigDecimal.valueOf(55.5));
    takstolInfo.setUtstikkslengde(2200);
    takstolInfo.setSvilleklaring(2200);
    takstolInfo.setRombreddeAStol(230);
    takstolInfo.setBaeringGulv("baeringgulv2");
    takstolInfo.setIsolasjonshoyde("isoloasjonsh2");
    takstolInfo.setLoddkutt(BigDecimal.valueOf(122.6));
    takstolInfo.setNedstikk(BigDecimal.valueOf(920));
    takstolInfo.setBeregnetTid(BigDecimal.valueOf(22));
    heads.add(takstolInfo);

    String reportFileName = "Takstolinfo - " + takstolInfo.getOrdernr()
        + ".pdf";
    reportViewer.generateProtransReportFromBeanAndShow(heads,
        "Takstolinfo", ReportEnum.TAKSTOL_INFO, null, reportFileName,
        null, false);

    DialogFixture dialog = WindowFinder.findDialog(
        ReportEnum.TAKSTOL_INFO.getReportName()).using(
View Full Code Here

        craningCostManager, order, vismaOrderLines);

    assertEquals(BigDecimal.valueOf(5000).setScale(2), assemblyReport
        .getCraningAddition().setScale(2));

    ReportViewer reportViewer = new ReportViewer("Montering");
    List<AssemblyReport> orderList = new ArrayList<AssemblyReport>();
    orderList.add(assemblyReport);
    reportViewer.generateProtransReportFromBeanAndShow(orderList,
        "Montering", ReportEnum.ASSEMBLY, null, null, null, false);

    DialogFixture dialog = WindowFinder.findDialog(
        ReportEnum.ASSEMBLY.getReportName()).using(
        BasicRobot.robotWithCurrentAwtHierarchy());
View Full Code Here

    if (list.size() != 0) {
      TakstolInfoV takstolInfoV = getTakstolInfoV(list);
      if(takstolInfoV!=null){
      String reportFileName = getReportfileName(takstolInfoV);
      Map<String, Object> params = getParams(takstolInfoV);
      ReportViewer reportViewer = new ReportViewer("Takstolinfo");
      reportViewer.generateProtransReportFromBeanAndShow(list,
          "Takstolinfo", ReportEnum.TAKSTOL_INFO, params,
          reportFileName, null, false);
      }
    }
  }
View Full Code Here

     * @see no.ugland.utransprod.util.Threadable#doWork(java.lang.Object[],
     *      javax.swing.JLabel)
     */
    public Object doWork(final Object[] params, final JLabel labelInfo) {
      labelInfo.setText("Genererer utskrift...");
      ReportViewer reportViewer = new ReportViewer(getWindowTitle());
      WindowInterface window;
      if (owner instanceof JDialogAdapter) {
        window = new JDialogAdapter(new JDialog((JDialog) owner
            .getComponent(), getWindowTitle()));
      } else if (owner instanceof JFrameAdapter) {
        window = new JDialogAdapter(new JDialog((JFrame) owner
            .getComponent(), getWindowTitle()));
      } else {
        window = new JInternalFrameAdapter(new JInternalFrame(
            getWindowTitle(), true, true, true, true));
        ProTransMain.PRO_TRANS_MAIN.addInternalFrame(window);
      }

      window.add(reportViewer.buildPanel(window));

      try {
        reportViewer.generateProtransReport(getTableModelReport(),
            getWindowTitle(), getReportEnum(), null);
        window.pack();
        Util.locateOnScreenCenter(window);
        window.setVisible(true);
      } catch (ProTransException e) {
View Full Code Here

    public Object doWork(Object[] params, JLabel labelInfo) {
      String errorMsg = null;
      try {
        labelInfo.setText("Genererer rapport...");
        ReportViewer reportViewer = new ReportViewer("Transpotkostnad");
        TransportCostBasis transportCostBasis = getSelectedTransportCostBasis();
        overviewManager.lazyLoad(transportCostBasis,
            new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_COSTS,
                LazyLoadEnum.NONE } });
        List<TransportCostBasis> transportCostBasisList = new ArrayList<TransportCostBasis>();
        transportCostBasisList.add(transportCostBasis);
        reportViewer.generateProtransReportFromBeanAndShow(
            transportCostBasisList, "Transportkostnad",
            ReportEnum.TRANSPORT_COST, null, "transportkostnad"
                + transportCostBasis.getTransportCostBasisId()
                + ".pdf", owner, true);
View Full Code Here

      throws ProTransException {
    Accident accident = ((AccidentModel) presentationModel.getBean())
        .getObject();
    if (accident != null) {

      ReportViewer reportViewer = new ReportViewer("Hendelse/ulykke",
          mailConfig);
      InputStream iconStream = getClass().getClassLoader()
          .getResourceAsStream(IconEnum.ICON_CHECKED.getIconPath());
      Map<String, Object> params = new HashMap<String, Object>();
      params.put("checked", iconStream);
      List<Accident> accidentList = new ArrayList<Accident>();
      accidentList.add(accident);
      reportViewer.generateProtransReportFromBeanAndShow(accidentList,
          "Hendelse/ulykke", ReportEnum.ACCIDENT, params, null,
          window, true);
    }
  }
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.util.report.ReportViewer

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.