Print Page | Close Window

Undocumented? As always

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1759
Printed Date: 03 May 2024 at 11:34pm


Topic: Undocumented? As always
Posted By: DontRegisterEve
Subject: Undocumented? As always
Date Posted: 26 Nov 2007 at 9:25am
If I do:
Me.myCrystalReportViewer = New CrystalDecisions.Windows.Forms.CrystalReportViewer
and then:
        Me.myCrystalReportViewer.InitReportViewer()

If I right-click on it, and click Go To Definition, there is no description or documentation anywhere for "InitReportViewer".

It just says: Public Overridable Sub InitReportViewer()
     Member of: CrystalDecisions.Windows.Forms.CrystalReportViewer
which is already 100% obvious.

I'm looking for an event to tell me when the report is done loading...

This page says nothing about InitReportViewer:
http://www.crystalreportsbook.com/Crystal_Reports_Net_Ch14_3.asp






Replies:
Posted By: DontRegisterEve
Date Posted: 26 Nov 2007 at 10:59am
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.

I noticed that it wasn't running the report if the viewer was not Shown...

EDIT: This works good if you don't have parameters... if you do and try to use just "Refresh" it doesn't work anymore.

Looks like


Posted By: DontRegisterEve
Date Posted: 26 Nov 2007 at 1:40pm
WITH parameters, this works (for the PARAMVIEWER sample from BO; I've been trying to add an hourglass)

               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, this works better than my previous fix:

               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