With DataDirectory Keyword: CrystalReports.Load, CrystalReports.SetDataSource Yields Password Prompt

  • Thread starter Thread starter clusardi2k
  • Start date Start date
C

clusardi2k

Hello, the step that I did to get to my current question are:

I began to use the keyword DataDirectory and the next line of code.
When I ran the application, I would be asked for a Login ID and
password. If I clicked the cancell button on that Login window I would
not see the report at all.

CrystalReport1.Load(Application.StartupPath &
"\..\..\CrystalReport1.rpt")

So, I eventually tried the following 2 line code sequece. This time
if I pressed the cancell button on the Login window it would show the
report.

CrystalReport1.Load(Application.StartupPath &
"\..\..\CrystalReport1.rpt")
CrystalReport1.SetDataSource(Employee_DatabaseDataSet)

Question: The last 2 lines of code will display the report and I'm
pleased with that. But, how can I stop the Login prompt? I want to just
open the report without being asked for Login ID or password.

Trying to finish-up a project,
Christopher Lusardi
 
Hello, the step that I did to get to my current question are:

I began to use the keyword DataDirectory and the next line of code.
When I ran the application, I would be asked for a Login ID and
password. If I clicked the cancell button on that Login window I would
not see the report at all.

CrystalReport1.Load(Application.StartupPath &
"\..\..\CrystalReport1.rpt")

So, I eventually tried the following 2 line code sequece. This time
if I pressed the cancell button on the Login window it would show the
report.

CrystalReport1.Load(Application.StartupPath &
"\..\..\CrystalReport1.rpt")
CrystalReport1.SetDataSource(Employee_DatabaseDataSet)

Question: The last 2 lines of code will display the report and I'm
pleased with that. But, how can I stop the Login prompt? I want to just
open the report without being asked for Login ID or password.

Trying to finish-up a project,
Christopher Lusardi

If I change the Load to any of the next two lines nothing happens
differently from the just using the two lines above.

CrystalReport1.Load(Application.StartupPath &
"\..\..\CrystalReport1.rpt",
CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)

CrystalReport1.Load(Application.StartupPath &
"\..\..\CrystalReport1.rpt",
CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy)
 
Back
Top