posts - 61,  comments - 2033,  trackbacks - 0

          /*
           * Created on 2005/12/12
           *
           * TODO To change the template for this generated file go to
           * Window - Preferences - Java - Code Style - Code Templates
           */
          package com.foobar;


          import java.awt.*;

          import javax.swing.*;

          import com.crystaldecisions.ReportViewer.*;
          //import com.crystaldecisions.reports.sdk.*;
          //import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
          import com.crystaldecisions.sdk.occa.report.application.*;
          import com.crystaldecisions.sdk.occa.report.reportsource.*;

          /**
           * @author phss
           *
           * TODO To change the template for this generated type comment go to
           * Window - Preferences - Java - Code Style - Code Templates
           */
          public class TestSwing {
           private static void createAndShowGUI(){
            try{
             JFrame.setDefaultLookAndFeelDecorated(false);
             JFrame frame = new JFrame("TestSwing");
             frame.setTitle("Testing CRX1...");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             
             ReportViewerBean viewer = new ReportViewerBean();
             viewer.init(new String[0],null,null,null);
             System.err.println("--------------1----------");
             ReportClientDocument rpt = new ReportClientDocument();
             System.err.println("-------------2-----------");
             rpt.setReportAppServer("crmboe.mds-sn.com");
             //rpt.setReportAppServer("crmboe.ras.rptappserver");
             System.err.println("-------------3-----------");
             rpt.open("crmboe.ras.rptappserver://c:\\reports\\aa.rpt",0);
             //rpt.open("aa.rpt",0);
             System.err.println("--------------4----------");
             
             IReportSource rptSource = rpt.getReportSource();
             viewer.setReportSource(rptSource);
             System.err.println("--------------5----------");
             frame.getContentPane().add(viewer,BorderLayout.CENTER);
             frame.setSize(700,500);
             frame.setVisible(true);
             
             viewer.start();
             
             
            }catch(Exception e){
             e.printStackTrace();
            }
           }

           public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable(){
              public void run(){
                createAndShowGUI();
              }
            });
           }
          }

          posted on 2005-12-24 11:00 魚上游 閱讀(1120) 評論(0)  編輯  收藏 所屬分類: 爪哇世界探險
          <2005年12月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          常用鏈接

          留言簿(82)

          隨筆分類(59)

          文章分類(21)

          相冊

          收藏夾(40)

          GoodSites

          搜索

          •  

          積分與排名

          • 積分 - 1268166
          • 排名 - 22

          最新評論

          閱讀排行榜

          主站蜘蛛池模板: 临江市| 兰坪| 武川县| 鞍山市| 区。| 永康市| 墨竹工卡县| 息烽县| 汝阳县| 灵武市| 合作市| 木兰县| 灵石县| 南京市| 桐乡市| 交城县| 金山区| 稷山县| 清涧县| 金沙县| 保康县| 永定县| 天祝| 和田市| 郯城县| 清苑县| 梧州市| 兴国县| 喀喇沁旗| 阿坝县| 宁武县| 湘阴县| 定边县| 嘉荫县| 巴南区| 新龙县| 攀枝花市| 安泽县| 土默特左旗| 五莲县| 奉节县|