?
Solved

Setting Pen-Width of a TQRShape (Quick Reports)

Posted on 2001-06-26
4
Medium Priority
?
509 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
ID: 6232103
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
ID: 6235310
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
ID: 7756561
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
ID: 7778982
Saving this Q as a PAQ and refunding the points to the questionner

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline
Suggested Courses

840 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