Print Page | Close Window

Can we get an InitReport for CRV class?

Printed From: Crystal Reports Book
Category: General Information
Forum Name: New feature request
Forum Discription: Share what features you want to see in the next release of Crystal Reports.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1758
Printed Date: 04 May 2024 at 1:44am


Topic: Can we get an InitReport for CRV class?
Posted By: DontRegisterEve
Subject: Can we get an InitReport for CRV class?
Date Posted: 26 Nov 2007 at 9:09am
InitReport()     Fired after a report has been successfully loaded. This is the only event available for the ReportDocument class. This is not available for the CrystalReportViewer class.

Why not? Nobody knows. I call laziness.

All I need is an event to tell me when the report is done loading. I am shocked that this was not included.

I have reports that take a minute or two to load. But there is no Event that is ever fired when the loading is complete. If I "UseWaitCursor" it never goes away because the CRV class never seems to know when a report is loaded.

I'm using VB.NET 2005 and for now I have no hourglass... Anyone know a work-around for this?

BTW business objects? Their support is awful. They create new versions and ditch the previous version support. Half of the articles online 'cannot be found'.



Replies:
Posted By: DontRegisterEve
Date Posted: 26 Nov 2007 at 10:58am
I fixed it with the following work around:

               Me.Cursor = Cursors.WaitCursor
               Me.Show()
               myCrystalReportViewer.ReportSource = ReportNameValue
               myCrystalReportViewer.RefreshReport()
               myCrystalReportViewer.Show()
               Me.Cursor = Cursors.Default

I'm using the VBnetPARAMVIEWER sample. I just wanted to add a ****ing hourglass.


Posted By: DontRegisterEve
Date Posted: 26 Nov 2007 at 1:38pm
WITH parameters I had to use this code:

               Me.Cursor = Cursors.WaitCursor
               Me.Show()
               myCrystalReportViewer.Hide()
               myCrystalReportViewer.ReportSource = ReportNameValue
               myCrystalReportViewer.ParameterFieldInfo = myParams
               myCrystalReportViewer.ShowFirstPage()
               Me.Refresh()
               myCrystalReportViewer.Refresh()
               myCrystalReportViewer.Show()
               Me.Cursor = Cursors.Default

without parameters I switched it to:

               Me.Cursor = Cursors.WaitCursor
               Me.Show()
               myCrystalReportViewer.Hide()
               myCrystalReportViewer.ReportSource = ReportNameValue
               myCrystalReportViewer.ShowFirstPage()
               Me.Refresh()
               myCrystalReportViewer.Refresh()
               myCrystalReportViewer.Show()
               Me.Cursor = Cursors.Default



Print Page | Close Window