Print Page | Close Window

XML Data Source

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3020
Printed Date: 09 May 2024 at 6:31pm


Topic: XML Data Source
Posted By: Freghete
Subject: XML Data Source
Date Posted: 24 Apr 2008 at 8:58am
This is the scenario.

I use CR XI Dev R2, and I've a report building on a XML data source, within an xsd file (no local path, but http path).
The problem is that from a classic asp page, I don't know how change the xml file data source.

Here is the actual code that I use to show a simple report that is connected to an sql db:

<%@ LANGUAGE="VBSCRIPT" %>
<%
reportName = Request.QueryString("rpt")
xmlfile = Request.QueryString("newxmlfile")
%>                                                        
<!-- #include file="AlwaysRequiredSteps.asp" -->
<%
Set mainReportTableCollection = Session("oRpt").Database.Tables
For Each mnTable in mainReportTableCollection
    With mnTable.ConnectionProperties
     .Item("User ID") = "SQLTest"
     .Item("Password") = "sqltest"
     .Item("Database") = "SQLTest"
     .Item("Server") = Request.ServerVariables("SERVER_NAME")
    End With
Next
' ***
' What I'll write HERE to set xmlfile like new datasource instead the code for connection to sql?
'
'
' ***
%>
<!-- #include file="MoreRequiredSteps.asp" -->
<!-- #include file="SmartViewerActiveX.asp" -->




Print Page | Close Window