KoolReport's Forum

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

AssetManager example #236

Open Heb opened this topic on on Mar 27, 2018 - 2 comments

Heb commented on Mar 27, 2018

Hi,

I'm currently developing some PHP reports for a webapp hosted in an Apache server. My reports project directory (/opt/webapps/mywebapp/reports/) contains the koolreport framework (/opt/webapps/mywebapp/reports/koolreport) is separated from the apache DocumentRoot (e.g. /var/www/) where I can access it using a directory alias.

Although I can successfully render the reports data, the paging section doesn't show up. When I use the inspector, I see the browser is trying to reach table.css and table.js using the physical directory

(http://www.mywebsiste.com/mywebapp/opt/webapps/mywebapp/reports/koolreport/widgets/koolphp/table/table.css)

and not referencing http://www.mywebsite.com/mywebapp/reports/koolreports/ ... )

I know it must be a ResourceManager or AssetManager issue, but I can't figure it out.

Any help will be appreciated.

KoolReport commented on Mar 28, 2018

Could you please do as following:

  1. Create a folder assets in "/opt/webapps/mywebapp/
  2. In your report settings() you do add settings for assets like following
function settings()
{
    return array(
        "assets"=>array(
            "path"=>"../assets",
            "url"=>"/assets"
        )
        ...
    )
}

What above settings will tell KoolReport to publish all widget assets like css or js to folder "assets" which is placed relatively to report by path property and this assets folder can be accessed by the specified url.

Please let us know.

Heb commented on Apr 4, 2018

Excelent. 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
None yet

None