Crystal RTF question with VB.Net

  • Thread starter Thread starter GatorBait
  • Start date Start date
G

GatorBait

Hi,

I am trying to get a rich text box to display some text in rich text
format and am having a very difficult time getting it to work properly.
Here is what I am doing...

I have created a crystal report that only has the field (called Memo1)
that I want to display. I set the TextFormat property of the field to
crRTFText (and I also made sure that the "Text Interpreter" under the
Paragraph tab of the Format menu was also set to "RTF Text").

The text I want to display is saved in an Access DB, already in rich
text format. I am connecting to the db using ADO.NET and am able to
populate the corresponding field on my crystal report. The problem is
that when the report displays, it is showing all of the rich text code
rather than the text formatted as such.

I also tried to put a Text Object on my report and drag the Memo1 field
into it, but that did not work either as I got the same result.

This is really driving me up the wall, and I will be very grateful if
anyone is able to help me with this issue. Thank you very much!

--Matt
 
Matt,

There is a VB6 control 'richtx32.ocx'. You can add this from references
'COM' objects.

HTH,

Phil
 
Phil,

Thank you very much for your response. I was able to find the
reference you mentioned and I added it to my project and I have a
feeling that there is more that I need to do. I'm a newbie to .NET,
I've only been using it for about a month now, can you please give me
some more details on what else I need to do? Here is the code I am
using:

Dim conStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\QuickFL\QFWindata.mdb"
Dim conn As OleDbConnection = New OleDbConnection(conStr)
Dim sqlStr As String = "SELECT " & _
"*" & _
"FROM " & _
"Letters " & _
"WHERE " & _
"Client_ID = 1141751058"
Dim da As OleDbDataAdapter = New OleDbDataAdapter(sqlStr, conn)
Dim ds As DataSet = New DataSet()
Dim rpt As New Letter()

da.Fill(ds, "tLetters")

rpt.SetDataSource(ds.Tables("tLetters"))
fReportViewer = New ReportViewer()
fReportViewer.crvMain.ReportSource = rpt
fReportViewer.MdiParent = Me.MdiParent
fReportViewer.Show()

Thanks again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top