Pasting object from drawing into base report

After copying an image or text from a LO drawing, nothing happens when I try to paste it into a report that I am editing in LO base. Am I missing something?

You could past an image to a report, which has already been executed.
You could insert an image in a report by the special image control of a report. It will need a path to the image. Could also be a binary field of database.

1 Like

Yes. I wonder how pasting an image to the same place on every page of a report could be automated.

Have a look at the example
ImageOnEveryReport.odb (93.7 KB)

I have done what you have suggested. Thank you for helping to continue explaining my issue because when I first posted this question I was not certain how to explain my problem. I’ve since discovered that it is not possible to insert images under other objects. Because the image I was trying to paste was to big, nothing happened. I could submit a suggestion to the developers. “when pasting images that are to large to fit the page without overlapping other objects there could be an error pop up window to say 'You can not paste objects that overlap other objects or go beyond the page borders.” My challenge is to use an image that can go below the other fields or objects on the report. For example I want to use this image as the background of the report page.


I’m using this to help me grow plants for the future. In this project called LANdpLAN, I have taken info. from pfaf.org and made a database for plant selection and cultivation. eeLANdpLAN.blogspot.org

Open the report for editing and try Format → Page. You could only add a color to the background here, not an image. You could do this after the report had been executed (by macro).

There is no possibility to set a field bigger than the area, in which the field has been created. All this fields will be created as cells of a table and one table couldn’t be position in front of another table. So no chance to put an image in back of the report.

Blockquote

You could do this after the report had been executed (by macro).

Blockquote
Does this mean I can use a macro to add a background image to each page of the .pdf report?

It will work by a macro. I have done this to add borders around the tables the ReportBuilder creates.
You could open the report by macro:

 oReport = ThisDatabaseDocument.ReportDocuments.getByName("NameOfMyReport").open

oReport is the document you will add the background. But I haven’t tried to find where to change the background. Would try it with XRay or mri.

Might be something like this:

StyleFamilies = oReport.StyleFamilies
PageStyles = StyleFamilies.getByName("PageStyles")
PageFormat = PageStyles.getByName("Default")
PageFormat.BackGraphicURL = …

Have a look at:
https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1style_1_1PageProperties.html