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:04PM
    Try to use (for Adobe Reader for example )
    TfrxOLEView(frxReport1.FindObject('OLE1')).OleContainer.CreateObjectFromFile('C:\test.pdf', False);
  • edited 10:04PM
    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:04PM
    Please, you can put an example file
  • edited 10:04PM
    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:04PM
    Try to wtite user function to access TfrxOLEView.OleContainer from Delphi's code
  • edited 10:04PM
    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:04PM
    Petter S. wrote: »
    Is there any examples anywhere showing how this can be done?

    Found it, in the developer's guide.

Leave a Comment