Here is quick and dirty way to get the lens in the report…

 

The report is named sysTableDefintion

 

Open the Class Delcaration,  Add this Line

int             size; //Var to Hold Field Size

 

Open the following node on the report, it’s a method

Designs\ReportDesign1\AutoDesignSpecs\ProgrammableSection3:Field\Methods\ tableFieldType

 

You want to edit this method to look like this, my changes are commented

display Identifiername tableFieldType()

{

    DictType    dictType;

    DictEnum    dictEnum;

    ;

    size = 0; //-pl get Field Size Mod

    if (dictField.typeId())

    {

        dictType = new DictType(dictField.typeId());

        size = dictType.stringLen(); //-pl get Field Size Mod

        return dictType.name();

    }

 

    if (dictField.enumId())

    {

        dictEnum = new DictEnum(dictField.enumId());

        return dictEnum.name();

    }

 

    return Enum2Str(dictField.baseType());

}

 

Now at the same node level as the method we just edited, create a new method that has this code

 

display int size()

{

    return size;

 

}

 

Now drag this new method from the node

Designs\ReportDesign1\AutoDesignSpecs\ProgrammableSection3:Field\Methods\

To Node

Designs\ReportDesign1\AutoDesignSpecs\ProgrammableSection3:Field\

Place right after the field element String:TableFieldType, you can go to the properties for the ne integer element it added and set a label if you like.

 

Now when you run the report you should have your new field, it will show a size for all data types that have one, so essentially anything that extends type String, all others will show 0

 

As for running the report for a specific table, when you open the report from the development tools menu, and you get the dialog box, click the Select button, set the name to the AOT name of the Table you want., you also will want to set the util level to the outer most level the table exist in, a real downside to this report is that if you have a table that exist in 4 different layers, it will give you 4 runs of the report, one for each layer.  So for example if I wanted to print the custTable definition, and I was dealing with standard Axapta with out a Dis, los and no SP layer, I would set my criteria to be Name = custTable, utilLevel = gls

 

 

 

 

Hope that helps you out.

 

-Preston

 

Preston A. Larimer
Professional Solutions Group, LLC
219-697-7601
[EMAIL PROTECTED]
www.psgroupllc.com
-------------------------------------------------------------------------------------
Building a stronger link in the Axapta community chain, join us at http://www.axaptaLink.com

 

 


From: dmunro54923 [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 18, 2005 3:41 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: [Axapta-Knowledge-Village] Re: Database schema listing

 


--- In Axapta-Knowledge-Village@yahoogroups.com, "Preston A.
Larimer" <[EMAIL PROTECTED]> wrote:
> See if the table definition report suits your needs, if not you
may be able
> to expand on it to supply the properties you want 
>
> (Menu Bar)-Tools\Development Tools\Table Definitions.
>

Preston,

This looks closer to what I would like but I would like to do one
table at a time, not the whole schema.  Is that doable?  Another
thing missing is the type & length of each column in the table but
you said to expand on it to get those properties so my question is
HOW???  Or give me a place to look & read.

Dennis





Sharing the knowledge on Axapta.




Sharing the knowledge on Axapta.



Yahoo! Groups Links

Reply via email to