Crystal Report (Prompting for ID/Password) on non dev machine

B

Bill Schanks

I have a VB.NET 2005 Winform app that has a crystal report. It comes
up fine when I run the app on the Dev machine. But when I run the app
on a users machine, even logged in as myself, I get prompted for a
user name and password. And even then it won't pull up the report.

The crystal report is sourced via a stored procedure. I choose OLD DB
(ADO) as the connection source. I couldn't get it to work with an
ADO.NET Dataset that I setup in the project.

Here is the code to pull the report:

Try
'Update UI
_frmMain.ssStatus.Text = "Getting report results"
Cursor = Cursors.WaitCursor

Dim x As
CrystalDecisions.CrystalReports.Engine.ReportDocument

'Generate the rpt
x = New
CrystalDecisions.CrystalReports.Engine.ReportDocument
x.Load(Me.txtHiddenFileName.Text)

'Parms (If enabled)
x.SetParameterValue("@RptDate", CDate(Me.cbAsOf.Text))
'If CBool(Me.cbRptID.Tag) AndAlso Not
String.IsNullOrEmpty(Me.cbRptID.Text) Then _
' x.SetParameterValue("@ParmName", "")
'Code the rest...

'Show the report
CrystalReportViewer1.Visible = True
CrystalReportViewer1.ReportSource = x
CrystalReportViewer1.Zoom(1) 'Page Width

Catch ex As Exception
HandledExceptionManager.ShowDialog("An error occured while
attemting to " _
& "pull the requested report.", _
"Your report could not be retrieved.", _
"Evaluate the error, and re-try the command. If you
need assistance, " _
& "Click Help/About for contact info.", _
ex, _
MessageBoxButtons.OK, _
MessageBoxIcon.Error, _

HandledExceptionManager.UserErrorDefaultButton.Default)

Finally
Cursor = Cursors.Default
_frmMain.ssStatus.Text = "Ready"

End Try
 
B

Bill Schanks

For anyone interested. I have solved this, however I am not sure which
of my actions actually solved it. Here is what I did:

I changed the type of the connection from 'OLE DB: SQL Native Client'
to OLE DB: Microsoft OLE DB Provider for SQL Server'.

I also changed the setup package to include the Content Files for the
project.
 
S

sloan

My advice would be to go to the PUSH model, instead of the PULL model.

I think codeproject.com has a sample/explanation of the differences.

The PULL model has too much CR voodoo.

............



For anyone interested. I have solved this, however I am not sure which
of my actions actually solved it. Here is what I did:

I changed the type of the connection from 'OLE DB: SQL Native Client'
to OLE DB: Microsoft OLE DB Provider for SQL Server'.

I also changed the setup package to include the Content Files for the
project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top