Solved

Delphi Programming question

Posted on 1997-09-23
6
507 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
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!

 
LVL 1

Accepted Solution

by:
sassas081597 earned 130 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

726 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