Resolved Error Runtime with progress and crystal report

Hi everyone,

Since two weeks now we have run time error with crystal report as the image below:
Capture ERROR MESSAGE 1-20-20.PNG

We are running on our user the last version of windows.

This error is random. Sometimes we can generate 10,20,30 and more and nothing will happen. And sometimes we can have it at the height one.
The data is not an issue there because after crash we can generate the report that crashed.

Do you have encounter this ?

Best Regards,

- BobyIsProgress -
 

Cringer

ProgressTalk.com Moderator
Staff member
Unfortunately, running OE10 on the latest Windows is going to cause problems like this. I've never seen this error before, but it looks very much like an incompatibility. That being said, the obvious question is, what changed 2 weeks ago?
 

RealHeavyDude

Well-Known Member
Unfortunately I am not allowed to post the code or give away the solution.

Nevertheless - if you are familiar with how use C# objects from within the ABL and you Google for "how to use crystal report viewer in C#" then you will find tons of information.

You need to install the Crystal Reports runtime ( which you need anyway ) - it does also install the necessary .NET assemblies.

In a nutshell:
  • We create ProDataSets which hold the report data and export it as xml so that from CR's point of view it looks like an ADO .Net dataset.
  • We instantiate the report viewer and have it open the xml.
Basically we need the following assemblies:
<assembly name="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<assembly name="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<assembly name="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<assembly name="CrystalDecisions.Windows.Forms, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />

HTH, RealHeavyDude.
 
Hi ,

I found some documentation and tutorial with your help.

But I'm confused. Progress send me this error:
1579776968374.png
In english : Class or Interface "CrystalDecisions.CrystalReports.Engine" not found .

But as you can see in my screenshot he is in my xml assembly .

Do you have any idea ?

Best Regards,

- BobyIsProgress -
 

RealHeavyDude

Well-Known Member
Your using statement is wrong.

Code:
using CrystalDecisions.CrystalReports.Engine.*.

/* or */

define variable reportDocument   as class  CrystalDecisions.CrystalReports.Engine.ReportDocument  no-undo.
 

RealHeavyDude

Well-Known Member
Code:
            /* Create a new ABL for .NET Windows form instance */
            assign formObject = new Progress.Windows.Form ( ).
            assign formObject:Text = 'AoS Report viewer'
                   formObject:Size = NEW System.Drawing.Size ( horizontalSize, verticalSize ).

            /* Create a new Crystal Reports viewer instance */
            assign crystalReportViewer = new CrystalDecisions.Windows.Forms.CrystalReportViewer ( ).
            assign crystalReportViewer:ActiveViewIndex          = -1
                   crystalReportViewer:BorderStyle              = System.Windows.Forms.BorderStyle:FixedSingle
                   crystalReportViewer:Dock                     = System.Windows.Forms.DockStyle:Fill
                   crystalReportViewer:Location                 = new System.Drawing.Point ( 0, 0 )
                   crystalReportViewer:Name                     = "crystalReportViewer1"
                   crystalReportViewer:SelectionFormula         = ""
                   crystalReportViewer:Size                     = new System.Drawing.size ( horizontalSize, verticalSize )
                   crystalReportViewer:TabIndex                 = 0
                   crystalReportViewer:ViewTimeSelectionFormula = "".

            /* Add the Crystal Report viewer to the ABL for .NET Windows form and display the record */
            formObject:Controls:Add ( crystalReportViewer ).
            assign crystalReportViewer:ReportSource = reportDocument. /* Automatically displays the report */
            infoMessage ( 'Report successfully displayed.' ).
 
Hi,

there some news. I think I will not be able to do it for those reasons:
1. OE10.2B
2. Crystal Report XI

Crystal report has the OCX for oe 10 so I think they didn't add the "CrystalDecisions.Windows.Forms.CrystalReportViewer " in their assembly .

So I will waite for now. And work on it sometimes when I found something new .

Best Regards,

- Vivien -
 
Top