cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports 8.5 CRViewer Print Button Problem on Win 7 Pro 64 bit (iFIX 5.1- VBA6.5)

Former Member
0 Kudos

Hi Guys,

I have integrated a Crystal Reports 8.5 CRViewer for generating few reports in a SCADA System iFIX 5.1 from an SQL Server 2005 on a XP pro 32 bit SP1. Everything works fine, Reports are displaying and printed correctly.

My customer has delivered me a Win 7 pro SP1 64bit PC to load the application.

After the installation, almost everything works correctly.

My Crystal Report 8.5 fetches data very fast from the SQL Server Database and displays everything correctly without error. (even very big requests of 70000 records !!)

My problem is that the print button of the CRViewer has a strange behaviour!

I can print without problems all the reports that do not contain SQL Server Data. (Those that get Data by passing parameters to the report fields).

But every time I make a request to the SQL Database, the display works, the print button reacts as if it will print something (Dialogbox with the Default Printer an selection of "All pages " of Pages from "" to "" , appears and disappears after clicking Print, but nothing happens: no print, nothing in the spooler, no error in the Windows event history !!

Has someone an idea where the problem is ?

Here my code that get displayed but can't be printed:

(the one that works doesn't have the strQuery , nor the line: CrRep.SQLQueryString = strQuery)

******************************************************************************************************************

'Create the Report Instance

    Dim CrApp As CRAXDRT.Application

    Dim CrRep As CRAXDRT.Report

    Set CrApp = New CRAXDRT.Application

  strQuery = "SELECT * " & _

  "FROM " & _

      "DBALARMSSQL.dbo.FIXALARMS FIXALARMS " & _

  "WHERE " & _

     "FIXALARMS.ALM_NATIVETIMEIN >= {ts '" & strStartTime & "'} AND " & _

     "FIXALARMS.ALM_NATIVETIMEIN < {ts '" & strEndTime & "'} " & _

  "ORDER BY " & _

     "FIXALARMS.ALM_NATIVETIMEIN ASC"

    Set CrRep = CrApp.OpenReport("C:\abc\APP\RAT85sql.rpt")

    CrRep.DiscardSavedData 'Discard saved data

    CrRep.ParameterFields.GetItemByName("DTStart").AddCurrentValue strStartRTime

    CrRep.ParameterFields.GetItemByName("DTEnd").AddCurrentValue strEndRTime

CrRep.SQLQueryString = strQuery

'Display the report

CRViewer1.ReportSource = CrRep

CRViewer1.ViewReport

  'Wipe out

Set CrRep = Nothing

Set CrApp = Nothing

******************************************************************************************************************

I have the following reference in the VBA environment: Crystal Reports 8.5 Active Designer Run time Library

Thanks for your answers !

Stephan

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Well, considering that CR 8.5 shipped about 10 years before Win 7 was even in someone's mind as a concept... E.g. CR 8.5 is not supported on WIN 7.

You're essentially asking the horse and buggy to get you to the moon.

It simply will not work. Time to update your app. Unfortunately, you are so far behind the times, that you have a lot of catching up to do.

1) Looking at the code, you are using the RDC SDK in your app. This SDK was retired in CR XI R2 (11.5) and CR XI R2 has been out of support for a few years now. And even CR XI R2 was only officially supported on WIN 7 with the last Service Pack (SP 6) released for CR XI R2.

2) Going forward, you will have to update your app to VS .NET. If VS 2008, then you need to obtain CR 2008. If VS 2010 / 2012, you will need to obtain 'SAP Crystal Reports, developer version for Microsoft Visual Studio"

As an absolute desperate resort, you may want to consider obtaining CR XI R2 and upgrading your app to that. I have no idea if CR XI R2 is available anymore, but you can phone sales (866-681-3435) and see what they tell you. Please do keep in mind that CR XI R2 is out of support. So, no phone support, no fixes.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Hello Ludek,

Thank you first for your fast reply.

My major Problem is that the IFIX 5.1 SCADA System is based on VBA 6.5 and works as 32 bit Software (with WoW64 compliance to Win7 64bit OS).

My question is: If I have to use the actual version of Crystal Reports, would the code change a lot ?

Would I have the same kind of OCX to have the CRViewer ? Or is that particular for RDC SDK ?

If it is the case, which is the actual version of CR Runtime files ?

I already have versions 8.5, 9, 10 and CR 2011 (Developer Version 14.0.2.364 RTM.)

Regards

Stephan

former_member183750
Active Contributor
0 Kudos

IF you update to CR XI R2 and use the same SDK (RDC), then no code change should be needed - maybe. Depends on the reports, database, etc., as the database engine was rewritten in CR 9. Only way to tell is to test.

Going to CR 2011 will not help as this version of CR does not ship any SDK.

Going to the CR SDK for .NET, is a complete rewrite.

- Ludek

Former Member
0 Kudos

Hello Ludek,

Where can I get these versions ? I tried to get some support here, but it seems quite difficult to reach the right person. Is there a possibility to get the verson CR XI R2 to make the tests ?

Thank you

Stephan

former_member183750
Active Contributor
0 Kudos

CR XI R2 eval (I think it's a 30 day eval) can be downloaded from here:

https://www.sap.com/campaign/2010_CURR_SAP_Crystal_Reports_XI_Developer/WTY_2010_CURR_SAP_Crystal_Re...

Theoretically, all you should need to do, is install the above and update the references to files (craxdrt.dll and crviewer.dll) to version 11.5 and all should just work. Notice all the shoulds . Going from CR 8.5 to CR XI R2, you are skipping CR 9, 10, and 11. And in CR 9, the database engine was completely re-written, so any database code may need to be modified. But this depends on all kinds of details. So, let's see what happens when you do set the new references and cross the next bridge as it comes.

- Ludek

Answers (0)