File formats for Drawing Files

by Michael 12/15/2008 9:48:00 AM

Using the Crystal Reports viewer ManuSoft has the ability to print out drawings on your Job Tickets. (And potentially you could add drawings or images to other documents, like Delivery Notes, or a custom Goods Received Note.) This begs the question what sorts of image file does ManuSoft/Crystal reports support, and how do I best create them to get the best print outs?

The image formats supported by Crystal are BMP, TIFF/TIF, JPEG/JPG, PNG, and WMF (Windows Metafile). Of these, JPEG is probably the worst for reproducing drawings, since its “lossy” compression techniques are meant for photos, not drawings, which results in the fine details getting all fuzzy when they are saved in JPEG format. BMP, TIFF and PNG will all give very similar output. BMP has no compression, so results in large file sizes. TIFF has compression, but there are actually many different sub-versions of TIFF and Crystal does not explicity list which it supports, so users should always test their particular graphic software to make sure the TIFFs that it produces are ones which Crystal understands. PNG has the best compression, but is also a relatively new standard, so not all software supports it.

Now, almost everybody knows that a computer image has a size measured in pixels; an image file is x pixels wide and y pixels tall. And when displayed on a computer screen it will typically be displayed at its “native” resolution, with one pixel in the image using one pixel on the screen (unless it is so large that the image is bigger than the screen, in which case it will often get automatically shrunken.) A typical screen resolution is around 75 to 100 dpi (dots per inch), so an image that is 400x600 will be very approximately 4 by 6 inches on the screen.  What about printing the image out on a printer though? Now we have a device that might be printing at anywhere from 180 to 1200 dpi. Somehow the software has to work out how big to make the image on the paper, and certainly with no further information being available, there is no correct answer to the question. The image needs to have some additional information stored with it before the software can make a sensible decision.

The problem is, a lot of image formats only care about being displayed on screen. What we need is for the image to have stored with it some information about what the DPI was when the image was taken. So, for example, I scan in a 4in x 6in drawing at 150 DPI, which results in a 600x900 pixel image. So long as the “I’m a 150dpi image” information is also stored with the file then Crystal (and other software) knows it’s a 4in x 6in image, and when it prints that image on a 600dpi laser printer it can use a 4x4 pixel block for each of the original pixels, so the image comes out at the correct size. So, what image types support this information? TIFF images have a DPI stored in their format. A JPG file may have a DPI stored in them. BMP and PNG do not store any DPI information. This usually means that I recommend TIFF as a good format to start off with.

And if you are scanning your drawings yourself, with a typical flat-bed scanner, you can be pretty sure that the TIFF file will have the correct DPI stored with it. Thus, if you have a drawing printed out on an A4 page, and you scan that A4 page in, then it should come out neatly on an A4 page when attached to the job ticket. In reality I’ve found you should scan in slightly less than the full A4 page, to allow for the non-printable margin that the printers normally allow for, plus the small header and footer that is part of the Job Ticket report. But what if you are using some sort of “Export to TIFF” function directly in your CAD software, rather than scanning in a paper document? What DPI will be stored with the file in that situation? The answer is “I don’t know”, because of course every bit of software is different. It is, unfortunately, a case of “suck it and see”.

Let's talk a bit more about what size of image you should scan. The default Job Ticket in ManuSoft has a small default image in it which is a graphic consiting of the words "Drawing Not Available - Click here to view Hyperlink." Thus if the Crystal Reports Viewer cannot interpret your image file correctly, this is what you'll see instead. If you click on the graphic then it'll try to launch the file in whatever your default viewer for that file type is. So, for example, if you attach a PDF file to a ManuSoft part, then when you display the Job Ticket on screen you'll see the "Drawing Not Available" image, but you can click on it to automatically open the PDF in your installed version of Acrobat Reader.

Anyway, the default image is quite small, but it is set to "can grow", thus when you scan a larger image then the Crystal Viewer will try to display the image at it's "natural size". There is no way to set an upper limit to this natural size, so if you attach an A3 sized graphic, then it will get spread over two (or more likely four, because of the margins) A4 pages in the print out. Unfortunately also the images cannot be automatically rotated, so if you scan in your A4 drawing in landscape mode, then when the Crystal Report puts that image on the portrait mode Job Ticket you'll find the image split over two pages as it has ended up too wide for the page. The only way to stop this "multiple page" behaviour is to create a custom MyTicketMOB.rpt report where you turn the "can grow" option off, but size the default graphic to something suitable for the images you will be using. All the image files you link to will now be stretched or shrunk to the default size you have set, so you obviously need to be fairly consistent in the scanning of your drawings in order to get a consistent output.

