Refresh dashboard?

Stimulsoft Dashboards.WEB discussion
Post Reply
TestBoy
Posts: 32
Joined: Tue Oct 23, 2018 8:14 pm

Refresh dashboard?

Post by TestBoy » Sun Apr 14, 2019 12:35 am

Identical to what is discussed here:
viewtopic.php?f=13&t=57213

But I get:

Uncaught ReferenceError: jsNetCoreViewer1 is not defined

I have no idea how to reference it?

It's defined in the page just like the example and it works fine otherwise, I just need a way to refresh it after I push new variables like a date range, etc.

Code: Select all

@Html.StiNetCoreViewer(new StiNetCoreViewerOptions()
{
    Actions =
    {
        GetReport = "GetReport",
        ViewerEvent = "ViewerEvent"
    }    
})
Lech Kulikowski
Posts: 1305
Joined: Tue Mar 20, 2018 5:34 am

Re: Refresh dashboard?

Post by Lech Kulikowski » Wed Apr 17, 2019 5:04 pm

Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.
TestBoy
Posts: 32
Joined: Tue Oct 23, 2018 8:14 pm

Re: Refresh dashboard?

Post by TestBoy » Tue Apr 23, 2019 3:09 pm

This is all it is...

Code: Select all

<button type="button" onclick="jsNetCoreViewer1.postAction('Refresh');" class="btn btn-primary" style="margin-left: 20px;" data-toggle="modal" id="submit">Refresh</button>
I don't think you need an entire application for a button?
Lech Kulikowski
Posts: 1305
Joined: Tue Mar 20, 2018 5:34 am

Re: Refresh dashboard?

Post by Lech Kulikowski » Thu Apr 25, 2019 8:20 pm

Hello,

Please check that you specify correct viewer ID:
use object with name js + viewer ID, by default - jsNetCoreViewer

Thank you.
TestBoy
Posts: 32
Joined: Tue Oct 23, 2018 8:14 pm

Re: Refresh dashboard?

Post by TestBoy » Fri Apr 26, 2019 8:23 pm

Ok, so by chance I dropped the 1 from the end and it seems to work?

Is it supposed to have a 1?

It might work now but if it's supposed to have some ID number I don't want it to break later.
Lech Kulikowski
Posts: 1305
Joined: Tue Mar 20, 2018 5:34 am

Re: Refresh dashboard?

Post by Lech Kulikowski » Mon Apr 29, 2019 1:11 pm

Hello,

The specified ID is formed as: 'js' + ID of component, where ID of component may be set when it created, by default 'NetCoreViewer':
@Html.StiNetCoreViewer("NetCoreViewer", new StiNetCoreViewerOptions()

Thank you.
Post Reply