Please enable JavaScript to view this site.

Report Designer Manual

Navigation: Professional Report Designer

How to: Load a current RTF document during runtimes

Themen Prev Top Next More

 

professioneller report designer zu laufzeiten ein aktuelles rtf dokument laden

 

 

First you open the professional report designer and scroll down to the section Beahaviour in the Property Grid. Then you choose Visual Basic as a Script language.

 

Then you insert a rich text element and go to the Property Grid. In the section Behaviour you open the dropdown list Before expression under Scripts and click on New:

 

professioneller report designer zu laufzeiten ein aktuelles rtf dokument laden 2

 

Then the Script View opens. There you enter the following code:

 

Private Sub richText1_BeforePrint(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintEventArgs)

Ctype(sender, XRRICHTEXT).LoadFile("C:\\Dateien\\TestRTF.rtf")

End Sub

 

In the parentheses after LoadFile you enter the path to the rtf-file you want to load. The path should be in the following form:

 

drive:\\folder\\subfolder\\filename.fileextension

 

Then you save the report. You successfully loaded a current RTF file.