Print PDF Invoice Report from current selected record in form

I am creating an Invoice application where I need to print PDF Invoice reports. I have tried various methods to print an PDF application using a button on my form for the current selected record. I know there is a way to do this using the sc_redir macro but I am not sure how to put all the pieces together to make this work. I basically need to pass the {invoiceID} as a parameter to my PDF report from the button I created on my form.

Can someone walk me through this? Thanks!

Hello,

Please contact our support regarding this issue. Our chat is active on workdays from 8:00am to 6:00pm, and our ticket system is always available.

regards,
Bernhard Bernsmann

Two methods:

Create a button on your form (Form Settings / Buttons) and link direct to your pdf app. In the link properties select invoiceID as parameter.

or …


$redir_app = 'your_pdfreport';
$redir_target = '_self';
$redir_param = array('var_invoiceID' => {invoiceID});
// print invoices
sc_redir($redir_app, $redir_param, $redir_target);

and …

In your_pdfreport use the sql command with “WHERE (invoiceID = [var_invoiceID])” etc.

HTH.

[QUOTE=RHS;12916]Two methods:

Create a button on your form (Form Settings / Buttons) and link direct to your pdf app. In the link properties select invoiceID as parameter.

or …


$redir_app = 'your_pdfreport';
$redir_target = '_self';
$redir_param = array('var_invoiceID' => {invoiceID});
// print invoices
sc_redir($redir_app, $redir_param, $redir_target);

and …

In your_pdfreport use the sql command with “WHERE (invoiceID = [var_invoiceID])” etc.

HTH.[/QUOTE]

Thanks for the help I was able to get it working. My main issue was that I did not have the WHERE clause in my PDF report application. Once I included that I was able to choose invoiceID as a parameter in my link.

Use template from PDF Invoice Templates so that you will find it useful and can convert and download pdf invoice templates easily and you can also customize.

How to implement this on grid ?

[QUOTE=RHS;12916]Two methods:

Create a button on your form (Form Settings / Buttons) and link direct to your pdf app. In the link properties select invoiceID as parameter.

or …


$redir_app = 'your_pdfreport';
$redir_target = '_self';
$redir_param = array('var_invoiceID' => {invoiceID});
// print invoices
sc_redir($redir_app, $redir_param, $redir_target);

and …

In your_pdfreport use the sql command with “WHERE (invoiceID = [var_invoiceID])” etc.

HTH.[/QUOTE]

Similarly …

Create a button on your grid (Grid Settings / Buttons) … and so on.

How to print with multiple record in grid ?

[QUOTE=RHS;16601]Similarly …

Create a button on your grid (Grid Settings / Buttons) … and so on.[/QUOTE]

Thanks for the help I was able to get it operating. My overall picture was that I did not have the WHERE stipulation in my PDF review program. Once I involved that I was able to select invoiceID as a parameter in my weblink.

can i pass more than 2 parameters to a pdfreport application?

i pass 3 parameters, separated by “;”, using sc_redir(pdfreport_name.php, param1={field1};param2={field2};param3={field3});
it seems the 3rd parameter is not passed successfully.

*sorry, my mistake
resolved. close project then open the project again, and then it runs properly.

have issue, i insert:
$redir_app = ‘fatture’;
$redir_target = ‘_self’;
$redir_param = array(‘var_numero_fattura’ => {numero_fattura});
// print invoices
sc_redir($redir_app, $redir_param, $redir_target);

when load go http://androidintheworld.it/scriptcase/app/lacupola/fatture/fatture.php is not correct
my workd directory:
http://androidintheworld.it/scriptcase/app/lacupola/