KoolReport's Forum

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

Hyperlink in table? #62

Open zenon opened this topic on on Aug 5, 2017 - 10 comments

zenon commented on Aug 5, 2017

Hi KoolReport,

Is it possible to create a hyperlink in a table as shown below? For example, when user click on 'apple' in Table 1, it will link to Table 2, and this table will appear directly below the 'apple' row.

I understand that this can be done by using Pivot, but was thinking whether the above can be the alternative way to do this?

Appreciate your help.

Thanks.

KoolReport commented on Aug 5, 2017

Hi zenon,

The Table is able to put link however there is no ability to open another table at bottom currently. We will consider your question as suggestion to improve Table.

zenon commented on Aug 5, 2017

I see. Thanks.

Can you show me how to put link in the table that links to another table without having open another table at the bottom?

Appreciate it.

Thanks.

zenon commented on Aug 7, 2017

Hi,

Could you show me how to create a link for 'Apple', as shown above?

Appreciate it.

KoolReport commented on Aug 7, 2017

Sorry for my late reply, you do this:

Table::create(array(
    ...
    "columns"=>array(
        "item_column"=>array(
            "formatValue"=>"<a href='item.php?name=@value'>@value</a>"
        )
    ),
))
zenon commented on Aug 7, 2017

Thanks.

If i want to link to another table, does this means i have to do a separate report.view?

Appreciate your help.

KoolReport commented on Aug 7, 2017

Yes, you can create another report to show details for item ( apple for example).

zenon commented on Aug 7, 2017

I got a syntax error: unexpected '<'.

KoolReport commented on Aug 7, 2017

I will look into that, for now you can do:

"formatValue"=>function($value){
    return "<a href='item.php?name=$value'>$value</a>";
}
zenon commented on Aug 7, 2017

What does the three $value represents?

Tried the above, able to create a link, but my report.view page could not load when i clicked on it.

zenon commented on Aug 8, 2017

Could you please assist me with this by providing an example?

I have report.php, report.view.php and report1.view.php. I have included the above code in report.php that links to report1.view.php. Able to create a link, but could not load report1.view.php when the link is clicked.

Appreciate your help.

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