Instalation of Stylesheet tool 1.1 messes up Navision ES

imurphyimurphy Member Posts: 308
I'm running Nav 5.0sp1-Spanish and have been playing around with the Stylesheet tool v1.1. I was experimenting with this with the language set to English and all was going ok.

I've just discovered that when I switch back to the local language setting: 'Español - España (alfabetización tradicional)' - almost no forms work!

Whenever I open a form I get this message (translated from spanish)
The contents of the field Name cannot be copied to the field Language Name because the size of the field Name is too small.

Type: Text30 <-- Text80
Field: Language Name <-- Name
Table: Dimension translation <-- Windows Language

This occurs when executing the line
DimTrans.CALCFIELDS("Language Name");
in function
GetDimTrans(LanguageID)

in Table 348 Dimensions.

Now its fairly obvious that the cause is an attempt to copy a string over another which is shorter. What I don't have is a solution.

Has anyone else seen this problem? Anyone solved it? I'm seeing this problem with a copy of the Cronus Db.
Anyone know if MS supports the stylesheet tool?

Ian[/quote]

Comments

  • imurphyimurphy Member Posts: 308
    Can somone explain what this little fragment from table 348 is actually doing? I'm awaiting the start of the c/side programming course so I'm not yet familiar with the syntax.
    GetDimTrans(LanguageID)
    IF (DimTrans.Code <> Code) OR (DimTrans."Language ID" <> LanguageID) THEN BEGIN
      IF NOT DimTrans.GET(Code,LanguageID) THEN BEGIN
        DimTrans.INIT;
        DimTrans.Code := Code;
        DimTrans."Language ID" := LanguageID;
        DimTrans.Name := Name;
        DimTrans."Code Caption" := "Code Caption";
        DimTrans."Filter Caption" := "Filter Caption";
      END;
      DimTrans.CALCFIELDS("Language Name");
    END;
    

    When the function enters DimTrans has never been initialized but the first test somehow tests true and it enters the Begin..End block!

    Once inside the block DimTrans has suddenly been initialized and we call .GET with two parameters, the first of which - 'Code' - Has not been defined. This is crazy... in any case it then proceeds to initialize the instance.

    If I add a watch on DimTrans.Name just after it has been assigned it display 'Error: Symbol "Name" was not found'. What is this - a write only property?

    GetDimTrans appears to be a subroutine rather than a function since its return value is not assigned.
    The line
    DimTrans.CALCFIELDS("Language Name");
    

    seems to call a routine which does something with a global variable "language name" - with no indication as to what that something might be nor what it does with the result.


    The DimTrans 'class' only has a few properties/functions so I'm not sure what its purpose is nor how it works.

    well, heres hoping someone can help me....

    Ian
  • imurphyimurphy Member Posts: 308
    I should add that this problem is cured by modifying table 388 field 6, Language Name and setting it to 80 chars.

    I'm still curious about the workings of the code
  • dpardomdpardom Member Posts: 74
    Thanks, it was useful.
    can't it be an upgrade problem?
  • imurphyimurphy Member Posts: 308
    It was an upgrade problem - from 5.0 to 5.0sp1.

    I found the problem first while using stylesheets. However after upgrading a clients system we also had the same problem and since they didn't have the stylesheets objects installed then the cause must be the sp1 upgrade.

    Ian
  • FrgBonTFrgBonT Member Posts: 28
    resize the "Language Name" field of the Table 388 "Dimension Translation", standard size 30 you can use 80.
    Don´t is the solution because the fail is the engine of NAV 5.1, try to load a DB of NAV 5.0 and show the same error.

    I sorry by my english but i don´t write well :oops:
Sign In or Register to comment.