Crystal Report hyperlink- GL90

Sort:
You are not authorized to post a reply.
Author
Messages
Carl Gifford
Basic Member
Posts: 11
Basic Member
    I am trying to create a hyperlink from a Crystal Report to GL90 (Transaction Analysis).

    I have been able to successfully write the hyperlink with the exception of being able to pass the Fiscal Year, Beginning and Ending Periods.

    following is the string I am using:

    "https://laprd1.sharp.com:4443/lawson/portal/index.htm?target=_blank?_PDL=P90&_TKN=GL90.1&_HK="&{@GL90Drill}

    THE HK is based upon a formula is Crystal: GL90Drill which concatentates the Company, AU, Account, SubAccount, Fiscal Year, Beginning Period, Ending Period

    ToTEXT({Command.COMPANY},"0000")&{Command.ACCT_UNIT}&Space (15-Length ({Command.ACCT_UNIT}))&TOTEXT({Command.ACCOUNT},"000000")&TOTEXT({Command.SUB_ACCOUNT},"0000")&TOTEXT({?FISCALYR},"0000")&TOTEXT({?BEGPERIOD},"0000")&TOTEXT({?ENDPERIOD},"0000")

    It works excepts the forms loads with the current fiscal year and period rather than the Fiscal Year, Beginning and ending Period passed from the hyperlink.
    John Henley
    Senior Member
    Posts: 3348
    Senior Member
      Hi Carl, that's a really good question. To understand why it isn't working as you would expect requires understanding how Lawson forms are defined, and following the form definition from the Portal back to the underlying form. In this case, you might be trying to look at multiple periods, like this one, where the inquire is based on period 1 through period 3:


      In this case, you'd *think* you'd pass in an HK variable in the URL looking like this:

      &_HK=4321101%20%20%20%20%20%20%20%20%20%20%20%20011100000020060103

      Broken apart, this means:

      Co 4321
      Acct Unit 101
      Acct 011100
      Sub Acct 0000
      Fiscal Year 2006
      From Period 01
      To Period 03

      However, as you've discovered, it doesn't work.

      To understand why, you need to look at the underlying form definition, and specifically, at the _HK field:


      As you can see, the field is defined with a size (sz) of 29. Calculating how the fields are defined, you can now see that it is stopping at Sub Account:

      Field Length Cumulative Size
      Company 4 4
      Acct Unit 15 19
      Account 6 25
      Sub Acct 4 29
      Fiscal Yr 4 33
      From Pd 2 35
      To Pd 2 37

      Looking further into the screen definition for GL90.scr:


      Part of the form definition is an "transaction edit code" for each field in the form. Company is "SK"; Acct Unit and Account is "SN", Sub Account is an "SL". But Fiscal Year and and from/to period are "SB". In other words, according to the Lawson documentation, they are not "key" fields:


      So, that is why it doesn't work.
      Thanks for using the LawsonGuru.com forums!
      John
      Carl Gifford
      Basic Member
      Posts: 11
      Basic Member

        Thanks for the detailed information!  I had looked at the form definition and figured that this was probably the case, but I figured I would ask.

        I guess I will just link the users to this form and they will have to update the Fiscal Year and Periods.

        You are not authorized to post a reply.