What control should I use to display a rich text document?

Hi, I need to view either SQL report or a rich text document based on the value selected in a drop down list. Is there a control that will display both? If not, I know I can use the report viewer control for the report, but what can I use for the text document? I will need to be able to print the document. Please help, I am being shouted at!!!
LVL 2
carter-greenanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

omegaomegaDeveloperCommented:
Hello, carter-greenan,

I don't know of a control to do both.  

If your users have Word available, why not use that for the Richtext document.  It would make printing very simple.  

Cheers,
Randy
0
carter-greenanAuthor Commented:
Hi Randy, thanks, but it is a Web App, so it needs to be 100% interoperable. There must be some way I can display a simple, printable form?!?
0
RimvisCommented:
Hello carter-greenan,

How about this?

Fancy Textboxes
http://steveorr.net/freecontrols/textboxes.aspx

Writing Your Own RTF Converter
http://www.codeproject.com/KB/recipes/RtfConverter.aspx

Regards,

Rimvis
0
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

carter-greenanAuthor Commented:
Hi Rimvis,

I have purchased this control, but there does not seem to be a LoadFile property, so I can't work out how to load the document depending on the result of the drop down. I am not trying to tag on another question, but could you just tell me if I'm being really stupid?

Thanks,

Pete
0
RimvisCommented:
>>I have purchased this control

Which one?
0
carter-greenanAuthor Commented:
The FreeTextBox Professional control from http://steveorr.net/freecontrols/textboxes.aspx
0
RimvisCommented:
It looks like FreeTextBox doesn't suport RTF format
http://freetextbox.com/forums/thread/6452.aspx



I would go for the second option:

Writing Your Own RTF Converter
http://www.codeproject.com/KB/recipes/RtfConverter.aspx
0
carter-greenanAuthor Commented:
Hi, thanks, I have tried this control but seem to have exactly the same problem. I am assigning the file contents using the following code, but it is returning the output as below!!! :(

   if (DropDownList1.Text == "Coverage For Final Assesesment Submissions")
        {
            Rte1.Text = System.IO.File.ReadAllText("D:\\Akemii\\Template1Coverpageforfinalassessmentsubmissions.rtf");
        }


{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang2057\deflangfe2057{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} {\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt Arial Unicode MS};}{\f37\fnil\fcharset134\fprq2{\*\panose 00000000000000000000}@SimSun;}{\f38\froman\fcharset238\fprq2 Times New Roman CE;} {\f39\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f41\froman\fcharset161\fprq2 Times New Roman Greek;}{\f42\froman\fcharset162\fprq2 Times New Roman Tur;}{\f43\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} {\f44\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f45\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f46\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f48\fswiss\fcharset238\fprq2 Arial CE;} {\f49\fswiss\fcharset204\fprq2 Arial Cyr;}{\f51\fswiss\fcharset161\fprq2 Arial Greek;}{\f52\fswiss\fcharset162\fprq2 Arial Tur;}{\f53\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f54\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} {\f55\fswiss\fcharset186\fprq2 Arial Baltic;}{\f56\fswiss\fcharset163\fprq2 Arial (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0; \red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red63\green73\blue86;} {\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang2057\langfe2057\loch\f0\hich\af0\dbch\af13\cgrid.............
0
RimvisCommented:
What control is Rte1?
0
carter-greenanAuthor Commented:
It is the Rich TextEditor from CodePlex
0
RimvisCommented:
I'm not sure this control supports RTF either.
To display your file in web browser, you need to convert RTF to HTML. Have you tried RtfConverter from CodeProject?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
carter-greenanAuthor Commented:
Thanks for this. I have downloaded this control, but to be honest I think I am totally out of my depth with it!

All I want to do is display a formatted document in my web site with a print button! Is there no idiot-proof way of doing this?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.