Please Wait Message/ Image While Loading A Crystal Report

While working with CrystalReport we usually meet situations in which the report will take more then usual time in loading.Here i am talking about crystal report but it may be the situation of any heavy page. In these situation due to lack of information user may try to click or may be close the browser and think that there might be some problem.

So “Please Wait” messages or Image are an excellent way to let the user know that your CrystalReport is performing some action, such as loading or processing data.

Let’s do this task in some steps:

Step-1:

The first step is to create the “Please Wait” message itself. I will also create button here and i will set it’s height, width and BorderWidth attribute to zero to make it invisible to the user. I will also put it in the update panel. Here in update panel i will also put my CrystalReportV iewer control.

 












Please wait while report is being generated.

Step-2 :Add Client Script

Now in the second step I will put the client script to click the button.

 



function do_totals1() {

 

window.setTimeout('do_totals2()', 100)

}

 

function do_totals2()

{

var IsPostBack = '';

if (IsPostBack == 'True') {

document.getElementById('').click();

}

 

}

 

Step-3 : Go to Code Behind

Now in the third step I will code the logic of the Button Click on server Side

Sub PrintReport(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnHide.Click

 

FillReports()

pleasewaitScreen.Visible = False

CRDiv.Visible = True

End Sub

 

Protected Sub FillReports()

 

'Write the code here to fill the CrystalReportViewer

End Sub
150 150 Burnignorance | Where Minds Meet And Sparks Fly!