Hide/show logo
Hi!
Could anyone help me on this one, please?
I need to make it possible for the users in the place I work, to have an option to show or hide the company logo/letterhead before they print a report... (So if they print om our preprinted stationary - they won't get the letterhead twice).
Been searching this forum, but haven't really found the answer.
Is that at all possible?
I'm quite new to Fast-Report and have basically no experience in delphi-programming, so an example-page would be very appreciated :-)
Hope someone have a sollution.
Thanx in advance.
/Christian
Could anyone help me on this one, please?
I need to make it possible for the users in the place I work, to have an option to show or hide the company logo/letterhead before they print a report... (So if they print om our preprinted stationary - they won't get the letterhead twice).
Been searching this forum, but haven't really found the answer.
Is that at all possible?
I'm quite new to Fast-Report and have basically no experience in delphi-programming, so an example-page would be very appreciated :-)
Hope someone have a sollution.
Thanx in advance.
/Christian
Comments
I do it as follows:
you need a Title Band and a Picture on it.
the RadioButtons in your Options before the print:
RadioButton1- print with Picture
RadioButton2- reserve the Place for an Picture what is placed on the Paper
Radiobutton3- print without a Picture
LogoPath- the Path to your Picture
it??s an example. you must change it for you.
i hope it??s help
I can't get this to work though...
When I try to preview my report, I get an error in the code (';' expected):
procedure TFPrint.Title;
(It wants me to place ';' just after TFPrint - before .)
What can I do about that?
you can set a variable hidelogo from either delphi or from a report dialog.
in the report script write code in the obp event of the pictureview object.
visible := not hidelogo;
I dont know how. I copy this code from my project. I have only change the Names from german to english. Sometimes the name "Title" is a reserved word. Change to an different. I wrote "Titel" its??s the german Title.
Do you declare the procedure in public or private ?
bye
you will use a tfrxpictureview object to display the logo
the 2 important properties of this object in your case is visible or printable.
you can control either using a value in a variable.
a variable value can be set from delphi.
ie afterloading and before calling show or print.
frxreport1.loadfromfile('pathe&filename.fr3');
frxreport1.variables := true;
or you can
create a dialog form in the report and set the value of the variable there.
typical use would be in the obp event of the band containing the pictureview object
or in the obp event of the picture view.
pictureview1.printable := <myvarname>;
or you can work from delphi through the obp event of the tfrxreport component to check what object is being handled and if pictureview1 then set its prop according to a delphi variable.
many different ways to work depends upon what suits you best.
I'll try my way today... Hope it works for me ;-)
My goal is to create a Dialogue Page, where my users can choose to print or no-print a picture.
I've made to radio buttons - one for printing with picure. One for printing without picture.
And then I'm lost... I don't know what variable to use (and basically don't know what a variable is... sorry)
Would you be so kind to give the code to copy/paste? [img]style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> This is all I have right now - and that's not much, I know :-) :[/img]
you don't need 2 radio buttons to make a choices you only need 1
here is a sample.
assuming you knew enough to add 2 buttons and set their modal result props.
use a checkbox.
leave it's state as cbunchecked.
checkbox1 caption 'print using plain paper'
in the obp event of the band containing the pictureview object for your logo,
write code to set the printable property of the pictureview object.
ie
pictureview1.Printable := checkbox1.checked;