Random missing images
Hi all. I am using RB7.01 with Delphi 5. I have a complex report that
pulls some BMPs and one jpeg file to print. The way we run things here is
in a batch so reports will print in a loop of say between 30 -70 at a time.
Randomly some reports will not print some of the images. The number of
images are random as well. I have tried various printers with the same
result. With inkjet printer it usually prints a black box where the image
should be. I have been trying to solve this with various pauses with no
avail. My application has been checked for memory leak and there is none.
Please help if some one can. Thanks in advance.
pulls some BMPs and one jpeg file to print. The way we run things here is
in a batch so reports will print in a loop of say between 30 -70 at a time.
Randomly some reports will not print some of the images. The number of
images are random as well. I have tried various printers with the same
result. With inkjet printer it usually prints a black box where the image
should be. I have been trying to solve this with various pauses with no
avail. My application has been checked for memory leak and there is none.
Please help if some one can. Thanks in advance.
This discussion has been closed.
Comments
Make sure that you check for memory leaks AND resource leaks.
If you are using the BDE, increase the MaxBlobSize and BlobsToCache
settings.
Close the datasets completey when they are not in use.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
What else to check.
1. If you are using the BDE, increase the MaxBlobSize and BlobsToCache
settings.
2. Download the latest printer driver and retest.
3. Try testing with other printers.
4. If you are using a network printer, try testing with a local printer.
5. Make sure that all images have Transparent set to False.
6. Check that each report and each form and each datamodule is created and
free'd as needed. Do not autocreate anything. For an example see
RBuilder\Demos\Reports\Demo.dpr
7. Check that each dataset is opened only when needed and is closed as soon
as it is not needed.
8. Along the lines of 2 and 3 make sure that the application uses all
resources efficiently.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
the forms and they also get opened and closed with the report. I am using
direct oracle access. Some of the small bitmaps are loaded oncreate from a
resource dll. I will try the transparency setting.
8550N and a Xerox C-12 printer. Same problem. With inkjet printers the
missing images become black rectangle.
Are there certain images that always fail or is the problem random?
Can you create a simple demo project that we can run here. If so send to
support@digital-metaphors.com in zip format.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
saved the image in the control on the onprint event to see what is there.
All came out fine even for those pages that did not print right. I am
clueless here.
The line StretchDIBits(...) in ppUtils is failing with error code 6 and 8.
"Not enough storage is available to process this command."/"The handle is
invalid."
Because the return value is not checked the error is ignored and nothing
comes out. It happens so randomly that I am not sure of a resolution.
Please respond.
i have near the same problem. i have put some images on the pagestyl (BMPs).
They are also set to transparent to false and i have tried out to set
printdirect to true and false. one time a month i print out invoices with
that images on the pagetyle. randomly the images are print or not. Also if i
tried out another driver they became full black boxes.
The images are set static (no dbImages). The problem also occurese aby a lot
of customers if they print out a lot. and always they are randomly.
chris
goes haywire. I am still investigating. As I have mentioned before I found
the source of the problem but do not know the reason yet. You can test it
out the line I described in my previous post. I am surprised so few people
have this problem.
resourceproblem. The Image-Black-Problem comes randomly in this newsgroup,
but the standardsolution like: "new driver", "no transparent", "Directdraw",
does never help. On an other thread i had read, that the videocard-driver
normaly handles the standard windows API graphic-commands like paint,
stretch etc.. Therefor the card must have enough RAM.
You wrote that you got the exception in the stretch-image-command, which
could use a lot of RAM, if its a big image. But i also tried out the tip of
another news, to reduce hardware accelerator, so the videocard had more RAM
for the API - nothing changes.
Perhaps DM finds another solution. If the problem is that some graphic-cards
have resourceproblems, so perhaps they could build in there own
stretch-command.
i am using different types: Matrox, ATI and Intel on board, the problem
comes on all.
chris
is the printing problem will surface at some point and randomly. I just
tried something. In the suspected API call if it failed I let it repeat
until successful but once it fails it will never succeed in the same
procedure. For subsequent call in the same report it may succeed.
Something DM is doing that it is not recovering from the error. I will let
DM comment on this before I start digging around. I am writing a medical
report so it is crucial that it is free of error like this.
For DM a test program will be difficult to write because of our oracle data
backend but if it is the only solution then how about an archive file. Does
is go through the same drawing process as print?
this out. My application is using MSSQL 2000, which coudl be easyly
installed, because since SP3 its fre to download directly from MS.
But our application is a little bit big (1.3 Million lines), and the
enginepart is embedded in a lot of libs.
i will try to save an arcive.
chris
I can tell you that we've had this problem now with all versions of Report
Builder ... never did pin it down ... nor did Digital Metaphors ... other
quirks are pink tints to background whites ... a very subtle pink ! Last
time I queried this one I was told that it was my print driver and to
download a later version ... images ... well we worked around it and we
generate our own page that looks like the rest of the report ... never
misses nor does it print in pink !
I've always been pleased with the support provided by Digital Metaphors but
on this matter I felt as though I'd been fobbed off ... no other commercial
application like PhotoShop / PaintShop or indeed Word omits graphics at
random, nor do you get a pink cast - so telling me it was my print driver
seemed a bit of a long shot ... anyway I do hope that they fix it ...
Andrew
I would estimate that 90-95% of printer related problems are solved by
updating the printer driver. That is why we suggest this.
We also suggest that customers send us demos that we can run here in the
debugger. We cannot fix bugs that we cannot recreate. Tech Support is a
collaboritive effort between customers and tech support engineers. We
need help. That is why we ask for demos.
RB's imaging capabilities to do not match Photoshop/Paintshop, though we
strive for it. Printers vary widely in the way in which color and images
are handled - you cannot simply draw the bitmap to the printer canvas.
This is a very sad state for the Win API. There is not much
documentation on render graphics to the printer either.
The TppImage.DirectDraw boolean property can be used to control whether
RB renders the graphic directly to the printer. For some printers,
rendering indirectly works better and for others rendering directly
works better.
Transparency in images does not work for the vast majority of printers.
This is not to say that PhotoShop cannot do it, but the technique RB
uses does not work.
There are very few issues that we fail to resolve in a reasonable time
frame. It is not for lack of effort, I can assure you.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
the random missing of Images also often occurs in my application (and also
on my customers). Because lot of the developers had big projects, its very
complicated to make a small project to debug. Also like murpheys law, they
are working at the end. One reason on our project is, that we are loading
the template on runtime from an sql-server. Also we are setting up some
ado-datasets in memory (works good).
In our "random missing" - reports, we are using no dbImages, only static
images (for comany logos).
For my understanding it does not matter what orginal format this is, but i
am using bmp now, becaus its more nativ to the widnows structure of handling
bitmaps.
Suggestion:
a)
Is it possible to make a Debug session remotly via terminal server?
Perhaps this would help, if the small sample would work, instead oft
reproducing that fault.
b)
Reza Raquib in this thread had found a problem in the Strech-Procedure of
RB, where an errorcode was not tracked. Perhaps this is a reason, while not
more users had this problem. Perhaps only on bigger images (500k-1MB) and
often calling this procedure get this random "feature".
c)
In a some threads i found this problem of missing images, black boxes, pink
boxes and so. Perhaps the developers had no solution til now. Perhaps you
could mail them and if they have the problem still now, we can make a new
thread, where all people write down there experience, the environment and so
on, so that a pattern or logic could be found.
chris
I reported this problem some time ago with an application that is printing
1500 payroll checks a week.
The signature on the check is an image. We have tried everything (new
drivers, direct draw, using gif/jpg/bmp, switching operating systems). Once
we seem to have it working, we will get a report of a check taken to the
bank without the signature image. It is impossible to reproduce
consistently. At this point in time we are considering switching to a new
report component suite for our image printing, which is ashame because we
really enjoy using ReportBuilder.
But we cannot continue to have missing signatures on checks.
Dennis
seems to me that there is one of the problems. I had sampled my logos on the
exact size and missing pictures seems to be away. Normaly i saw every day
some printouts without our logo. I could not say its 100% away, but i did
not see any missed.
chris
before.
chris
to run a memory watching tool such as Sleuth QA or Automated QA, to check
for resource leaks, either from the app or the printer driver itself.
Another way to take your code out of the picture as the cause of the problem
is to generate the report to an archive file. Then use a simple application
with an ArchiveReader component to print the report from the archive file.
You can also check the archive file for the signature images to visually
verify that the draw command is getting generated for the signature on each
check before it is printed. This is a bug that is very hard to track down
and reproduce. We are as frustrated as you that we cannot reproduce the
problem and debug it to find out what is causing the problem.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com