Solved

Delphi Programming question

Posted on 1997-09-23
6
505 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
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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to convert wav to mp3 in delphi 9 197
PDF library for Delphi 2 120
How to build JSON File in Delphi 6 3 32
Delphi: sending SMS on android platform 1 18
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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now