ERROR TypeError: v.AdHocView is not a function

Hi, 

using jasperserver 7.1.0 with visualize.js tool. i m able to render dashboard and reports.However when trying to render an adhoc view it throws "ERROR TypeError: v.AdHocView is not a function" .

DisplayAdHocViewPlaceHolder(value : any): void {
    visualize({
                // already authenticated, so proceed with resource rendering
              },
              function(v) {
                  v.AdHocView({
                      resource:  value,          // value should have the resource uri
                      container: "#placeholder",
                      error:     handleError,
                      success:   handleSuccess
                  });
                  function handleSuccess(){
              };
              function handleError(err){}
    });
}

am i using an old visualize.js file ?

please advise

thanks!

mounir.youssef's picture
Joined: Feb 16 2018 - 3:59am
Last seen: 4 years 1 month ago

v.AdHocView should be replaced by v.adHocView as per the visualize.js file. i was following the user guide that mention the AdHocView with A uppercase

mounir.youssef - 4 years 8 months ago

2 Answers:

I think problem can be in cache. Can you try clear browser caches

ybablyuk's picture
786
Joined: Oct 17 2012 - 12:51am
Last seen: 4 years 5 months ago

thanks for your answer. the solution was to use v.adhocView function and not the  v.AdHocView with "A" in uppercase

mounir.youssef's picture
Joined: Feb 16 2018 - 3:59am
Last seen: 4 years 1 month ago
Feedback