Hello, i have a report where i want to display different images. While it looks nice in the report view, the background in preview (and therewith in the pdf) is grey in the region not filled by the...
It depends in part on why there is no image in certain situations. How are you selecting the different images?
Reports have events which fire in Print Preview and Print, but not in Report view. One of them might be used to make the image control visible or not visible, according to whether there is an image in the image control, but we need a bit more detail to sort out a way to take advantage of that.
Thanks, I'll reserve comment on storing images in tables inside an accdb for the moment.
Here's where you should be able to change the background for the image control in which the images display.
You can change the background style and background color. Here I used White, which is hex code #FFFFFF but you can change it as you choose.
If that isn't sufficient to change the appearance as you need, maybe we'll have to look at the accdb to see what else could be related.
Now, storing images in tables in Access.
Images are large enough to cause the overall size of an accdb to grow much more than the same data with no images. It can cause the accdb to bloat to the point where it becomes unusable. For that reason, most experienced developers have learned to avoid this approach except when the number of such images is quite small and not likely to change over time. Maybe a handful of company logos for reports, for example.
i normally do not store the images directly in the database. But this is how the customer wants it to be. And it is an sql server as backend. The number of images will stay below 500-600. At the moment these are roughly 300.
I used the same settings as you did:
In the report view everything looks nice
But in the preview it does not. And the problem is that the preview is how it looks as pdf.
Ah, you didn't mention that the Back End is in SQL Server.
The only other thing I can think of would be to use the Format event of the report section where the image control is. You can make the image control visible or not visible, depending on whether there is an image in the image control.
In the screenshots, there are other display differences between the report view and print preview appearance of the images.
What image format is used? jpg, png or something else?