KoolReport's Forum

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

Is there a way of creating a hyperlink on the results on the class = without changing the view file or usinging formatValue #2129

Closed paulo opened this topic on on Jun 7, 2021 - 2 comments

paulo commented on Jun 7, 2021

I know this can be used in the view: "formatValue" => function ($value, $row) {

                    $lastUpdate = $row["LastUpdate"];
                    $sharepoint = $row["Sharepoint"];
                    $mylink = $sharepoint ? "<a href='$sharepoint' target='_blank'>Sharepoint</a><br/>" : "";
                    return " $mylink $lastUpdate";
                },

Is there a way I could do this in the Class file either by using SQL or one of the

->pipe($this-> 

transformation functions ?

A lot of reports there is no need to list all columns in the view because they are defined in the SQL command, so the only reason I am repeating the same list of columns now for some reports is due to adding a hyperlink to the report.

not a big deal, but a nice to have Thank you

Sebastian Morales commented on Jun 9, 2021

Paulo, pls try a process called Map which is a general purpose transformation process:

https://www.koolreport.com/docs/processes/map/

Let us know if you have any question regarding this. Tks,

paulo commented on Jun 18, 2021

thank you, I will try that

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

None