Solved

Setting Pen-Width of a TQRShape (Quick Reports)

Posted on 2001-06-26
4
479 Views
Last Modified: 2010-04-06
Hi Experts,

I'm making a report which contains several
TQRShape-components.
There are shapes with different styles :
- qrsRectangle
- qrsVertLine
- qrsHorLine

Now I want to set the Width of the border of thos TQRShapes to different values.

All this works as long as i only Preview the report.
When I really print it, then the borders of those
shapes are all alike (very thin).

What do I have to do to print the borders of some shapes thick and other thin ?

Best regards,
The Mayor
0
Comment
Question by:wimmeyvaert
  • 2
4 Comments
 
LVL 8

Expert Comment

by:Cesario
Comment Utility
Hello wimmeyvaert,

There is a known problem where the thickness of the Shape's lines vary between the preview and the printer.  The work around is to set the Shape.Pen.Width property to a variable and set the value depending on whether you are printing or previewing.  In the report's BeforePrint event, you can check the value of the report's QRPrinter.Destination property.  If it's set to qrdMetafile, then it's rendering the preview.  If it's set to qrdPrinter, then it's rendering the report directly to the printer.

Best Regards

Cesario
0
 
LVL 6

Author Comment

by:wimmeyvaert
Comment Utility
Hi Cesario,

I tried your suggestion, but I fail to compile the following code :

procedure TqrOdetteLabel.QuickRepBeforePrint(Sender: TCustomQuickRep;
  var PrintReport: Boolean);
begin
  if QRPrinter.Destination = qrdMetaFile then
    qrchpBorder.Pen.Width := 10;
end;

It has something to do with 'qrdMetaFile' (incompatible types).
Can you help me any further with the code ?

Thanx,
The Mayor
0
 

Expert Comment

by:modulo
Comment Utility
Dear expert(s),

A request has been made to close this Q in CS:
http://www.experts-exchange.com/Community_Support/CleanUp/Q_20461282.html

Without a response in 72 hrs, a moderator will finalize this question by:

 - Saving this Q as a PAQ and refunding the points to the questionner

When you agree or disagree, please add a comment here.

Thank you.

modulo

Community Support Moderator
Experts Exchange
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
Saving this Q as a PAQ and refunding the points to the questionner

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

18 Experts available now in Live!

Get 1:1 Help Now