p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP XML (http://p2p.wrox.com/forumdisplay.php?f=69)
-   -   Crystal/ASP/XML Table Location change (http://p2p.wrox.com/showthread.php?t=2531)

amahan August 6th, 2003 02:14 PM

Crystal/ASP/XML Table Location change
Trying to change the location of the xml file used by a report at runtime. Does change the location successfully. Tested this by writing out the name of the .Location. However, no data is printed in the report except text fields that were hard coded. The data from the XML file is blank. Can open it in report designer and set to the same file name and it shows the data just fine. Any clues?

If Not IsObject (session("oApp")) Then
  Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.9" )
End If

If IsObject(session("oRpt")) then
  Set session("oRpt") = nothing
End if

Dim Report
Report = "C:\VCG\StaffSuite31_Server\Reports\Reports\Templa tes\SysAdmin\XMLReport.rpt"

On error resume next
  Set session("oRpt") = session("oApp").OpenReport(Report, 1)

session("oRpt").Database.Tables.Item(1).SetLogOnIn fo "XML Data", "", "", ""

session("oRpt").Database.Tables.Item(1).Location = "93cc5"
On Error Resume Next
If Err.Number <> 0 Then
  Response.Write "An Error has occured on the server in attempting to access the data source"

If IsObject(session("oPageEngine")) Then
 set session("oPageEngine") = nothing
End If

set session("oPageEngine") = session("oRpt").PageEngine
End If

All times are GMT -4. The time now is 03:39 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.