468,103 Members | 1,212 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,103 developers. It's quick & easy.

I need help changing the connection string in ASP for Crystal Reports 9

1
Hello everyone,

I need help creating an asp page to view a crystal report, which requires that that I change the database connection dynamically. I thought I had this problem licked in CR7 (the version of crystal the report has been designed in) but when I tried to deploy CR7 to my server I found that I could not install the ASP components on IIS 6.0 (even using the manual installation method). I had a CR9 dev edition update, which came with a copy of RAS. I installed CR9 and RAS and successfully deployed the report with a surprisingly small amount of code. The problem is that it prompts for all parameters and the database logon. I need to be able to change the name of the database that the report uses through my ASP (not ASP.net) web page, instead of allowing the report to connent to the database saved with the report. I would also like to be able to pass it the log on credentials and parameters. I've included the code I'm currently using below.

Thanks in advance

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252" %>
<% Option Explicit
Response.ExpiresAbsolute = Now() -1

Dim HTMLViewer
Dim ObjectFactory

Set ObjectFactory=CreateObject("Crystalreports.ObjectF actory.2")
Set HTMLViewer = ObjectFactory.CreateObject("CrystalReports.Crystal ReportViewer")
With HTMLViewer
.ReportSource = "C:\Program Files\Crystal Decisions\Report Application Server 9\Reports\ClaimReview\Invoice_SQL_Works.rpt"
.IsOwnPage = true
End With

On Error Resume Next
call HTMLViewer.ProcessHttpRequest (Request, Response)
if Err.number <> 0 then
Response.Write Err.Description
Err.Clear
end if

%>
Aug 31 '06 #1
0 2320

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Atif | last post: by
11 posts views Thread by NewGuytoNetworking | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.