Acess violation with Rich Edit
I am new to FR4 and I am using Delphi 2007 and Advantage Database tables
I want to display a memo field in RTF so I created a report that has the report header, a Group header, a MasterData Band and a Page footer
I drop a Rich Text Object on the MasterData band and set the dataset and the datafield to the memofield and save the report
I use a button click in my Delphi program to run the report.
procedure TClientForm.BitBtnPrintClick(Sender: TObject);
var
AliasPathRpt: string;
begin
AliasPathRPT := ExtractFilePath(Application.ExeName)+'db6adv\';
myreport.LoadFromFile(AliasPathRPT+ReportTableFilename.Value );
myreport.ShowReport();
end;
I run my program and the reports runs fine but when i close my program, I get an access violation.
"Access violation at address 00407AD6 in module 'BA6.exe' Read of address 01F15194" BA6.exe is my program
I run other reports using the above code but no Rich Edit object and they run fine. Also I noticed if I ran another report after running the one with the Rich Edit then I do not get the access violation.
Is there something I need to do after the report prints to stop the access violation.
Thanks for your help
I want to display a memo field in RTF so I created a report that has the report header, a Group header, a MasterData Band and a Page footer
I drop a Rich Text Object on the MasterData band and set the dataset and the datafield to the memofield and save the report
I use a button click in my Delphi program to run the report.
procedure TClientForm.BitBtnPrintClick(Sender: TObject);
var
AliasPathRpt: string;
begin
AliasPathRPT := ExtractFilePath(Application.ExeName)+'db6adv\';
myreport.LoadFromFile(AliasPathRPT+ReportTableFilename.Value );
myreport.ShowReport();
end;
I run my program and the reports runs fine but when i close my program, I get an access violation.
"Access violation at address 00407AD6 in module 'BA6.exe' Read of address 01F15194" BA6.exe is my program
I run other reports using the above code but no Rich Edit object and they run fine. Also I noticed if I ran another report after running the one with the Rich Edit then I do not get the access violation.
Is there something I need to do after the report prints to stop the access violation.
Thanks for your help
Comments
I tried several things but it the report seems to run fine when the preview displays the report but i get the access violation when i close my program if that was the last report that I used. That is why I thought maybe I need to close something.
I looked for an example that shows how to use the Rich Edit in an actual report and I even tried to write a program that only prints a report with the Rich Edit but no luck.
I have looked a lot for a simple example that works but no luck.
One other thing I am using the standard edition of FR4 but I have not purchased it. I am trying to see if it is easier to use than what I am using now.
It says that the only difference between the purchased edition and the trial edition is the nag screens. I hope this has nothing to do with it.
I have read the User manual documentation and the programmer and the developer manuals as well but no luck . I also searched this problem on the forum before posting and found nothing.
Any help in the right direction would be appreciated.
This has led me to one more question if you don't mind.
When you click and save the RTF file some where what does that do. I changed the demo a little and notice that if I clicked on the check mark near the save icon it saves it automatically but I dont know as what or where or why.
I really appreceiate you nudging me in the right direction. Thank you for your patience also.
when you click on the save to file button it is saved in the default save dir of the program or if you have included a designer component in your program what ever save dir you have set the designer to at runtime
the rtf memoview works much like the memoview except it is rtf.