Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 6th, 2003, 02:14 PM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?

CODE:
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").DiscardSavedData

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

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

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically changing table location csloanATYC BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 0 November 6th, 2008 02:32 PM
Changing Database location for crystal report swarnapy VB How-To 0 August 27th, 2006 11:37 PM
change database location on CR 10 at run time blu3_x30n Pro VB 6 0 March 30th, 2006 01:25 PM
Change TextBox control location on aspx page minhpx General .NET 2 March 4th, 2005 08:29 AM
CR8 - change location of database file / tablename meenakshikalera Crystal Reports 0 June 23rd, 2004 11:12 AM





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