Custom Print Report

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
meickert
Posts: 15
Joined: 2016-06-24 23:05

Custom Print Report

Post by meickert » 2017-04-25 10:37

Hi @all...

I made a custom PDF-report for my appgini-app with TCPDF.

Everything works fine so far. Now I want to implement it by clicking the "Print" button in the "Print Preview" modus. So I tried to change the DVP.html in the templates folder. Now there is my problem....

By clicking the print button it should call a php-file in the root directory named bericht.php. This PHP needs (of course) the id of the dataset as a parameter. So how do I get this parameter within the onclick function?

f.ex. when I call my PHP directly by opening localhost/bericht.php?id=1 everything works fine... But I don't now how to pass the parameter in the DVP.html.

Any suggestions?

Thanks
Marcus

meickert
Posts: 15
Joined: 2016-06-24 23:05

Re: Custom Print Report

Post by meickert » 2017-04-27 11:04

Solved by myself... no more help needed.

For information:


$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'bericht.php';
header("Location: http://$host$uri/$extra?id=".$selected_id);
exit;

...is the solution

Chris
Posts: 3
Joined: 2017-03-12 08:51

Re: Custom Print Report

Post by Chris » 2017-04-30 14:51

Hi, I am sure you spent many hours of your time putting this addition together. I am looking to do the same thing and generate a pdf document from the data in the database. Is there any chance you would be willing to share your work with me?

Thank you in advance.

Chris

meickert
Posts: 15
Joined: 2016-06-24 23:05

Re: Custom Print Report

Post by meickert » 2017-05-03 09:06

Please first have a look at my sample page

http://appgini.eickert.info

You can login with:

name: member1
password: member1

You can see there all customizations I made so far in appgini. If this is what you want, please contact me on PM.

Thanks...
Marcus

xbox2007
Veteran Member
Posts: 129
Joined: 2016-12-16 16:49

Re: Custom Print Report

Post by xbox2007 » 2017-05-15 16:00

hello
please can you share with me Code for Logs , i like to use in my project

thanks a lot

Post Reply