PDA

View Full Version : cCrystal reports running in final application location access data from developing workspace location.



jforero
17-Jan-2006, 10:46 AM
VDF 11.1

Crystal XI

Pervasive V8



Hi all.



Problem: My reports in Crystal, access the data in my developing workspace
location instead of the data in the final application location.



The location of my final application is different than my developing
workspace.



The reports are created using the data in the developing workspace location.



I use the cCrystal object.



When I run the reports from my final application location they are accessing
the data that is in the developing workspace location.



I am testing with one report that has only one table and I am trying with
the following code:



I changed the property in the cCrystal object.

set pbAutoLocateDFFiles to false



Procedure OnInitializeReport handle hoReport

handle hoDatabaseTable

string sDataPath sTable

Forward Send OnInitializeReport hoReport



//Get data path.

get psDataPath of (phoWorkspace(ghoApplication))
to sDataPath

get PathAtIndex of (phoWorkspace(ghoApplication)) sDataPath
1 to sDataPath



//Set new data path.

Get GetTableObjectByName of hoReport "RTORDHEA" to hoDatabaseTable

Get ComLocation of hoDatabaseTable to sTable

Set ComLocation of hoDatabaseTable to (sDataPath + "\" + sTable)

End_Procedure // OnInitializeReport



This code does not make any difference. The report still accesses the data
in the development workspace location.



Is this the way to give the new data path to the cCrystal object?



Any help appreciated.



Thanks,

Jose.

JimNC9
17-Jan-2006, 11:23 AM
Set report location to "Same as report"


Jim /*

WebApp Hosting
http://www.advanceddesignsinc.com/Web%20Hosting.htm

"JF" <jforero@seal-fla.com> wrote in message
news:SV6od03GGHA.1712@dacmail.dataaccess.com...
> VDF 11.1
>
> Crystal XI
>
> Pervasive V8
>
>
>
> Hi all.
>
>
>
> Problem: My reports in Crystal, access the data in my developing workspace
> location instead of the data in the final application location.
>
>
>
> The location of my final application is different than my developing
> workspace.
>
>
>
> The reports are created using the data in the developing workspace
> location.
>
>
>
> I use the cCrystal object.
>
>
>
> When I run the reports from my final application location they are
> accessing the data that is in the developing workspace location.
>
>
>
> I am testing with one report that has only one table and I am trying with
> the following code:
>
>
>
> I changed the property in the cCrystal object.
>
> set pbAutoLocateDFFiles to false
>
>
>
> Procedure OnInitializeReport handle hoReport
>
> handle hoDatabaseTable
>
> string sDataPath sTable
>
> Forward Send OnInitializeReport hoReport
>
>
>
> //Get data path.
>
> get psDataPath of (phoWorkspace(ghoApplication)) to
> sDataPath
>
> get PathAtIndex of (phoWorkspace(ghoApplication))
> sDataPath 1 to sDataPath
>
>
>
> //Set new data path.
>
> Get GetTableObjectByName of hoReport "RTORDHEA" to hoDatabaseTable
>
> Get ComLocation of hoDatabaseTable to sTable
>
> Set ComLocation of hoDatabaseTable to (sDataPath + "\" + sTable)
>
> End_Procedure // OnInitializeReport
>
>
>
> This code does not make any difference. The report still accesses the data
> in the development workspace location.
>
>
>
> Is this the way to give the new data path to the cCrystal object?
>
>
>
> Any help appreciated.
>
>
>
> Thanks,
>
> Jose.
>
>
>
>