Gert76
asked on
Generating a Report using TRichEdit
How do I generate a report from a SQL database,
reading the fields into a TRichEdit, knowing the
length of the fields and their text discriptions and
going over to a new line if the fields and their
discriptions exceed the RichEdit components width (wordwrap is disabled) ?
reading the fields into a TRichEdit, knowing the
length of the fields and their text discriptions and
going over to a new line if the fields and their
discriptions exceed the RichEdit components width (wordwrap is disabled) ?
why RichEdit?
ASKER
The client wants a RichEdit report because they want to save the report as tab delimited file and they want to
edit the information in the report etc. The previous
reports before I got involved in the project was all done
with RichEdit's so I don't think they will change this.
edit the information in the report etc. The previous
reports before I got involved in the project was all done
with RichEdit's so I don't think they will change this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
A problem with the RTFExportFilter is that all components that need to be on one line of the RTF need to have their Top properties exactly the same.
Regards Jacco
Regards Jacco
Hi Gert,
Are you still here?
Are you still here?
ASKER
Hi Jaco
To save the file as RTF is not an option !
They want to save the file as a tab delimited file to
import and edit it in Excel.
Thanks
Gert
To save the file as RTF is not an option !
They want to save the file as a tab delimited file to
import and edit it in Excel.
Thanks
Gert
Hi Gert,
Then you might consider using:
procedure TForm1.Button1Click(Sender : TObject);
var
lFilter: TQRCommaSeparatedFilter;
begin
lFilter := TQRCommaSeparatedFilter.Cr eate('test .csv');
try
QuickRep1.ExportToFilter(l Filter);
finally
lFilter.Free;
end;
end;
This will give you a file you can import into Excel.
Regards Jacco
Then you might consider using:
procedure TForm1.Button1Click(Sender
var
lFilter: TQRCommaSeparatedFilter;
begin
lFilter := TQRCommaSeparatedFilter.Cr
try
QuickRep1.ExportToFilter(l
finally
lFilter.Free;
end;
end;
This will give you a file you can import into Excel.
Regards Jacco
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
split points between Slavak and Jacco
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Thanks,
geobul
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
split points between Slavak and Jacco
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Thanks,
geobul
EE Cleanup Volunteer