Crystal Deployment Problem [RESOLVED]

jeva39

Well-known member
Joined
Jan 28, 2005
Messages
135
Location
Panama
Programming Experience
1-3
I finish an VB.NET application to install in a computer with Windows 98. Framework 1.1, MDAC 2.8 are installed. The application run OK except for the Crystal Reports. I use this MSDN instructions for deployment:

To deploy your application, you need to create a setup project and add the necessary merge modules to your application before you build your solution.

1. Open your Windows application.
2. In the Solution Explorer, right-click your Windows application solution, point to Add then click New Project.
3. In the Add New Project dialog box, select Setup and Deployment Projects in the Project Types pane and select Setup Project in the
Templates pane. Click OK.
4. In the Solution Explorer, right-click the Setup Project, point to Add then click Project Output.
5. In the Add Project Output Group, select Primary output and click OK. Any dependencies, such as the Crystal_Managed2003.msm, are added automatically.
6. In the Solution Explorer, right-click the Setup Project, point to AddMerge Module. then click
7. In the Add Modules dialog box, select the following merge modules to add to your Setup project and click Open:
* Crystal_Database_Access2003.msm
* Crystal_Database_Access2003_enu.msm
* Crystal_regwiz2003.msm

For a description of these merge modules see Crystal Reports Merge Modules.
8. In the Solution Explorer, right-click the Crystal_regwiz2003.msm file and choose Properties.
9. In the Properties window, expand MergeModuleProperties and enter a valid license key in the License Key properties box.

Note: Providing the license key is a mandatory step whenever you deploy a Crystal Reports for Visual Studio .NET application.

A license key will be given to you once you have registered Crystal Reports for Visual Studio .NET. You can find the license key in the

About dialog box. From the Help menu, choose About Microsoft Development Environment. The keycode is listed in the Installed Products
field.
10. From the Build menu, choose Build Solution to build your application.

When deploying to a client or server computer, always ensure that the computer already has the .NET Framework installed.



All the above steps are completed OK, I include the report in the Setup, the Path for the .RPT are correct, the Report Form open but don't read the report. The error:

FAILED LOADING REPORT.

Please can tell me what is wrong?

Thanks...
 
Hi kulrom...

Again a problem with Crystal in W98 Machine. I have 12 Reports. 8 of they work fine but in the rest (4), when I click the Menu Option to see the report, the App close like if you finish it with the Exit button. In the code, for all the Reports, I use your Zip Sample. All the Reports have the same code:

VB.NET:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class Reportes
  Inherits System.Windows.Forms.Form
.....more code......

 Private Sub Reportes_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
	Dim document As ReportDocument
	document = New ReportDocument
	document.Load(Application.StartupPath & "\" & vReporte)
	CRView.ReportSource = document 
	CRView.Refresh()
End Sub
End Class

Do you know the cause of this very extrange error?

Note: In the Xp Machine, no problem. All the reports run OK.

Thanks!!
 
Hi!

This is a sample of the code that call each report in the Main Form menu options: (vReporte is a Friend variable declared in a Module)

VB.NET:
.........
Private Sub mnuECI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuECI.Click
	vReporte = "CLCtaI.rpt"
	Dim oRep As New CtaInd
	oRep.ShowDialog()
End Sub
...........

And this is the complete code (Reportes.vb) that manage all the Reports:

VB.NET:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class Reportes
  Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

  Public Sub New()
	MyBase.New()

	'This call is required by the Windows Form Designer.
	InitializeComponent()

	'Add any initialization after the InitializeComponent() call

  End Sub

  'Form overrides dispose to clean up the component list.
  Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
	If disposing Then
	  If Not (components Is Nothing) Then
		components.Dispose()
	  End If
	End If
	MyBase.Dispose(disposing)
  End Sub

  'Required by the Windows Form Designer
  Private components As System.ComponentModel.IContainer

  'NOTE: The following procedure is required by the Windows Form Designer
  'It can be modified using the Windows Form Designer.  
  'Do not modify it using the code editor.
  Friend WithEvents CRView As CrystalDecisions.Windows.Forms.CrystalReportViewer
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
	Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Reportes))
	Me.CRView = New CrystalDecisions.Windows.Forms.CrystalReportViewer
	Me.SuspendLayout()
	'
	'CRView
	'
	Me.CRView.ActiveViewIndex = -1
	Me.CRView.DisplayGroupTree = False
	Me.CRView.Location = New System.Drawing.Point(8, 8)
	Me.CRView.Name = "CRView"
	Me.CRView.ReportSource = Nothing
	Me.CRView.Size = New System.Drawing.Size(768, 532)
	Me.CRView.TabIndex = 0
	'
	'Reportes
	'
	Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
	Me.ClientSize = New System.Drawing.Size(782, 553)
	Me.Controls.Add(Me.CRView)
	Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
	Me.MaximizeBox = False
	Me.MaximumSize = New System.Drawing.Size(790, 580)
	Me.MinimumSize = New System.Drawing.Size(790, 580)
	Me.Name = "Reportes"
	Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
	Me.Text = "Caritas. Reportes"
	Me.ResumeLayout(False)

  End Sub

