KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Unable to action on "Add table" - Uncaught ReferenceError: visualQuery1 is not defined- VisualQuery #1751

Open Marc Copson opened this topic on on Dec 7, 2020 - 9 comments

Marc Copson commented on Dec 7, 2020

Hey Team,

I'm unable to make action on "Add Table"/"Reset" buttons for Visual Query with laravel. Apparently, the click event is not happening on buttons. Also, I'm getting the error in the console as like in the below screen

The paths for the js files are

http://mac.local/koolreport_assets/js/KRDataTables.js http://mac.local/koolreport_assets/3157288213/KoolReport.js http://mac.local/koolreport_assets/inputs/bower_components/bootstrap-multiselect/bootstrap-multiselect.js

Is there anything that I missed here while config the visual query or any suggestions to solve this issue?

David Winterburn commented on Dec 8, 2020

Hi Marc,

Apparently there was some syntax error when loading the js files which stopped VisualQuery from initialization. Would you please click on the read error and inspect your output html to see where the syntax error came from.

To test whether VisualQuery works I would suggest you try the simplest report view with only VisualQuery widget and nothing more.

Looking forward to hearing back from you. Thanks!

Marc Copson commented on Dec 8, 2020

Hi David,

As you suggested, I checked the output Html, I don't see any error there.

The syntax error is coming from the file http://mac.local/koolreport_assets/inputs/bower_components/bootstrap-multiselect/bootstrap-multiselect.js which is auto-generated while composer update from this config inside VisualQuery.php. Please check the below screen

Also if you check the rendered file paths for these

http://mac.local/koolreport_assets/js/KRDataTables.js http://mac.local/koolreport_assets/3157288213/KoolReport.js http://mac.local/koolreport_assets/inputs/bower_components/bootstrap-multiselect/bootstrap-multiselect.js

I don't see, it is creating folders like js and inputs/bower_components/ inside public/koolreport_assets folder.

Could you please help me with any reference link for simple report view for VisualQuery widget? or Is there a way I can override the onclick actions for visualQuery on my own?

David Winterburn commented on Dec 9, 2020

Hi Marc,

I forgot to mention one detail. The VisualQuery package uses some client input controls from the Inputs package. Did you have Inputs package installed as well? If you have license but haven't install it please do install. If you don't have license for Inputs we will send you the required client input controls (not the php part) for free. Thanks!

Marc Copson commented on Dec 9, 2020

Hi David,

Even after installing the inputs package, it did not solve the problem. Please send me the client input controls If you're not referring the same package which was highlighted in the below screen.

I still have the same error logging in the console, please help me out to resolve this issue.

David Winterburn commented on Dec 10, 2020

Hi Marc,

There had been a syntax error before the multiselect was initialized. Would you please post your full report view file for us to check it for you. Thanks!

Marc Copson commented on Dec 10, 2020

Hi David,

The above one itself is the full report view in the browser console. Also, I tried calling CDN link for bootstrap multiselect but no use.

When I compile assets, In laravel public folder it creates 4 folders with random numbers as their names and in one folder like in the below screen

Also in one folder, it had copied the all the VisualQuery files like in the below screen. I really don't understand what is happening here.

Also if you see these two files, I don't see js and inputs/bower_components folders inside kool_reports in the public folder. I don't see from where this file is coming through KRDataTables.js

http://mac.local/koolreport_assets/js/KRDataTables.js http://mac.local/koolreport_assets/inputs/bower_components/bootstrap-multiselect/bootstrap-multiselect.js

I'm not able to progress on VisualQuery report generation from 4days, Could you please help me with any other alternative solution or is there a way of overriding the button actions? Thank you!

David Winterburn commented on Dec 14, 2020

Please save your all webpage as html/js/css files, zip them and email the zip to support@koolphp.net. Thanks.

Venom commented on Dec 15, 2020

Hi David,

I need the front-end client input dependency package. The Visual Query component could not work probably without it. I don't have full license but only the license for Visual Query component.

David Winterburn commented on Dec 16, 2020

Hi Venom,

I will send the inputs client files to you via email. Thanks!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

VisualQuery