2017-06-08 40 views
0

Crystal Reportsを使用して作成したレポートを開くことができるWebアプリケーションを開発しています。私はちょうどペイントしようとしているOracleデータベースを使用してJavaでCrystal Reportを起動

2017-06-08 19:16:12,863 ERROR com.crystaldecisions.reports.dataengine.DataSourceManager.do(SourceFile:691) - Formula error: recompile formulas failed 
    com.crystaldecisions.reports.formulas.FormulaException: Exception in formula '{@PGAEJE}' en '{PGA.PGA_EJE}': 
    This field name is unknown. 
     at com.crystaldecisions.reports.formulas.o.a(SourceFile:1041) 
     at com.crystaldecisions.reports.formulas.o.do(SourceFile:1013) 
     at com.crystaldecisions.reports.formulas.o.new(SourceFile:688) 
     at com.crystaldecisions.reports.formulas.o.else(SourceFile:459) 
     at com.crystaldecisions.reports.formulas.f.void(SourceFile:65) 
     at com.crystaldecisions.reports.formulas.FormulaParser.a(SourceFile:345) 
     at com.crystaldecisions.reports.formulas.r.a(SourceFile:89) 
     at com.crystaldecisions.reports.formulas.FormulaInfo.a(SourceFile:570) 
     at com.crystaldecisions.reports.formulas.FormulaService.compile(SourceFile:347) 
     at com.crystaldecisions.reports.reportdefinition.FormulaCompiler.a(SourceFile:139) 
     at com.crystaldecisions.reports.reportdefinition.FormulaFieldDefinitionBase.compile(SourceFile:928) 
     at com.crystaldecisions.reports.reportdefinition.o.a(SourceFile:1360) 
     at com.crystaldecisions.reports.reportdefinition.o.a(SourceFile:1348) 
     at com.crystaldecisions.reports.reportdefinition.o.a(SourceFile:4253) 
     at com.crystaldecisions.reports.dataengine.DataSourceManager.do(SourceFile:687) 
     at com.crystaldecisions.reports.dataengine.DataSourceManager.new(SourceFile:607) 
     at com.crystaldecisions.reports.dataengine.DataSourceManagerCoordinator.a(SourceFile:505) 

2017-06-08 19:16:47,473 INFO com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:630) - received request: closeServerAgent 
2017-06-08 19:16:47,473 INFO com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:2619) - has cleaned up and closed down the report 
2017-06-08 19:16:47,474 INFO com.crystaldecisions.reports.queryengine.Connection.ux(SourceFile:1883) - Connection logoffServer: 
2017-06-08 19:16:47,493 INFO com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Close(?:?) - Connection Closed !oracle.jdbc.driver.OracleDriver!jdbc:oracle:thin:{userid}/{password}@xxx 
2017-06-08 19:16:47,648 ERROR org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:571) - Failed to load the resource 'InternalFormatterException' from the bundle [email protected] 
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key InternalFormatterException 
    at java.util.ResourceBundle.getObject(ResourceBundle.java:450) 
    at java.util.ResourceBundle.getObject(ResourceBundle.java:444) 
    at java.util.ResourceBundle.getString(ResourceBundle.java:407) 
    at com.crystaldecisions.reports.common.CrystalResources.loadString(Unknown Source) 
    at com.crystaldecisions.reports.common.CrystalResources.loadMessage(Unknown Source) 
    at com.crystaldecisions.reports.common.CrystalResourcesFactory.getLocalizedMessage(Unknown Source) 
    at com.crystaldecisions.reports.common.CrystalException.getLocalizedMessage(Unknown Source) 
    at com.crystaldecisions.reports.common.CrystalException.getMessage(Unknown Source) 
    at java.lang.Throwable.getLocalizedMessage(Throwable.java:391) 
    at java.lang.Throwable.toString(Throwable.java:480) 
    at java.lang.String.valueOf(String.java:2994) 
    at java.lang.StringBuilder.append(StringBuilder.java:131) 


Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: InternalFormatterException---- Error code:-2147467259 Error code name:failed 
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:237) 
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:147) 
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:128) 
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:111) 


Caused by: com.crystaldecisions.reports.dataengine.DataEngineException: Exception in formula '{@PGAEJE}' en '{PGA.PGA_EJE}': 
This field name is unknown. 
    at com.crystaldecisions.reports.dataengine.DataSourceManager.do(SourceFile:692) 
    at com.crystaldecisions.reports.dataengine.DataSourceManager.new(SourceFile:607) 
    at com.crystaldecisions.reports.dataengine.DataSourceManagerCoordinator.a(SourceFile:505) 
    at com.crystaldecisions.reports.dataengine.DataSourceManager.a(SourceFile:1060) 
    at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:729) 
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.<init>(SourceFile:179) 
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.if(SourceFile:135) 
    at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatterBase.<init>(SourceFile:75) 
    at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.<init>(SourceFile:183) 
    at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.a(SourceFile:162) 
    at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:201) 
    ... 153 more 

:私は、接続を構成する方法の他の記事に続いています

