Hiding SS# on Report using Design Studio

 15 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
khart
Basic Member
Posts: 10
Basic Member

    I've hidden the SS# displaying on the form PA22 with DS but now i need to deal with the SS# on the PA222 report listing.  Is it possible to do this?

    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member
      I don't think you can change the output of PA222 without revising the Cobol code - Design Studio has nothing to do with report modification. You could create a Crystal Reports version of the report and include the information you want.
      David Williams
      khart
      Basic Member
      Posts: 10
      Basic Member
        Thanks for the tip. I also checked out your blog - thanks for posting some the tips and your experience.
        khart
        Basic Member
        Posts: 10
        Basic Member
          Have you ever created a DME query in a Design Studio page that displays for a user supplied date? Mine works for the current date or a date I hard code into it...maybe a common dialogue/msgbox or a text area that can pass the variable onto the portal page. Ex: displaying all the new hires for a certain date last month.
          David Williams
          Veteran Member
          Posts: 1127
          Veteran Member
            I did something like this with a JavaScript prompt that was tied to the page being loaded.
            var dte = prompt (“Date of new hires?”)
            Then you can pass the dte variable to your DME query.
            David Williams
            khart
            Basic Member
            Posts: 10
            Basic Member
              Thanks, it works now! - I used this
              function portalpage_OnInit()
              {
              var dte = prompt("Enter the date here to load page.");
              }
              Then I changed the Index variable to be this: LAW_WEB_USR.dte. Is there a better or faster way to do this?
              David Williams
              Veteran Member
              Posts: 1127
              Veteran Member
                Using the index key is the fastest way to limit records. You could also have used the select feature but the index is the fastest.
                David Williams
                khart
                Basic Member
                Posts: 10
                Basic Member
                  I dont know what happened but i'm not able to pass the variable onto my query. I added an alert just after my prompt to display the date i'm entering and it is in MM/DD/YYYY but my results are not being limited by date. I get all the results for the SELECT statement that i'm looking for. Can you tell me what should go into the index field in Design Studio? Is it supposed to be just 'dte' or just or LAW_WEB_USR.dte which i cant get to work. I've tried doing it with the function portalpage_OnInit() and doing it inside the element that holds the dme. Thanks for any help.
                  David Williams
                  Veteran Member
                  Posts: 1127
                  Veteran Member
                    What table are you querying against? If it's Employee then Date isn't an index key.
                    To pass the dte variable to your DME use:

                    var dmeObj = page.objects["data0"];
                    dmeObj.criteria += "&SELECT=DATE-HIRED=" + dte
                    David Williams
                    khart
                    Basic Member
                    Posts: 10
                    Basic Member
                      Persachtst for INDEX6, i believe it's PAHSET6 - I'm using Company then Date in MM/DD/YYYY and i'm not able to pass the date correctly even though my alert shows it correctly before the query executes.
                      David Williams
                      Veteran Member
                      Posts: 1127
                      Veteran Member
                        If you use the API Builder in Design Studio you will see that the DATE-STAMP date format is YYYYMMDD




                        so you can either convert dte to that format or require your users to key it that way.

                        var dte = prompt("Enter the date here to load page as YYYYMMDD");
                        David Williams
                        khart
                        Basic Member
                        Posts: 10
                        Basic Member
                          /servlet/Router/Data/Erp?PROD=PROD&FILE=PERSACTHST&FIELD=COMPANY;EMPLOYEE;ACTION-CODE;EFFECT-DATE;REASON;DATE-STAMP;EMPLOYEE.FULL-NAME;EMPLOYEE.NICK-NAME;EMPLOYEE.EMP-STATUS;EMPLOYEE.PROCESS-LEVEL;EMPLOYEE.DEPARTMENT;&INDEX=PAHSET6&KEY=200=08/14/2008=&SELECT=ACTION-CODE^%3DTRANSFER&OUT=XML

                          I hardcoded into the API builder 08/14/2008 and it yielded three results. I also hardcoded 20080814 and it yielded three restults. Do you know what the variable should look like in the api?
                          David Williams
                          Veteran Member
                          Posts: 1127
                          Veteran Member
                            Using your example it should look like:
                            /servlet/Router/Data/Erp?PROD=PROD&FILE=PERSACTHST&FIELD=COMPANY;EMPLOYEE;ACTION-CODE;EFFECT-DATE;REASON;DATE-STAMP;EMPLOYEE.FULL-NAME;EMPLOYEE.NICK-NAME;EMPLOYEE.EMP-STATUS;EMPLOYEE.PROCESS-LEVEL;EMPLOYEE.DEPARTMENT;&INDEX=PAHSET6&KEY=200=" + dte + "=&SELECT=ACTION-CODE^%3DTRANSFER&OUT=XML
                            Either date format should work.

                            If you using a Portal Page DME build your DME (data0) using Index PAHSET5 and set the Company and Action-Code as your key field values. The script would then look like this:

                            function portalpage_OnInit()
                            {
                            var dte = prompt("Enter the date here to load page as YYYYMMDD");
                            var dmeObj = page.objects["data0"];
                            dmeObj.criteria += "&SELECT=DATE-STAMP=" + dte
                            }
                            David Williams
                            khart
                            Basic Member
                            Posts: 10
                            Basic Member
                              YAHOO!-i went ahead and used PAHSET6 and used the date in the INDEX and it works now. Here is my script:
                              function portalpage_OnInit()
                              {
                              var dte = prompt("Enter the date here to load page as YYYYMMDD");
                              var dmeObj = page.objects["Transfer"]
                              dmeObj.index += "&KEY=200=" + dte
                              }

                              Thanks again for all of your help with this. I wouldnt have found the answer, does Lawson document this anywhere?
                              David Williams
                              Veteran Member
                              Posts: 1127
                              Veteran Member
                                Good job. Lawson gives some JavaScript examples in the Design Stuido User Guide whilch I've used to get to my answers. Sometimes I use http://www.w3schools.com/js/ to figure out the JavaScript syntax.
                                David Williams
                                Omar
                                New Member
                                Posts: 2
                                New Member
                                  I'm attempting to do something very similar to what you've done below. But my key is not being populated accordingly and I suspect the problem lies with my XML. Could you give me a hand and show me your entire page code? I could really use the help.