Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal report on SQL table structure? 1

Status
Not open for further replies.

dgillz

Instructor
Mar 2, 2001
10,038
US
Is it possible to write a crystal report on the SQL table structure? For example on a given database, I'd like to see:

Table Name
Field1Name Field1DataType Field1Length Field1AllowsNulls

Field2Name Field2DataType Field2Length Field2AllowsNulls

etc., etc.

This is for SQL Server 2014. Any insights appreciated.

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools:
 
I believe that information is one of the system tables (do not remember which one). If you have access to the system tables, then you should be able to report on it.
 
I checked what kray4660 was referring to. When you select your tables in Crystal, choose INFORMATION_SCHEMA (instead of DBO) and under that choose the COLUMNS table.
In your report use selection to say {COLUMNS.TABLE_NAME} = yourTableName (whatever your table is named).

Then the fields available should give you the fields with their attributes.

-Andy
 
AndyMc,

That was perfect thank you. As a followup are you aware of an information_schema that gives info on indexes?

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top