Announcement

Collapse
No announcement yet.

How make a filter form and a display data filtered on same page ?

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

  • How make a filter form and a display data filtered on same page ?

    Hi all,

    I have a form with some parameter to set as filter for a editable grid form that I want to show on same page and sincronize with filter set.
    I have tried to use container but I'm not able to link and sincronize the two forms also using global variables.

    Wich is the best way to achieve this kind of application ?

    Once that two form are sincronized I have to print adhesive labels based on selected records shown on data form.
    Anyone of you have had never user specific printer like Zebra, Sato etc.

    How can I understand that a label has been printed in order to set a field flag of record printed to "Y" ??
    Can I choose the kind of output port to use, if there are two size/type of label (Big and Small i.e) ?

  • #2
    Hi,
    does it really need to be an editable grid. Couldn't you just do a filter and grid on the same page application.

    http://www.scriptcase.net/scriptcase...rid-same-page/

    If a record needs to be edited link to a details form.

    As far as the printing goes, as soon as you hit the print button and the pdf (that is your last line of defense) is generated it's basically done.
    Everything else is outside of your application.

    If you want to impress somebody, you can print a barcode on the label and have it scanned to be 100% sure it is physically printed. Just kidding. :-D

    jsb
    Last edited by jsbinca; 03-12-2014, 04:11 PM.

    Comment


    • #3
      Hi Jsb,
      thanks for reply,

      the link is not active. :-(
      Tomorrow I'll try to put something on..

      Comment


      • #4
        The link does work here...
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          OK , I founded something similar on samples project.
          The problem now is how can I select some rows (like multiple record form) and then update their STATUS field to "N".

          Comment


          • #6
            Carry on ... wristband now

            Hi,

            now I'm on PDF .... and more or less.. data come out.
            To print wristband now I have to set page dimensions i.e. 25x279 mm and layout.
            Using landscape it seems that each field takes a page (???) as on attached image. If I use portrait I need to rotate text but I don't know how customize the code:

            /*------------------ Page 1 -----------------*/
            sc_pdf_print_img($cell_PATIENTID, 0, 0);
            sc_pdf_print($cell_WARDNAME);
            sc_pdf_print($cell_WARDROOM);
            sc_pdf_print($cell_WARDBED);
            sc_pdf_print($cell_PATIENTLASTNAME);
            sc_pdf_print($cell_PATIENTNAME);
            sc_pdf_print($cell_PATIENTBIRTHDAY);
            /*-------------------------------------------*/
            Attached Files

            Comment


            • #7
              This is what is happening with setting Customer page dimensions (?????)

              http://www.youtube.com/watch?v=Zi7vTdTONoc

              Comment


              • #8
                Hi,
                go to your PDF-Settings an set the margins (Upper, Bottom, Right, Left) explicitly to 0, not empty, ZERO!

                Let's see what you get then.

                jsb
                Attached Files

                Comment


                • #9
                  Yeaaaaaaaaaaaahhhh !!!
                  Thanks so much Jsb !!

                  Comment


                  • #10
                    Hi,

                    just to know ... how can I store the values selected on the search fields ? Need I to use different field from the grid columns ?
                    I'm using '{WARDNAME}' '{PATIENTID}' '{PATIENTLASTNAME}' '{PATIENTNAME}' '{STATUS}' but when I try to pass values to other applications or fields they are always empty.

                    For istance I have to use them into sc_redir to the pdf report application who has to print the wristbands selected by the filters fields.
                    sc_redir(pdfreport_dbo_Wristband, glo_var_depart='{WARDNAME}'; glo_var_fiscal='{PATIENTID}' ;
                    glo_var_fname='{PATIENTLASTNAME}'; glo_var_secname='{PATIENTNAME}' ; glo_var_status = '{STATUS}', '_blank');
                    Then, within the pdf report I'm using this SQL
                    SELECT
                    ID,
                    STATUS,
                    WARDNAME,
                    WARDROOM,
                    WARDBED,
                    PATIENTID,
                    PATIENTID AS CODFIS,
                    PATIENTNAME,
                    PATIENTLASTNAME,
                    PATIENTBIRTHDAY
                    FROM
                    dbo.Wristband
                    WHERE
                    WARDNAME like '%' + '[glo_var_depart]' AND
                    PATIENTID like '%' + '[glo_var_fiscal]' AND
                    PATIENTLASTNAME like '%' + '[glo_var_fname]' AND
                    PATIENTNAME like '%' + '[glo_var_secname]' AND
                    STATUS like '%' + '[glo_var_status]'

                    Comment


                    • #11
                      One possible solution would be a Session variable.

                      Go to the Search section on the left hand side. In the onValidate event stick your field values in a Session variable. Then you don't even have to pass it along.

                      $_SESSION['wrist']['ward'] = {WARDNAME};
                      $_SESSION['wrist']['patid'] = {PATIENTID}; / and so on

                      sc_redir(pdfreport_dbo_Wristband,,'_blank');

                      Change your SQL command of your PDF application to SELECT ... WHERE [v_where]
                      Create your WHERE-Clause in the onScriptIni event of your PDF-application.

                      [v_where] = "WARDNAME like '%' + '".$_SESSION['wrist']['ward']."' AND PATIENTID like '%' + '".$_SESSION['wrist']['patid']."' ...; /you got the picture


                      When printing is done unset your session variable. Just to be sure.

                      unset($_SESSION['wrist']);

                      jsb

                      Comment

                      Working...
                      X