Jump to content
JasperReports 7.0 is now available ×

jun.an

Members
  • Posts

    1
  • Joined

  • Last visited

jun.an's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. <html><head> <script type='text/javascript' src="https://xxx.com/jasperserver-pro/client/visualize.js"></script></head><body> <button onclick="dashboardA()">Dashboard Type A</button> <button onclick="dashboardB()">Dashboard Type B</button> <button onclick="dashboardBWithDifferentParams()">Dashboard Type B with different params</button> <div id="container" style="width: 100%; height: 100%;"></div> <script> function runDashboard(config) { visualize({ auth: { name: "id", password: "password", organization: "organization_1" } }, function (v) { v.dashboard(config); }); } dashboardA(); function dashboardA() { runDashboard({ resource: "pathA", container: "#container", params: {} }); } function dashboardB() { runDashboard({ resource: "pathB", container: "#container", params: { projectId: ["78CDBAFB-C517-4BCC-B7E7-C86C76F0D1CB"] }, linkOptions: { events: { click: (event, link, defaultHandler) => alert(link.parameters.projectId) } } }); } function dashboardBWithDifferentParams() { runDashboard({ resource: "pathB", container: "#container", params: { projectId: ["3DC646DA-BD65-4E5F-842F-7BA730CB79A0"] }, linkOptions: { events: { click: (event, link, defaultHandler) => alert(link.parameters.projectId) } } }); } </script></body></html>[/code]As you can see, I need to update dashboard with different params or different resource path on same div. I tried using dashboard.params({}).run(); but it only works on same resource of dashboard. Is there any way to update dashboard? Even though dashboard is refreshed, params are still previous params that I ran the first time. Help me...
×
×
  • Create New...