Below is how I was able to make things work using a coded connection string.
I would still be (extreemly) interested in anyone else who might have solved
this with out code as I want to publish the Crystal Report as a standalone
web service.
Good luck.......
In Visual Studio Solution Explorer
Right click the project
Add new item
Add Crystal Reports item.
Follow the wizard.
Right click the new report in the solution explorer and publish as a web
service.
Drag a Crystal Reports Viewer from the toolbox to a web form.
Double click the web form to go to the code window and hook up the Crystal
Reports Viewer---Use the following code-------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim strConnectionString As String 'Usually get this from the
web.config file.
strConnectionString = "server=MyServerName;uid=my
useridsa;pwd=;database=MyDatabase"
Dim strSQL As String
strSQL = "Select * from tblHotelTransactions"
Dim dsMyData As New DataSet
dsMyData = SqlHelper.ExecuteDataset(strConnectionString,
CommandType.Text, strSQL)
Dim oRpt As New CrystalReport1 'CrystalReport1 is the strongly typed
(the exact report - we just get an instance of it) report we created
(CrystalReport1.rpt).
oRpt.Load()
oRpt.SetDataSource(dsMyData.Tables(0)) 'We just have one table -
number 0
crvMyCrystalReportViewer.ReportSource = oRpt
'crvMyCrystalReportViewer is the control I dragged on the webform and named.
End Sub
----------------------------------------------------------------------------
-----------------------
[quoted text, click to view] "Keith" <@.> wrote in message news:ueqj$l7LEHA.3216@tk2msftngp13.phx.gbl...
> I had exactly the same problem, but I do not know how to createe it's own
> connection string.
>
> Can you please tell me how you did that?
>
> Thanks
>
>
> "Gary Brower" <gary.brower@verizon.net> wrote in message
> news:OLn$AoxLEHA.1556@TK2MSFTNGP10.phx.gbl...
> > I am using Visual Studio .Net 2003 with Crystal Reports.
> >
> > I can create a Crystal Report using a SQL server db. Then I create a
> > seperate vb web form and add a CrystalReportViewer. When I run the form
I
> > get the message "Logon Error". The problem seems to be that Crystal
> Reports
> > does not save the login info I use when creating the report. I have
tried
> > to add logon property to a report object but this does not work.
> >
> > I can assign a dataset (with its own connection string) to a report
object
> > and get it to work that way, howerver - my goal is to create a crystal
> > report as a web service (so it needs to be self contained - incluing
> > connection info).
> >
> > I sure would appreciate any help.
> >
> > Cheers,
> > Gary Brower
> >
> >
>
>