5 Replies Latest reply: Sep 10, 2013 12:47 PM by TimG RSS

    LINK command in a Report Script 9.3.3

    Kevin___

      Hello,

      I would be greatful if someone could help me with one line in a Report Script.  I do not know what I am doing.  We currently have the line below, which has worked well for years.

       

      <LINK (<LEV("Account",0) AND NOT <DESCENDANTS("Statistical_Accounts"))

       

      There are three accounts within Statistical_Accounts we want to add back.  Let's call them StatAcct1, StatAcct2 StatAcct3.

       

      How do I include them?

       

      At the top level, we have Account.  At the second level, we have "GL Accounts" and Statistical_Accounts.  I have fooled around with a number of things.  I get compile errors telling me everything I do is invalid.

       

      Please somebody, rewrite this one line for me.  Am I begging?

       

      Thank you, Kevin

        • 1. Re: LINK command in a Report Script 9.3.3
          GlennS_3

          If you look at the tech reference examples you will find

          <LINK ((<IDESCENDANTS("100") AND <UDA(product,Sweet)) OR <LEV(product, 0))

          selects sweet products from the "100" sub-tree plus all level 0 products.

           

          You could do something similar

          <LINK (<LEV("Account",0) AND NOT <DESCENDANTS("Statistical_Accounts")) OR ( StatAcct1 StatAcct2 StatAcct3)

           

          I've not tried the sytax, you might need to do an OR inbetween each one.

          • 2. Re: LINK command in a Report Script 9.3.3
            Kevin___

            Hello Glenn,

             

            I took your idea in various forms, and tried the following, but each ones fails depending on where I place the bracket.  I either fail with the OR or the LINK.  I tried using DESCENDANT for each item in the list, and that was not successful.  Can you spot the correction for any of the statements below?

             

            <LINK (<LEV("Account",0) AND NOT <DESCENDANTS("Statistical_Accounts")) OR ( "AdminFee_Calculated" "Overhead_Calculated" "AdminFee_Input")
            Error: 1001005 Unknown Member [OR] in Report

             

            <LINK (<LEV("Account",0) AND NOT <DESCENDANTS("Statistical_Accounts") OR  ("AdminFee_Calculated" "Overhead_Calculated" "AdminFee_Input"))
            Error: 1001072 Syntax error in <LINK Command

             

            <LINK (<LEV("Account",0) AND NOT <DESCENDANTS("Statistical_Accounts")) OR  "AdminFee_Calculated" OR "Overhead_Calculated" OR "AdminFee_Input"
            Error: 1001005 Unknown Member [OR] in Report

             

            <LINK (<LEV("Account",0) AND NOT <DESCENDANTS("Statistical_Accounts") OR  "AdminFee_Calculated" OR "Overhead_Calculated" OR "AdminFee_Input")
            Error: 1001072 Syntax error in <LINK Command

             

            Thank you, Kevin

            • 3. Re: LINK command in a Report Script 9.3.3
              GlennS_3

              I tried it in sample basic and came up with

              //ESS_LOCALE English_UnitedStates.Latin1@Binary

              <PAGE (Market)

              <COLUMN (Year)

              Qtr1 Qtr2

              <ROW (Measures)

              <LINK (<LEV(Measures, 0) AND NOT <DESCENDANTS("Ratios"))   "Profit %" "Profit per Ounce"

                   !

               

              So I think all you need is

              <LINK (<LEV("Account",0) AND NOT <DESCENDANTS("Statistical_Accounts"))  "AdminFee_Calculated"  "Overhead_Calculated"  "AdminFee_Input"

              • 4. Re: LINK command in a Report Script 9.3.3
                TimG

                Yeah, that's right - the 'exclusion exclusions' do not need to be part of the <LINK command at all, they're just listed separately.

                 

                If you really wanted to keep it all in one <LINK command you'd have to use <MEMBER (a) OR <MEMBER (b) etc.

                • 5. Re: LINK command in a Report Script 9.3.3
                  Kevin___

                  Thank you Glenn,

                   

                  I would have never figured that syntax out.  The simplest alternative was unexpectedly correct.

                   

                  Kevin