KoolReport's Forum

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

Saving input/search/filter criterias as a link or favorites #184

Open bysystem opened this topic on on Jan 2, 2018 - 4 comments

bysystem commented on Jan 2, 2018

Dear Support team,

first of all I wish you a great start in 2018 and all the best!

In my report application I have a very detail filter modul (with many input elements) on the left side.

I would like to offer the users a possibility to SAVE their search/filter criterias as a URL (or HTML list or adding to the favorites of their browser) to reuse the same criterias by ONLY ONE click!

Do you have an example how I can do that?

Kind regards,

KoolReport commented on Jan 2, 2018

Thank you very much. We wish you a new year with full of joys and successes.

For the problem, Instead using POSTBinding, you should use GETBinding from inputs package. Plus, you must use get method in the form tag:

<form method="GET">
    <!-- All inputs elements here -->
</form>

By using the method="GET", the params from form will be submitted by GET which is available in URL. And by using the GETBinding, KoolReport will be able to catch those inputs param and insert into report.

bysystem commented on Jan 2, 2018

Thx a lot for your quick response!

Just implemented it but it seems to work only whem I'm using a TABLE output but not in PIVOT!

In my setup php I have deactivated POSTBinding and activate the GETBinding library:

class adr extends koolreport\KoolReport {

use \koolreport\clients\FontAwesome; //für die Collapse + icons
use \koolreport\clients\Bootstrap;
use \koolreport\inputs\Bindable;
//use \koolreport\inputs\POSTBinding;
use \koolreport\inputs\GETBinding;
use \koolreport\export\Exportable;

In my view php I switch the method of my form tag to method = "get":

I've selected some filter criterias and the URL was created as follows (I assume that the "+++++" characters are the spaces in the database!??): http://bytool:8080/adr1/?Sgrp=002&OrtWrnem%5B%5D=Hannover+++++++++++++++++++++++++++&Geschaeftsjahr=153ki&btnSubmit= As you can see the output at the very bottom (rendered with a TABLE) deliveres the right result (section: "ADR: Kunde/Ort") but all the other outputs (rendered with PIVOT) above are empty: PLEASE SEE THE SCREENSHOT BELOW! Any idea what could be wrong?
bysystem commented on Jan 2, 2018

KoolReport commented on Jan 4, 2018

That's strange. Please check if the value of your inputs on the left hand-side is persistent. Does any value missing?

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
solved

Inputs