Hi Julen,
DB2 just stores data. If you wish to present it in a particular way, this should be done with a display package (like Crystal Reports for instance) or a programming language that can manipulate the printer via printer control characters.
It's possible I guess to have a field that contains the data, followed by another field that contains the display attribute, and use a programming language to format the print in this fashion, but there are much easier ways to do it, in my opinion.
Can you explain me please, how can i do it using Crystal Reports? I mean, without using the crystal report to rich the text. before show it, how can i store the data
followed by another field that contains the display attribute?
I am working with C# code. (Visual Studio in .NET)
Julen,
If using Crystal Reports you would need to obtain the data from within Crystal Reports and then use that tool to format the output, changing the fonts and characterics as required. There are many tools that will enable you to do this (MS Access for instance) but it depends upon what you have available on your platform, and how competent you are with those packages.
If you wanted to go the other way you could store the display attribute and do it programmatically in C#. For this, you would need to find out what printer you are using and what the control characters are for the display attributes you require. You would then need to obtain the data and display attribute in C# and write directly to the printer using the relevant control characters.
This is not something that I would consider doing, as it is an awful lot of trouble when you should have packages available which do this for you.
My boss wants to write the text in a .net component, in a text box or something giving the rich text to the words and then store it in the db2 database.
Then, read the information and show it a report without applying any format.
Julen,
I don't know enough about .net but am assuming you're talking about obtaining text and allowing it to be formatted online by the user (bold, italics, line breaks etc).
You then want that text stored in DB2 and when it is written to a report, the same formatting that was applied by the user, is applied to the report.
DB2, as far as I am aware, can't do this. The only thing that springs to mind, is whether .net can capture the formatting control characters, and translate them into something like HTML. You could then store the text as HTML and reformat it for print using something (IE?) that understands HTML.
Sorry to not be of more help.
Can anybody else come up with a more friendly alternative?
I understood CLOBS were for the purpose of storing documents etc. Whether it supports all your requirements, I can;t say, as I've not used them. There's a link here to get you started with further research, should this be a possibility.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.