Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with image

Status
Not open for further replies.

earlrainer

Programmer
Mar 1, 2002
170
IN
Hi Guys,

i want to print an image(bmp) on printer.

i want to print a logo and at the side of the logo my name and address.

how can this be done...can the image and the text be printed side by side(i.e on same rows)
or will i have to print the image first and then go to next row and print text

bye
 
Use Quickreport

Place a Quickreport on a form (or "New" / Quickreport).
Place a QRImage on the Quickreport. Select your picture in the picture property. Place a QRLabel whereever you want. Select font, style and size. Preview and Print the Report or at runtime call:

Quickreport1.Print;
{Quickreport1 must be the name of your Quickreport}
 
Excellent Tip. but,
I tried this here with D3 and it worked fine,
But when I got back to my home office and tried it with D4 It dosent seem to work.
I get nothing at all on the preview sceen which shows page 1 of 0
attempting to print does nothings but flash up the dialog for a second.
Are there some default settings changed in the D4 version?
or Is my Qreport component damanged in some way.
I loaded the Demo project and that worked Fine???
Steve.
 
If you have Quickreport 3, you generally need a Detailband. On the Quickreport set the Property "Bands"/Detailband to true and it will work.
 
The page you are printing on has a Canvas property. You can draw on this:
Code:
if not PrintDialog1.Execute then Exit;
with Printer do begin
    BeginDoc;
    Title := 'My letterhead';
    Canvas.Brush.Color := clWhite;
    Canvas.FillRect(Rect(left,top, right,bottom));  // Clear the form.  Not necessary, as the page is white already, but hey; it's only an example.
    Canvas.Font.Size := 14;
    Canvas.TextOut(10, 10, 'Hello world!');
    EndDoc;
end;
You can use all the methods of TCanvas, and you don't have to care whether you're drawing on a window, or a printer page, or whatever. Of course, as other posters have pointed out, if you're creating a report, you'd be better off using a reporting tool. -- Doug Burbidge mailto:dougburbidge@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top