Page 1 of 1

Refresh dashboard?

Posted: Sun Apr 14, 2019 12:35 am
by TestBoy
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"
    }    
})

Re: Refresh dashboard?

Posted: Wed Apr 17, 2019 5:04 pm
by Lech Kulikowski
Hello,

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

Thank you.

Re: Refresh dashboard?

Posted: Tue Apr 23, 2019 3:09 pm
by TestBoy
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?

Re: Refresh dashboard?

Posted: Thu Apr 25, 2019 8:20 pm
by Lech Kulikowski
Hello,

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

Thank you.

Re: Refresh dashboard?

Posted: Fri Apr 26, 2019 8:23 pm
by TestBoy
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.

Re: Refresh dashboard?

Posted: Mon Apr 29, 2019 1:11 pm
by Lech Kulikowski
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.