carter-greenan
asked on
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!!!
ASKER
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?!?
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
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
ASKER
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
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
>>I have purchased this control
Which one?
Which one?
ASKER
The FreeTextBox Professional control from http://steveorr.net/freecontrols/textboxes.aspx
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
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
ASKER
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:\\Akem ii\\Templa te1Coverpa geforfinal assessment submission s.rtf");
}
{\rtf1\adeflang1025\ansi\a nsicpg1252 \uc1\adeff 0\deff0\st shfdbch13\ stshfloch0 \stshfhich 0\stshfbi0 \deflang20 57\deflang fe2057{\fo nttbl{\f0\ froman\fch arset0\fpr q2{\*\pano se 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharse t0\fprq2{\ *\panose 020b0604020202020204}Arial ;} {\f13\fnil\fcharset134\fpr q2{\*\pano se 02010600030101010101}SimSu n{\*\falt Arial Unicode MS};}{\f37\fnil\fcharset13 4\fprq2{\* \panose 00000000000000000000}@SimS un;}{\f38\ froman\fch arset238\f prq2 Times New Roman CE;} {\f39\froman\fcharset204\f prq2 Times New Roman Cyr;}{\f41\froman\fcharset 161\fprq2 Times New Roman Greek;}{\f42\froman\fchars et162\fprq 2 Times New Roman Tur;}{\f43\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} {\f44\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f45\froman\fch arset186\f prq2 Times New Roman Baltic;}{\f46\froman\fchar set163\fpr q2 Times New Roman (Vietnamese);}{\f48\fswiss \fcharset2 38\fprq2 Arial CE;} {\f49\fswiss\fcharset204\f prq2 Arial Cyr;}{\f51\fswiss\fcharset 161\fprq2 Arial Greek;}{\f52\fswiss\fchars et162\fprq 2 Arial Tur;}{\f53\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f54\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} {\f55\fswiss\fcharset186\f prq2 Arial Baltic;}{\f56\fswiss\fchar set163\fpr q2 Arial (Vietnamese);}}{\colortbl; \red0\gree n0\blue0;\ red0\green 0\blue255; \red0\gree n255\blue2 55;\red0\g reen255\bl ue0;\red25 5\green0\b lue255;\re d255\green 0\blue0; \red255\green255\blue0;\re d255\green 255\blue25 5;\red0\gr een0\blue1 28;\red0\g reen128\bl ue128;\red 0\green128 \blue0;\re d128\green 0\blue128; \red128\gr een0\blue0 ;\red128\g reen128\bl ue0;\red12 8\green128 \blue128;\ red192\gre en192\blue 192;\red63 \green73\b lue86;} {\stylesheet{\ql \li0\ri0\widctlpar\wrapdef ault\aspal pha\aspnum \faauto\ad justright\ rin0\lin0\ itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang2057\langfe2057\ loch\f0\hi ch\af0\dbc h\af13\cgr id........ .....
if (DropDownList1.Text == "Coverage For Final Assesesment Submissions")
{
Rte1.Text = System.IO.File.ReadAllText
}
{\rtf1\adeflang1025\ansi\a
What control is Rte1?
ASKER
It is the Rich TextEditor from CodePlex
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
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?
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?
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