Solved

Setting Pen-Width of a TQRShape (Quick Reports)

Posted on 2001-06-26
4
480 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 Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
loading dll from external path 1 211
add combobox item based on numbers 9 124
select query - oracle 16 95
Error E2158 compiling with Delphi XE10 Seattle 2 88
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

15 Experts available now in Live!

Get 1:1 Help Now