final Tables tablas = databaseController.getDatabase().getTables(); 

    for (final ITable table : tablas) { 
     ITable t = (ITable)table.clone(true); 

     t.setQualifiedName(conexionBaseDatos.getIdentificadorNombreTabla() + table.getName()); 

     final IConnectionInfo connectionInfo = table.getConnectionInfo(); 

     final PropertyBag propertyBag = new PropertyBag(); 

     propertyBag.put(TRUSTED_CONNECTION, "false"); 
     propertyBag.put(SERVER_TYPE, "JDBC (JNDI)"); 
     propertyBag.put(USE_JDBC, "true"); 
     propertyBag.put(DATABASE_DLL, "crdb_jdbc.dll"); 
     propertyBag.put(JNDI_OPTIONAL_NAME, conexionBaseDatos.getName()); 
     propertyBag.put(CONNECTION_URL, conexionBaseDatos.getUri()); 
     propertyBag.put(DATABASE_CLASS_NAME, conexionBaseDatos.getDriver()); 

     connectionInfo.setAttributes(propertyBag); 

     connectionInfo.setUserName(conexionBaseDatos.getUser()); 
     connectionInfo.setPassword(conexionBaseDatos.getPass()); 
     connectionInfo.setKind(ConnectionInfoKind.SQL); 

     t.setConnectionInfo(connectionInfo); 
     try { 
      databaseController.setTableLocation(table, t); 
     } catch (final Exception e) { 
      LOGGER.error("Error.", e); 
      throw new ErrorGenerarInformeException(e); 
     } 
    } 

を、私はすべてが正しかったことを考えていたが、コンソールは私に次のエラーを示していますフィールドをデータベースからレポートに追加します。もちろん、レポートには正しい形式のフィールドがあります。このトレースもあります

2017-06-08 18:53:52,460 INFO com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(?:?) - Connection Opened null 
2017-06-08 18:53:52,470 INFO com.crystaldecisions.reports.queryengine.Connection.br(SourceFile:1856) - Connection logon successfully 

お願いします。

編集:

t.setQualifiedName(conexionBaseDatos.getIdentificadorNombreTabla() + table.getName()); 

機能getIdentifacadorNombreTableはリターンヌルだったので、報告書はNULLNAME等を設定した私は、その問題が接続

2017-06-08 20:19:32,630 INFO com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:630) - received request: fetchSubreportNames 
2017-06-08 20:20:43,604 INFO com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:630) - received request: fetchReportExportRequest 
2017-06-08 20:20:43,605 INFO com.businessobjects.reports.sdk.JRCLicenseThrottler.a(SourceFile:137) - attempting to send engine request 
2017-06-08 20:20:43,605 INFO com.businessobjects.reports.sdk.JRCLicenseThrottler.a(SourceFile:142) - successfully sent engine request 
2017-06-08 20:20:43,607 INFO com.crystaldecisions.reports.formulas.r.a(SourceFile:104) - Formula {@GRUPO} did not compile: com.crystaldecisions.reports.formulas.FormulaException: Exceptión in fórmula '{@GRUPO}' en '{PGA.PGA_EJE}': 
This field name is not known. 
2017-06-08 20:20:43,608 INFO com.crystaldecisions.reports.formulas.r.a(SourceFile:104) - Formula {@GRUPO} did not compile: com.crystaldecisions.reports.formulas.FormulaException: Exceptión in fórmula '{@GRUPO}' en '{PGA.PGA_EJE}': 
This field name is not known. 
2017-06-08 20:20:43,608 INFO com.crystaldecisions.reports.formulas.r.a(SourceFile:104) - Formula {@PGAECO} did not compile: com.crystaldecisions.reports.formulas.FormulaException: Exceptión in fórmula '{@PGAECO}' en '{PGA.PGA_ECO}': 
This field name is not known. 
2017-06-08 20:20:43,609 INFO com.crystaldecisions.reports.formulas.r.a(SourceFile:104) - Formula {@PGAFUN} did not compile: com.crystaldecisions.reports.formulas.FormulaException: Exceptión in fórmula '{@PGAFUN}' en '{PGA.PGA_FUN}': 
This field name is not known. 
2017-06-08 20:20:43,609 INFO com.crystaldecisions.reports.formulas.r.a(SourceFile:104) - Formula {@PGAORG} did not compile: com.crystaldecisions.reports.formulas.FormulaException: Exceptión in fórmula '{@PGAORG}' en '{PGA.PGA_ORG}': 
This field name is not known. 
2017-06-08 20:20:43,610 INFO com.crystaldecisions.reports.dataengine.DataSourceManager.z(SourceFile:3042) - Create new report state 
2017-06-08 20:20:43,610 INFO com.crystaldecisions.reports.dataengine.DataSourceManager.do(SourceFile:679) - Need to recompile formulas, the number of formulas needed to recompile is 5 
2017-06-08 20:20:43,611 INFO com.crystaldecisions.reports.formulas.r.a(SourceFile:104) - Formula {@PGAORG} did not compile: com.crystaldecisions.reports.formulas.FormulaException: Exceptión in fórmula '{@PGAORG}' en '{PGA.PGA_ORG}': 
This field name is not known. 
2017-06-08 20:20:43,611 WARN com.crystaldecisions.reports.reportdefinition.o.a(SourceFile:1366) - com.crystaldecisions.reports.formulas.FormulaException: Excepción en la fórmula '{@PGAORG}' en '{PGA.PGA_ORG}': 
This field name is not known. 
2017-06-08 20:20:43,611 ERROR com.crystaldecisions.reports.dataengine.DataSourceManager.do(SourceFile:691) - Formula error: recompile formulas failed 
com.crystaldecisions.reports.formulas.FormulaException: Exception in formula '{@PGAEJE}' en '{PGA.PGA_EJE}': 
This field name is not known. 
    at com.crystaldecisions.reports.formulas.o.a(SourceFile:1041) 
    at com.crystaldecisions.reports.formulas.o.do(SourceFile:1013) 
    at com.crystaldecisions.reports.formulas.o.new(SourceFile:688) 

答えて

0

最後に、私はこの行で、私の問題を解決しないと思います名。私はこの変数を設定し、正常に動作していることを知っています。

関連する問題