Wednesday, March 28, 2012

Problem in Crystl Report Viewer.CloseView Method

Hello K.Babu

My Self Sanjeev. i want to ask about crystal report viewer control. i am using crystal report 8.5 version. i using crviewer to view the report. by crviewer.viewreport() i view the reoprt now i want to close the view, so i use crviewer.closeview(index) method but it gives error. index parameter not accepting string data type. and also not 1,-1,0 to close the view. i use activeindex of crviewer but not woking. so please help me to solve this problem. i needed it veru much

SanjeevLooks like something is wrong with dealing with viewObject. Did u use AddView method to add ViewerObject. It's not picking the index properly.

THanks|||hello,

i have not used addview method to add view for the viewobject. how to use it? can u please explain it.

Thankx

Sanjeev|||So far in my application I haven't used view.. it's not clear yet whether I need to use view or not ?

I see this particular function :

closeCurrentView
If the canCloseCurrentView property is True, closes the current view. Equivalent to the Close button in the toolbar. A viewClosed and a viewActivated event are fired. The currentViewName property is changed.

Syntax
void closeCurrentView ()

check whether this server our purpose.

Thanks|||Sorry sir,

this will not solve the problem. i have know that whether the canCloseCurrentView() is method of what? 'coz both the ceviewer and crystalreport is not having property,method,function like this.

and i want to close the view.

sanjeev.|||Do u really need view in your application ? What if you don't close the view ?|||Hello Sir,

I want to create 1 DLL file which includs several reports in it. and i will add reference of that file to my VB Project. So i used Crystal 8.5 and Vb 6.0. i create 1 dll but with ne VB form which have the crystal report viewer control shows the Report which i passed through VB. now when i close the Form of viewer. Dll component does not get closed. i.e. the instance of the object is not closed and project goes into HangUp position. if so i want to close the view first so i can set the object to nothing.

So please help me to di it.

Sanjeev

No comments:

Post a Comment