Solved

Remove/Bypass Logon Prompt displayed by Crystal Reports?

Posted on 2007-11-19
7
4,626 Views
Last Modified: 2012-06-21
I create a report in the designer, set db location (which is actually a dataset) - everything is ok.
I bind the report correctly at design time - everything is ok.

at runtime, I get a log on prompt anyway.

The database I am using is an unsecured access 2003 database. I specify datasets for the reports - so I do not know why I am getting a logon prompt when I wish to view the report.

In one instance, if I just click "Cancel" the prompt goes away and the report is displayed correctly.

HELP PLEASE :) I'm at my wit's end trying to find an answer to this issue. I've looked at support sites, discussion threads - even tried to contact Crystal/Business Objects. No help anywhere so far.
0
Comment
Question by:pasemeraro
  • 4
  • 2
7 Comments
 

Author Comment

by:pasemeraro
ID: 20315177
I've at least narrowed down the issue to when the logon prompt appears:

it appears once i specify one of my projects ADO datasets (VB.NET using 1.1 runtime).

if i set my database location directly to the database itself, I am OK. However, I would like to specify my datasets as the source, so I do need help with this question. Thanks!
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 20317458
Which version of Crystal?

mlmcc
0
 

Accepted Solution

by:
pasemeraro earned 0 total points
ID: 20320616
Crystal Reports. NET.

Thanks for looking into this, but I managed to solve the problem.

The solution: Create, Load/Bind the report document at RUN time - NOT in VS 2003 at Design time.

(The code that worked is attached as a code snippet.)

Background Info:

I was creating a simple form that displayed an assignment report in a viewer. The form itself was being loaded as a modal form using the ShowDialog() method. The form, when loaded, would grab an ID from its parent, and then load the dataset for the report.

Issue: I would get the logon prompt BEFORE the Load() event ever fired. I wasn't sure how I could debug this issue.

The cause:

I only have a theory, (I wish I had more time to understand this completely, but I don't) but they do seem to fit the basic facts:

1. I think the report document was created,  and then tried to bind to the dataset - before the dataset was even instantiated.

  Essentially, the prompt was trying to locate a datasource. Since I strongly typed the report document in the designer, the report document was created OK, but the dataset which the report was aliased to wasn't instantiated - causing Crystal to prompt for a data location.

When I clicked cancel to the logon prompt, the dataset was ultimately loaded, and then tied to the report -where the report was viewed without error.

I believe, at long last, the culprit is within the VS 2003 IDE, and how it auto-generates the necessary code for the report document (and the dataset). Since I was passing in a parameter to the dataset, maybe that prevents the dataset from being available to the report document somehow (before the form loads).

The code snippet shows that I created and filled the dataset before actually typing the report document. This solved the logon issue, and now I can sleep just a little bit easier at night knowing this.

This has been one of the most aggravating bugs I have ever had to solve. Just thought I'd throw that in.


Dim rdcAssignmentReport As CrystalDecisions.CrystalReports.Engine.ReportDocument
 
'Load Data, Prepare Report Viewer:
dsAssignmentReport.Clear()
With Me.adrAssignmentReport
     .SelectCommand.Parameters("ID").Value = Me.gAssignmentID
     .Fill(dsAssignmentReport, "vw_AssignmentReport")
End With
 
rdcAssignmentReport = New AssignmentReport
rdcAssignmentReport.SetDataSource(dsAssignmentReport)
Me.crvAssignment.ReportSource = rdcAssignmentReport
 
'Explicitly Tell Report Control that Toolbar needs to be displayed:
'(If this statement is not here, toolbar will not be displayed.)
Me.crvAssignment.DisplayToolbar = True

Open in new window

0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:pasemeraro
ID: 20320635
Say....how do i accept my own comment as the solution?

I'm new to Experts-exchange and would like to know :)

I'm feeling rather genius-like today :)
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 20325620
You can't.  As the Zone Advisor, I can so long as no experts object.  However the points will be refunded to you.

mlmcc
Crystal Zone Adisor
0
 

Author Comment

by:pasemeraro
ID: 20329744
Thanks :)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Pictures In Crystal 10 55
Crystal Reports Subreport details 16 66
How to modify the SQL query in Crystal 2016 1 28
Crystal Reports - Record selection filter - formula editor 3 17
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question