Using Images (for example
logos) in BaaN reports:
To say briefly:
- Create a font that contains these image files and use
that font in the report so that these image files can be used on the
report.
How to create a font:
Download font creator trial
version by searching in Google. Install that and using font creator, create a
font family (just by clicking new and giving a name).
Now this is like any other font
family we use, like Times New Roman, Arial etc. Now we can link an image for
every alphabet in that font family so that the corresponding image of that
alphabet is used where ever this font is used. For example if we use some of
the fonts like ---- etc, if we type some word, we don’t see any characters
printed there, instead we see some images (some symbols like alpha, beta etc).
This is because those images are linked to those characters in that font
family. Similarly for example we have created a new font family (as described
above) with name “Logo” and linked different logos to different characters, for
example logo1 for A, logo2 for B, logo3 for C (by right clicking on those
characters of the font family and choosing “import image” and then by clicking
Load we can browse through and select the image and then by clicking Generate
option we can get a font file generated for that image, here we can also adjust
the image size so that the imported image is properly shown). And the font we
created above is of type True Type. Now place this font file in C:\WINDOWS\Fonts
directory so that this font can be used.
Relevant screen shots:
How to use it in report:
Declare a variable (for example
the variable “logo.print”) with domain tcmcs.str1 in the report script. And
assign “A” (i.e. for what ever character the image is linked) for this in
before.program. In the report editor, create form field using the variable we
declared in the script i.e. logo.print. And while defining this form field, in
the fourth tab we can see font properties of that form field in the report.
There we can see 16 user fonts which we can use in the reports. Suppose we
selected user font 16. And then while printing the report for the first time,
choose a device of type windows printer and check preview check box. And when
the report is shown as a preview, right click on the form field we created above
and link the font to the font we created above (and set the size as 36 or 48 or
72 depending upon the space allocated in the report) and save. If this is done
and saved for once, the same font will be used there after. So, now this font
is also available for us (apart from default fonts we have) to use in the
reports. And since we gave the value of the variable as “A” (for which logo1 is
linked in the font we created), logo1 is printed on our report. If we try to
see the report using a device of type screen, the logo will not be shown on the
screen. But if we use a device of type Windows printer, we can observe the logo
on printed paper (or in preview if we select). So in this way we can in fact
use so many images by linking them to different characters in the font we
created. And if this font is completely filled we can define another font which
there after we can link to another user font. So practically we can use that
many images we want to use.
No comments:
Post a Comment