Best practices in handling documents (mainly rtf files) with sql server

Hi,

I am developing a Lab information system and i need to create  text based reports for certain investigations.  I  have standard templates for each investigation.  i need to import these templates and attach it to a particular investigations and while creating report open this template and enter observations for each patient and print it.   I also need to retirive the patient details in the header of the document for each patient instead of typing every time all the details for each  episode.
venkataramanaiahsrAsked:
Who is Participating?
 
venkataramanaiahsrAuthor Commented:
I have downloaded TX Textcontrol express edition for dot net which solves  my  problem
0
 
ArkCommented:
I prefer HTML templates for this purpose. Template body is like this:
Name: #Name#<BR>
Birth Date: #BirthDate#<BR>
<TABLE id='details'><TR><TD>#SomeData#... etc.
Templates are storing in a database table with <TemplateName> and <TemplateHTML> fields so user can choose template. After filling data in a form (DataGridView or Textboxes, for example) and choosing template, I simply replace #xxx# with relevant data and set webbrowser.documenttext=createdhtml. Webbrowser has dialogs for print/preview.
0
 
aikimarkCommented:
How well does Word treat these RTF files?  I would recommend a solution path that programmatically opens these RTF files with Word and extracts the data from the parts of the document you need.

example
Dim oWdApp As Object
Dim oRng As Object
Set oWdApp = Createobject("Word.Application")
oWdApp.Documents.Open "your RTF path and filename"
Set oRng = oWdApp.ActiveDocument.Contents   'or something specific like a Title or field

Open in new window

0
 
venkataramanaiahsrAuthor Commented:
I've requested that this question be deleted for the following reason:

I have downloaded Textbox control for dotnet which solves &nbsp;my &nbsp;problem
0
 
venkataramanaiahsrAuthor Commented:
I have downloaded TX Textcontrol express edition for dot net which solves  my  problem
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.