Showing posts with label filed. Show all posts
Showing posts with label filed. Show all posts

Tuesday, February 14, 2012

Colum Name - Alias


We are thinking of using general purpose column names in our application schema. We want to give the option to the end user to customize the filed names to fit their business . We want to build the functionality on the generic names so that it will work for multiple customes.

Example: We may want to have 10 Strings, 10 numbers and 5 booleans pre defined and reports running off of the table. The customer can name first number as pressure, second one for length and map their data to the table. Other customer can use the first number for temperature and the second one for width.

Is there a way to do it in SQL server w/o having a lookup table for column name aliasing?

Thanks

Option 1: Any Reporting application generally has provision to display a customized column names for the table reports.

Option 2: When you query the table - you can provide column alias for the columns queried for example:

SELECT Column1 AS Pressure, Column2 AS Length FROM TableName

Option 3: You can create multiple views over the base table and the created views can have appropriate column names.

Thanks,

Sankaranarayanan MG

Colors in CR ...

Hi.

Is there a way ( most likely, but I'm unaware of ) to change the color of just a part of the text in Cr ?

For example: I have a filed which contains the word : Excellent ..

How can I tell Cr to print/display the word in black, except for the last two letters nt, which should be printed/displayed in, say, red ?

Thnx.If it's just a plain text field then yes, it's quite easy - just highlight the letters of the field you want in a different colour, and select Text Formatting.

However, I'm assuming you want it to be one of the dynamic database fields. There doesn't appear to be any functions in Formula Editor that are capable of changing text colour, so I don't think it is possible.

(One idea I had was to split the field into two separate formulas, but it doesn't appear that I can join the result of two text formulas back together. Perhaps you can build on this idea to come up with a solution).