Solved

Setting Pen-Width of a TQRShape (Quick Reports)

Posted on 2001-06-26
4
481 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
FMX enumerated colours 2 101
CheckListBox usage 3 59
How to remove Recent Projects from Embarcadero C++ builder XE10. Berlin 2 58
DBCtrlGrid, Delphi, Scroll 8 15
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…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

803 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