Announcement

Collapse
No announcement yet.

Print PDF Invoice Report from current selected record in form

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #2
    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

    Comment


    • #3
      Originally posted by rdwatchtower View Post
      Can someone walk me through this? Thanks!
      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 ...

      Code:
      $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.
      Best regards: - Reinhard -

      I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

      Comment


      • #4
        Originally posted by RHS View Post
        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 ...

        Code:
        $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.
        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.

        Comment


        • #5
          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.

          Comment


          • #6
            How to implement this on grid ?

            Originally posted by RHS View Post
            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 ...

            Code:
            $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.

            Comment


            • #7
              Originally posted by mumtaz View Post
              How to implement this on grid ?
              Similarly ...

              Create a button on your grid (Grid Settings / Buttons) ... and so on.
              Best regards: - Reinhard -

              I use ScriptCase 8 Enterprise Edition, Version 8.(latest)

              Comment


              • #8
                How to print with multiple record in grid ?
                Originally posted by RHS View Post
                Similarly ...

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

                Comment


                • #9
                  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.
                  seven for all mankind | theory clothing

                  Comment


                  • #10
                    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.
                    Last edited by iwanpc; 10-05-2014, 11:35 AM. Reason: resolved
                    -Iwan P-

                    Comment


                    • #11
                      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/scriptca...re/fatture.php is not correct
                      my workd directory:
                      http://androidintheworld.it/scriptcase/app/lacupola/

                      Comment

                      Working...
                      X