[email protected]
谢谢~~~!

解决方案 »

  1.   

    [email protected]谢谢!!!
      

  2.   

    [email protected]谢谢!!!
      

  3.   

    [email protected]
    非常感谢
      

  4.   

    有很多这样的例子在www.crystaldecisions.com下载。不知道楼主对RAS的Java SDK有没有什么了解。如果用过,可以谈谈使用的感想吗?
    建议大家不要用crystalreport的Java功能。没有文档,没有支持,没有充分的例子。有的只是大bug和无奈。
      

  5.   

    给我一个吧。我刚学jsp,非常感谢了!![email protected]
      

  6.   

    给我一个吧,非常感谢
    [email protected]
      

  7.   

    我也需要一个,感谢之极!
    [email protected]
      

  8.   

    特别感谢:herosword (南) 的开放精神和交流精神!
      

  9.   

    [email protected] 
    谢谢
      

  10.   

    [email protected]
    非常感谢!!!
      

  11.   

    [email protected]  多谢拉!上帝保佑你
      

  12.   

    [email protected]多谢多谢!向你学习
      

  13.   

    [email protected]
    十分感谢!!!!!!!!!!!!!!!
      

  14.   

    Norwaywoods() 
    愿闻其详:)
      

  15.   

    [email protected]
    [email protected]
    不知能否收到您的回音!
      

  16.   

    [email protected]真是太谢谢了!
      

  17.   

    我很需要,请给一份
    [email protected]
    谢谢!
      

  18.   

    我就是用水晶报表的RAS SDK实现的,水晶公司确实没有提供文档和示例。
    需要的人请发邮件给我:[email protected]
      

  19.   

    请大家发email给我:[email protected]
      

  20.   

    不知道,有没有人去过水晶公司的论坛。看过上面一篇名叫Crystal hate JAVA Programmer的文章吗?
    虽然,那个老外最后还是解决的问题,但是还有很多的问题存在。不知道各位有用过RAS JAVA SDK成功写过动态建立报表(也就是程序控制产生的一次性报表),并且调用动态数据源的程序。
    有人知道,这个API怎么用吗?com.crystaldecisions.sdk.occa.report.application 
    Class DatabaseControlleraddDataSource
    public void addDataSource(java.sql.ResultSet data)
                       throws ReportSDKExceptionAdds a java.sql.ResultSet or RAS data set as a data source for the report. To set a runtime data source into a report, the report must be created with a data source using Crystal Reports, or added to the report using this method. Set the data source in the report using the setDataSource method. Parameters:
    data - The java.sql.ResultSet object to be added.
    Throws:
    ReportSDKException -  加进去的数据,怎么才能调出来?-----------------------------------------
    又有谁成功试过下面这个crystalReport的JAVADOC里面带的例子。
    Adding tables using a connection string
    To add tables to a report, you must use a controller (in this case the DatabaseController) because they are the only objects capable of modifying the Report Application Server object model. IDatabase is used to retrieve the tables from another source report, but cannot be used to add them.In order to add tables to a report, you will need to:Add a data source 
    Add a table using a connection string 
    Link the tables 
    Adding a data source
    In order to add tables to a report, you first need to create a JDBC connection, select a ResultSet, and add it as a data source.To add a data source
    Create a JDBC connection to the database you want to use. 
        String url = "jdbc:odbc:Xtreme Sample Database";
        java.sql.Connection jdbcConnection = DriverManager.getConnection(url, "guest", "password");
        java.sql.Statement statement = jdbcConnection.createStatement();Query the database for the ResultSet you want. 
        String query = "SELECT * FROM `Product` `Product`";
        java.sql.ResultSet resultSet = statement.executeQuery( query );Add the ResultSet as a data source to the DatabaseController. 
        document.getDatabaseController().addDataSource( resultSet );Adding tables using a connection string
    Data can also be retrieved by using a connection string. This allows you to retrieve data using a SQL query or a dictionary file in place of adding tables from a source report. 
    To add a table using a connection string
    Create a new table to hold the data retrieved from the connection. 
        String tableName = "Product_Type";
        ITable newTable = new Table();
        newTable.setName(tableName);
        newTable.setAlias(tableName);
        ConnectionInfo connectionInfo = newTable.getConnectionInfo();Specify the type of connection to be made. 
        connectionInfo.setKind( ConnectionInfoKind.CRQE );Specify the database DLL.
    This can be either crdb_query.dll or crdb_dictionary.dll depending on the desired connection. 
        PropertyBag dbDll = new PropertyBag();
        dbDll.putStringValue(PropertyBagHelper.CONNINFO_DATABASE_DLL, "crdb_query.dll");
        connectionInfo.setAttributes(dbDll);Specify the database logon properties.
    For additional properties, see the PropertyBagHelper class. 
        PropertyBag logonProperties = new PropertyBag();
        logonProperties.putStringValue( "Crystal SQL Query", "/queryPath");
        connectionInfo.getAttributes().put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, logonProperties);Supply logon information if it is required. 
        connectionInfo.setUserName(userName);
        connectionInfo.setPassword(password);Add the table to the document. 
        TableLinks dummyLink = new TableLinks();
        document.getDatabaseController().addTable(newTable, dummyLink);Linking the tables
    The tables then need to be linked. 
    To link the tables
    Link the tables using the following line. 
        document.getDatabaseController().doSmartLinking();----------------------------------------
    没有文档,例子又跑不起来。还有bug!!!!这个我就不说了!自己去它的网站上的论坛看看吧!!!!
    我听说这个公司被微软收购了!!!!!这就是原因吧!!!!!
      

  21.   

    [email protected]
    我也决定要一个
      

  22.   

    [email protected]
    我也要一份,OK?