on 06-05-2009 10:08 PM
How To Disable Verify Database Message Alert?
I have a VB6 open Crystal Reports using Crystal Reports XI R2 (SP5) and almost every time I open a report, I get an alert message about the table has been changed and I have to click "Ok" to make it goes away. Is there a way to disabled this alert or set default to "Ok" so I do not have to click this message every report. Thank you very much.
Verify the report in CR Designer or use the SaveAs method to keep the report up to date.
The reason it is there is because the database has changed since the report was originally designed. CR assumes you are using an up to date and verified report.
It's a warning because by default CR deletes and fields that we cannot map directly which can make your report completely error.
Solution is to verify the report in the designer or in code and save it. Next time the report warning won't pop up.
Thank you
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I assume you are using the RDC so it's simply:
report.database.verify
If however if CR can't map fields then the default mapping function is set to auto which means it simply removes those fields in code.
You can use the Viewer event to set that option to Auto, Prompt, or coded mapping. Check the viewer events for more info and the Developer help file for sample code.
There is no equivolent in .NET. CR assumes the reprot you are using have been manaully verified before publishing or shipping with your application deployment.
Thank you
Don
I am sorry that I was not very clear myself last post. What I am looking for is to disable database verifying. Report.Database.Verify will bring up another window for verifying database. I open the Viewer but I cannot find out where to set the option to Auto, Prompt, or coded mapping.
I open the report manually from CR Designer and manually Verify & Save it. Then open the same report through CR Viewer in VB6 and still a message popup saying that "The table has been changed. Proceeding to fix up the report."
Below is my source code:
Dim CRApplication As CRAXDDRT.Application
Dim Report As CRAXDDRT.Report
Set Report = CRApplication.OpenReport(sReportFilePath)
Report.MorePrintEngineErrorMessages = False
Report.Database.Tables(1).SetLogOnInfo sServer, sDatabase, sUid, sPwd
With CRViewer
.ReportSource = Report
.Visible = True
.DisplayToolbar = True
.EnableAnimationCtrl = True
.EnableDrillDown = True
.EnableExportButton = True
.EnableGroupTree = True
.EnableNavigationControls = True
.EnablePrintButton = True
.EnableProgressControl = True
.EnableRefreshButton = True
.EnableSearchControl = True
.EnableSearchExpertButton = True
.EnableSelectExpertButton = True
.EnableStopButton = True
.EnableToolbar = True
.EnableZoomControl = True
.DisplayTabs = False
.ViewReport
While .IsBusy
DoEvents
Wend
.Refresh
DoEvents
End With
Thank you sir very much for helping me.
Hello,
You must verify if the database has changed so you can't disable the message. CR must match what the DB is using or the reports will fail or return wrong data.
It's odd that even after verifying the DB in the designer your app still needs it to be verify the report. You did save the report correct?
Also:
Dim CRApplication As CRAXDDRT.Application
Dim Report As CRAXDDRT.Report
Is the report creation engine and you should be using craxdrt.dll. You need to be licnesed to use craxddrt.dll and this may cause problems for you later when deploying.
Use:
Dim CRApplication As CRAXDRT.Application
Dim Report As CRAXDRT.Report
The mapping is not a switch you can turn on or off but it is Event driven. You need to add code to the viewer section to capture the event if the mapping event fires. Then you can set it to the way you want to use it.
I suggest you purchase a case on line and get to the Report Design team to figure out why when you verify the report your app still thinks it needs to be verified. Something going on in your report that the forum makes it difficult to debug the problem. You can't attach files to forums.
Link to Single Case purchase:
Thank you
Don
Still I do not understand why CRAXDDRT popup the alert but CRAXDRT does not? Thank you very much.
CRAXDDRT is the embedded Designer Control which has more functionality for designing within your IDE. Therefore you would want to see there is a DB issue. CRAXDRT is runtime only and thus you would handle mapping programatically.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.