#End Region
Private Sub Reportes_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
	Dim document As ReportDocument
	document = New ReportDocument
	document.Load(Application.StartupPath & "\" & vReporte)
	CRView.ReportSource = document ' "f:\caritasp\" & vReporte 'document
	CRView.Refresh()
End Sub
End Class

That's all. As you see, is very simple and I don't know why crash with only 4 Reports of the total 12. In addition, I made a very detailed review of each of failed reports a don't find any error. All the 12 reports are also very simples, don't include graphics or anything that causes problems.

Thanks
 
kulrom:

Only for verifying that the 4-problems reports they don't have internal errors, I create one of they from scratch, delete the old, recompile and install in W98 again. Result: the same error: the App crash with this and the other 3!! :confused:

Regards...
 
I put the Try Catch but nothing. No errors appear. Simply, crash. As you say, I also don't believe this situation. (I'm trying in the machine of my wife with W98). But, sincerely, thanks very much for your time. This error, I think, don't have any logic or valid explanation. :eek: Today in the morning I install the App in another W98 machine, but also the same error.

Regards...
 
I change the path, using absolute, for one of the "Good-Reports" and one of The "Bad-Reports". I think you don't believe, like me, but the Good Report Work and the Bad Report Crash the App. In coclusion, this error is the Winner of the OSCAR in the Category of "No-Logical Errors" :)
 
I think it's really not as bad as it looks on first sight. probably it needs to be reviewed very carefully (you know, for many programmers, debugging is the hardest part of programming) ... hmm ... let me think for a while what can cause this strange bug ... (i wouldn't be surprised so much if other reports don't work as well but 8 of them work OK and rest 4 don't ... :(

Can you send me the bugged reports? i will test them here, on my test (win98se) machine

Cheers ;)
 
I attach to this post the 4 crazy reports and an example (few records) of the DB. This way is more simple to you see the reports. Thanks....
 

Attachments

  • Reports.zip
    52 KB · Views: 60
Well, i found the bug, and it wasn't really bug but rather an oversight ...
Actually, it was caused by some changes to the data-structure of DB that you have done meanwhile but you have forgoten to verify the same ... always verify DB (applychanges) after you change data-structure.

Solution: open all these reports one by one and go to Field Explorer> right-click Database Fields> Verify Database

Cheers ;)
 
Thanks, kulrom! Right now I go to verify the DB in the Bad Reports. You are right: I made changes in the DB to apply modifications of Caritas needs. Lather I tell you what happen. Regards....
 
Really, this bug is incredible!! I verify the DB in all the Reports not only the 4-Bad. Save all, recomplie and install again all the App. You don't believe: the App crash allways with the 4 Reports..... I install in my Computer an Virtual PC (Microsoft) with Win98 for trying and the result...Crash with the same reports.

I install today the application in Caritas without these reports because they need urgent the App. This gives me a little more of time to find the solution, obvious, with your aid :) and lather install the failed Reports. Again, thanks for your time, kulrom!!!

Regards....
 
Back
Top