?
Solved

Delphi Programming question

Posted on 1997-09-23
6
Medium Priority
?
509 Views
Last Modified: 2010-04-03
I am writing a form letter.  The client wants the first sentence of the paragraph bold.  How do I do this?

I assume I will use a qrRichEdit control but that is about as far as I have gone....  This needs to be done by the program with no user intervention.
0
Comment
Question by:loucks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 4

Expert Comment

by:itamar
ID: 1346056
Where the text to be written come from ? (database, typed, another control...)
0
 
LVL 1

Expert Comment

by:anilms
ID: 1346057
We also had similar problems to solve. I presume that you would
like the first line to be bold while printing. Be sure that the
Printer/s unit is included.

var PText : TextFile;

begin
     AssignPrn(PText);
     Rewrite(PText);
     Printer.Canvas.Font :=   ; {Use whatever font/bold you want}
     Writeln(PText,'Heading for Report');
     Printer.Canvas.Font :=  ; {Change back to default font}
     { Do your printing using Writeln statements}
     {                                          }
     CloseFile(PText);
end



0
 

Author Comment

by:loucks
ID: 1346058
The title of the question got screwed up...

This is delphi 3.0 and QuirkReports :) 2.0i

I would really like to stay away from printing directly on the canvas....    Is it hard to print on the canvas?  
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
sassas081597 earned 520 total points
ID: 1346059
Hi.
I hope you can find the selection yourself.
Copy the text from QRRichText to RichEdit. Make last the ParentRichEdit of the first.

Here is the rest code.
procedure ChangeAllINeed(Sender: TObject);
begin
    if FindSentence(1,1) then  RichEdit1.SelAttributes.Style := RichEdit1.SelAttributes.Style + [fsBold];
end;

where the
FindSentence(NP, NS: Integer): Boolean;
looks for and selects the nesessary sentence in nesessary paragraph if they exist.

0
 

Author Comment

by:loucks
ID: 1346060
Sorry to take so long to grade this, but I have a question which relates to this (if you decide not to answer, I will give you full points, but I would like to get your opinion...)  

When I assign the RichEdit as the parent of the qrRichEdit, all I get is the first line on my report... Otherwise, it shows up fine in the RichEdit that I manipulate it in, but as I said, only the first line appears in the qrRichEdit, no matter what I do...  I will put the total points to 200 if you can give me a pointer on where to go with this..
0
 

Author Comment

by:loucks
ID: 1346061
This is really starting to be a pain in the butt!!! QuickReport2.0i still has major bugs....  Hope someone else doesn't have to go through this... At least I am on my way now...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month11 days, 17 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question