KoolReport's Forum

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

SimpleCard's string value in Dashboard #3258

Open Melina Maccio opened this topic on on Mar 6 - 3 comments

Melina Maccio commented on Mar 6

Is there any way to have text value displayed in the card? Also how do I select the column I want from my rawsql query result? it is not very clear how to use this widget on the documentation.

Here's a sample of my code

Melina Maccio commented on Mar 6

Also, how do I hide the gridines on the chartJs barchart?

Sebastian Morales commented on Mar 7

Regarding SimpleCard in Dashboard, to display a text value, you can set its value to be a string and its useRaw to true like this:

    $this->value("anyStringValue")->useRaw(true);

The string value could be retrieved in the dataSource function by calling ->run():

    $data = AutoMaker::rawSQL(...)
        ->run(); //$data is an array returned by running the sql query
    return $data[0][...];

Regarding the 2nd question, pls open a new topic with a suitable title.

Melina Maccio commented on Mar 7

Amazing, thank you so much!

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
solved

Dashboard