Consultor Eletrônico



Kbase P120647: Error displaying report in 4GL using native XML connection with Crystal Reports 10
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/21/2006
Status: Unverified

FACT(s) (Environment):

Crystal Reports 10
Windows

SYMPTOM(s):

Attempting to display a Crystal report using the Crystal Reports ActiveX Viewer control in 4GL

Crystal report uses an XML file as its data-source

Error occurs when attempting to display the report

Logon failed.
Details: Must specify service, port, method and parameter to access web service

CRDB_JavaServer.ini is configured correctly

Using SetTableLocation method to change the location of the XML file used as data-source

SetTableLocation is configured as follows:

chReport:Database:Tables:Item(1):SetTableLocation( <FullPathToXML>, "", "").

Modifying SetTableLocation parameters changes the errors reported, for example:

chReport:Database:Tables:Item(1):SetTableLocation( <FullPathToXML>, "<XMLTableName>", "").

Error occurred while accessing component property/method: SetTableLocation.
Logon failed.
Error code: 0x80020009 (5890)

Logon failed.
Details: Cannot open file
<PathToXMLFileUsedToCreateReport.xml> (The device is not ready)

CAUSE:

The parameters of the SetTableLocation method are not correct and/or complete.

FIX:

SetTableLocation should be used as follows:

SetTableLocation (Character pLocation,
Character pSubLocation,
Character pConnectBufferSting).

pLocation: Specifies the location of the database table (file path and name.ext).
pSubLocation: Specifies the sublocation of the database table (table name - optional)
pConnectBufferString: Specifies the connection buffer string.

For example:

chReport:Database:Tables:Item(1):SetTableLocation( <FullPathToXML>, chReport:Database:Tables:item(1):NAME, "Local XML File = " + <FullPathToXML>).

chReport:Database:Tables:Item(1):SetTableLocation( "C:\customer.xml", "customer", "Local XML File = C:\customer.xml").