473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

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.ReportDocum ent

'Generate the rpt
x = New
CrystalDecisions.CrystalReports.Engine.ReportDocum ent
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.Def ault)

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

End Try
Sep 15 '08 #1
2 1890
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.

On Sep 15, 12:00*pm, Bill Schanks <wscha...@gmail.comwrote:
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.ReportDocum ent

* * * * * * 'Generate the rpt
* * * * * * x = New
CrystalDecisions.CrystalReports.Engine.ReportDocum ent
* * * * * * 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.Def ault)

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

* * * * End Try
Sep 15 '08 #2
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.

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

"Bill Schanks" <ws******@gmail.comwrote in message
news:11**********************************@34g2000h sh.googlegroups.com...
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.

On Sep 15, 12:00 pm, Bill Schanks <wscha...@gmail.comwrote:
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.ReportDocum ent

'Generate the rpt
x = New
CrystalDecisions.CrystalReports.Engine.ReportDocum ent
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.Def ault)

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

End Try

Sep 17 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Tim Jones | last post by:
Hey all, I am trying to try get a crytal report running properly. A "Hello World" report that does not add criteria to the record selection formula of the report (either in the development tool,...
1
by: Mithun Verma | last post by:
Hello All, I have a Windows application that uses Crystal Reports 9 (bundled Version) developed using VS.NET 2003 on a windows server 2003 m/c. The application has to be deployed on the client...
0
by: Timmy Jones | last post by:
Hey all, I am trying to try get a crytal report running properly. A "Hello World" report that does not add criteria to the record selection formula of the report (either in the development tool,...
12
by: Bill Nguyen | last post by:
What's the VB syntax to run the CR report using the following SP? I use CrystalreportViewer and ReportDocument. Thanks Bill Here's the SP in SQLserver 2K: CREATE proc mysp_ReportSubmission...
3
by: route_coder | last post by:
I am using access database to create a crystal report in VB.NET Everything works fine when I run on my machine. But when I am deploying it other windows machines. It is asking for database server...
0
by: zellipa | last post by:
I am trying to imbed crystal in oracle. I got the following steps from the web. when i try to run the created from , iget the error frm-41344. Any suggestions. Regards, Zellipa STEPS TO...
2
by: Simone | last post by:
Hello I am new to this :) I have created a crystal reports and tried using the Crystal Report Viewer but when I try to preview the report it prompts me for a user name and password. I am using...
11
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
0
by: Anavaradha Sankar | last post by:
Hi., I had first created a dataset and using the wizard i had specified the connection (i used windows authentication to create a connection),tables,queries n finished creating the dataset. And...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.