How Do I Switch/update/refresh Devexpress Report?

1
0

Hello,

I hope to get support from this forum. I’m trying to use Devexpress Report in my App. I supply the Report with Objects created from the database. They work fine but when I change the datasource for the report at runtime, the report does not change/render the new report. It only renders the first report! I need help. It seems it does not refresh the reportviewer.

Secondly, when I run the application, it opens up two tabs in the browser instead of one! I also need help in this aspect.

Thank you

Adrian

  • You must to post comments
0
0

Dear friends, once again I’m back seeking for your support. Alaa, thank you for your support but it seems my labor is in vain. It seems the reportviewer only loads the report under the asPxWebDocumentViewerWrapper1_LoadComplete!

I’ve tried to call the Update method in the ASPxWebDocumentViewerWrapper Class under the under the OpenReport Method but the behavior of unending loops still occurs.

I’ve reattached the sample project with a database file in the bin folder. Its a VistaDb File and the connection string can be changed in the WebConfig file. I hope you shall be able to reference several required DevExpress Libraries as I cannot attach them here because of the file size limitations.

I’m eagerly waiting for your support.

Thank you

  • Ngabo Adrian
    Hasn’t anybody been able to see my sample application, test it and help me with this reporting problem? Please, help me. Thank you
  • You must to post comments
0
0

Dear Nagabo,

I believe that there’s a mistake in my answers.

ASP.NET wrapped controls cannot be used directly in Wisej events, everything that uses an ASP.NET control has to be done inside the control’s event:load, preload, etc…

So you can either:

A- Put your code inside the wrapped ASP.NET life cycle events

B- Use a JavaScript based control.

Sadly, we can’t change how those type of controls work.

For more info you can go to this link here: https://docs.microsoft.com/en-us/previous-versions/aspnet/ms178472(v=vs.100)

HTH,

Alaa

  • Ngabo Adrian
    Dear Alaa, greetings to you! Can you direct me where I can get free JavaScript controls that I can use for this purpose and I achieve the same results? Thank you.
  • You must to post comments
0
0

Dear Alaa,

Thank you for your support.

  1. I’ve used the Update method in a button click event as you’ve suggested. The result is that the Report is not shown or loaded though the viewer seems to have been updated.
  2. I’ve also used the Refresh method in the sameway but an error has been thrown “Partial Public Class ASPxWebDocumentViewerWrapper” Class as shown in the attached image.
    Please, your direction is still needed here.

Thanks

Attachment
  • You must to post comments
-1
0

Hi Ngabo,

The sample you provided won’t work for us because it’s missing the DB file.

You can try adding a asPxWebDocumentViewerWrapper1.Update() or asPxWebDocumentViewerWrapper1.Refresh() to update or refresh your Report Viewer.

And for the “two tabs” issue, I couldn’t reproduce it, perhaps you’re using Application.Navigate() somewhere within your app?

HTH,
Alaa

  • Ngabo Adrian
    Dear Alaa Thank you for your response. I’m grateful. However, I used the asPxWebDocumentViewerWrapper1.Update. The result was strange because when I run the report, it loaded the report well but followed by unending reloading of the same report over and over!!! I lacked means of stopping that behavior also. Perhaps I’m going to try the refresh method and see the result. Also, I may send again the sample with the database file soon but I will not be able to put DevExpress libraries (DLL) as you may know that they are enormously huge in number and size. I appreciate your support. Thank you very much!
  • Alaa (ITG)
    Hi Ngabo, I would assume that you’re using asPxWebDocumentViewerWrapper1.Update inside the asPxWebDocumentViewerWrapper1_LoadComplete method? Everytime you update or refresh the component it will infact fire the “LoadComplete” event, thus throwing you in an infinite loading loop. Try to use it in a Button Click event and see if it does the trick?
  • Ngabo Adrian
    Hello, I attached a sample project again yesterday with a small database file. Please, I’m kindly requesting to go through my sample project once again and help me out. Thank you
  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.