Working with OLE containers

Hi there

We need to use an OLE container in a report generated with FastReport 4.

The first tries were fine, but we need to assign the object (a CorelDraw X5 file) in a dynamic way.

I mean, the CorelDraw file is different each time, so we can't assign it directly inside the project. We need to pass it from a external source (from the Delphi application).

Anyone knows how can we do this?

Best Regards.

David Rguez.

Comments

  • gpigpi
    edited 10:25AM
    Try to use (for Adobe Reader for example )
    TfrxOLEView(frxReport1.FindObject('OLE1')).OleContainer.CreateObjectFromFile('C:\test.pdf', False);
  • edited 10:25AM
    gpi wrote: »
    Try to use (for Adobe Reader for example )
    TfrxOLEView(frxReport1.FindObject('OLE1')).OleContainer.CreateObjectFromFile('C:\test.pdf', False);

    It worked fine, thank's >
  • edited 10:25AM
    Please, you can put an example file
  • edited 10:25AM
    gpi wrote: »
    Try to use (for Adobe Reader for example )
    TfrxOLEView(frxReport1.FindObject('OLE1')).OleContainer.CreateObjectFromFile('C:\test.pdf', False);

    Hi.

    Can something like this be done from inside of FR?

    I have PDF-files on disk where filenames are stored in a table in DB. What i need is to build a report that list information from my table together with a print of my PDF's.

    So, I drop av TfrxOleView in my detail-band, and try to set it up in a OBP-event on the band. But I haven't found the correct way of doing this. Any hints anyone?

    Petter
  • gpigpi
    edited 10:25AM
    Try to wtite user function to access TfrxOLEView.OleContainer from Delphi's code
  • edited 10:25AM
    gpi wrote: »
    Try to wtite user function to access TfrxOLEView.OleContainer from Delphi's code



    Thanks. I'm a little lost here. Is there any examples anywhere showing how this can be done?
  • edited 10:25AM
    Petter S. wrote: »
    Is there any examples anywhere showing how this can be done?

    Found it, in the developer's guide.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.