Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Undocumented? As always Post Reply Post New Topic
Author Message
DontRegisterEve
Newbie
Newbie


Joined: 26 Nov 2007
Online Status: Offline
Posts: 6
Quote DontRegisterEve Replybullet Topic: Undocumented? As always
    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





Edited by DontRegisterEve - 26 Nov 2007 at 9:27am
IP IP Logged
DontRegisterEve
Newbie
Newbie


Joined: 26 Nov 2007
Online Status: Offline
Posts: 6
Quote DontRegisterEve Replybullet 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

Edited by DontRegisterEve - 26 Nov 2007 at 12:57pm
IP IP Logged
DontRegisterEve
Newbie
Newbie


Joined: 26 Nov 2007
Online Status: Offline
Posts: 6
Quote DontRegisterEve Replybullet 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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.