|
Hi all,
I use CR8.0 and made an UFL in visual basic with Visual Studio 2010, the function reads a textfile (where I have some If/Then statements) on my desktop and write the contents to another textfile on my desktop. That's working, but I don't want to write to another textfile on my desktop, I want to write to a formula in my report "@updated_formula"... so I want to change the path in my string "UPDATE_FILE" which is now directing to my desktop textfile into the path to my formula "@updated_formula" in my report but I don't know the path to my formula... Something like myreport\@updated_formula ?
Is there a way to update/write to a formula in the report?
Please help...
Imports System.Runtime.InteropServices <ComVisible(True), ClassInterface(ClassInterfaceType.None), GuidAttribute("CFC3319F-EA25-44a9-9A4F-0AC6C3364A1A")> _ Public Class RtfUfl : Implements IRtfUfl Public Function ReadTextFile() As String Implements IRtfUfl.ReadTextFile Dim READ_FILE As String = "C:\Documents and Settings\Xqq_me\Desktop\formula.txt" Dim WRITE_FILE As String Dim UPDATE_FILE As String = "C:\Documents and Settings\Xqq_me\Desktop\updated_formula.txt"
If System.IO.File.Exists(FILE_NAME) = True Then
Dim objReader As New System.IO.StreamReader(READ_FILE) WRITE_FILE = objReader.ReadToEnd objReader.Close() Dim objWriter As New System.IO.StreamWriter(UPDATE_FILE) objWriter.Write(WRITE_FILE) objWriter.Close() Else MsgBox("File Does Not Exist")
End If End Function End Class
Edited by Xqq_me - 30 Jan 2013 at 2:15am
|