So, as you can see, there are a lot of factors in place that usually means you have to experiment a little to get the best results. It’s worth you having a decent image viewing program installed on your PC while doing all this, something which will give you information like the DPI setting inside the files being created. The copy of Microsoft Paint that comes with Windows XP is not enough! I recommend IrfanView (http://www.irfanview.com/) as a good bit of Freeware for viewing images of all types.

Way back at the start of this post I mentioned a final format of “Windows Metafile”, or WMF. Unlike all the other formats, WMF is a vector format, not a bitmap format. This means that WMF is a lot more like DXF or other CAD files. WMF is most commonly used by Microsoft for their clipart files, so you’ll find a heap of WMF files somewhere in your Microsoft Office program folders. Because it is a vector format this means that it can be resized to any size and still look good, instead of going “blocky”. This would obviously be great for drawing files. But as a vector format it doesn’t have a DPI setting, but there’s some sort of “default size” in there somewhere. But it is also a pretty obscure format in a way, so unless the CAD software that you use specifically supports WMF as an export format, you should probably ignore it. But if it is supported then you may want to try it out and with some small modifications to the TicketMOB.rpt report you might get some very good results.

Creating your own Crystal reports in ManuSoft

by Michael 9/23/2008 4:28:00 PM

As most of our users are aware, ManuSoft uses Crystal Reports to produce a lot of its printed output. Whereas earlier versions of ManuSoft produced very boring looking print outs - mono-spaced slabs of numbers in Courier New, dashes used for separating lines, etc. - since version 6.2 we've been steadily improving the look of our reports by using Crystal, where we can use many and multiple fonts, draw boxes, include graphics, etc.

As well as looking better, this also gives our users an opportunity to further customise our reports in ways that were not previously possible. We've also added the "MDBC Reports" menu to allow you create your own reports from scratch (or from one of the downloadable reports from our support site) and still run them from inside ManuSoft. ManuSoft provides automatically everything you need to run and view Crystal reports.

But to create your own reports, or to modify the reports that ManuSoft have provided, you need your own copy of the Crystal Reports program (and a licence for each user that you install the program for.) Many users will already have a copy, so it's worth quickly running through the recent versions that have been released and how suitable they are for use with ManuSoft.

ManuSoft v6.2 used Crystal Reports v8.0 and then v8.5. We also used an optional feature called "Compiled Reports" in order to view the reports in ManuSoft.

With ManuSoft v6.3 we moved on to Crystal Reports v9. This was a big update by Crystal and was not "backwards compatible" with v8.5 an earlier. That is, if you created in a report in V9 of Crystal you could not open that report with v8.5 or earlier. This version of Crystal also required Windows 2000 or better to run as it now fully supported (and required) something called Unicode, which Windows ME/98/95 did not support.

When we came to release ManuSoft v6.4 Crystal Reports had moved on to version 11 (also known as "Crystal Reports XI".) We made use of some of the new features in Crystal XI in reports like the Job Ticket, in order to allow drawings to be attached automatically to the print out. But Crystal XI (and indeed Crystal v10) were both backwards compatible with v9, thus if you already had a copy of Crystal Reports v9 then you could still create reports for ManuSoft v6.4 (so long as you didn't need some of the specifically new features provided by v10 or v11.)

ManuSoft v6.5 continued to use Crystal XI as its "viewer", so there were no real changes there. But new versions of Crystal have continued to be released, so let's look at them and what they offer.

First, there was "Crystal Reports XI Release 2". This was a relatively minor update of Crystal Reports, and indeed if you install this version and go into Help then About you'll see it's also referred to as v11.5. Because it was a minor update it has in fact been made available as a free upgrade for "Release 1" owners from this location:

http://resources.businessobjects.com/support/additional_downloads/service_packs/crxir2.asp

As it explains on the link, you just need to use your same licence code you got when you bought the Crystal XI product in order to install this updated version. Warning: It's a big download, at just over 1Gb, and you'll need plenty of free hard drive space to decompress the files before installing the program too.

I think there are some great new features in "Release 2" which make it a worthwhile upgrade. Most importantly there is a "Find in Formulas" option, which is great for when you're trying to locate all the possible places in a report where you reference a particular field or formula. The formula editor has also been improved with an "auto-complete" feature, which is pretty neat.

Finally, there is the recently released Crystal Reports 2008 (also known as version 12.) This version is still backwards compatible all the way back to v9, thus if you use this version of Crystal to modify or create your reports then you'll be able to use those reports in ManuSoft v6.4 and v6.5. If you use a new feature that is specific to Crystal 2008 (and there aren't many) then it will just be ignored when the report is displayed in ManuSoft.

Any version of Crystal Reports can be a daunting prospect. It's a big and complicated (but also powerful) program. We try to regularly do introductory training courses on specifically using Crystal Reports with your ManuSoft data, and there's also a basic introduction in the online help. Otherwise there's always our telephone and email support where we'll try to help out as best we can, so long as we don't end up writing the whole report for you. A bit of Crystal support here and there is covered in your maintenance contract; writing customer specific reports are not, but we will hapilly quote you a price for designing any reports you can't create yourself. Many users like us to do the hard work of creating the inital report, but then hapilly tweak it as needs change over time.

Powered by BlogEngine.NET 1.2.0.0

About the authors

ManuSoft Logo
Manufacturing Software Blog

E-mail us Send mail

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Pages

    Recent comments

      Categories


      Disclaimer

      The opinions expressed herein are our own personal opinions and do not represent our employer's view in anyway.

      © Copyright 2010

      Sign in