SSRS Viewer Refresh

I have a page that shows a custom report. I also have a grid that allows the user to enter or update records. That is done via dialogs windows. Is there a way to refresh the SSRS report when the dialog is closed to account for the changes when a record is modified or added?

Thanks

Hi @joshwilliam,

The only way is to reload the whole page:
window.location.reload()

I have noticed that this will refresh when I change the Step control to the previous page and click next again. Is there a way to call that instead? That would solve the issue. I tried implementing the AutoRefresh feature available in SSRS but that fails as soon as it tries connect again to get the data. I think that is because I am using the proxy to specify credentials.

Try to execute this.cd.detectChanges(); - it should reload the report viewer.

That did not work. I put this in the modal window then clause that runs when the user is done updating data. Nothing seems to happen but I get no errors either.

We just released update and I've added load() method for the report viewer similar to the DataGrid. You can execute this.ssrsviewer0.load() to force refresh of the report viewer.

I have updated my application but when I try it nothing happens. I created a button to test this and execute this.ssrsviewer0.load(); for the Click event. When I have the browser debug window open I do not see or capture anything happening. Am I doing something incorrect?

Thanks for the update

Check the browser developers tools network tab after executing the new method.

That is what I had checked. I just tried again. There is no activity when I click the button. Here is the code for the Click event.

Hi @joshwilliam,

I think I know what’s going on - I’ll send you latest private build when ready.

Here is it:
https://drive.google.com/file/d/1oUMI2XXZbxLjLNOlON2CHJI4lHcOR17L/view?usp=sharing

Hi @joshwilliam,

We discovered different problem with the private build and we will release directly official fix.

Ok. I tried the private build and it didn't work. Let me know when the new release is ready.

Thanks

I can confirm that this works now thank you!

For anyone else who is trying to refresh data by URL with SSRS you will need to make sure that the report does not have caching enabled and add a parameter to the SSRS report to clear the session data on every request. This is particularly important if you are sending the same parameters to the report every time but the data does not update. The parameter should be set to rs:ClearSession for the parameter name and the value should be set to true.

Thanks again for the quick feature add Radzen, it is much appreciated.

1 Like