Home RAP
New Blog Posts: Merging Reports - Part 1 and Part 2

Image processing using pass-thru function

edited March 2011 in RAP
Hi

I have a pipeline that has a graphic field. I can view the original
image with a TppDBImage when hooked up with that field.

I also have a pass-thru function doProcessImage(pPicture: TPicture):
TPicture;

But I couldn't find a way to use this function in rap with a TppImage
object on the report. How can I assign the function result to the
TppImage object?

An one code line sample would be great.

Bora Aydemir
Delphi 2007 U3, RBuilder 12.01 Ent.

Comments

  • edited March 2011
    Hi Bora,

    I believe this will need to be done in the pass thru as well. If you
    are simply altering the TPicture, why do you need to return anything?
    If you send a reference to the TPicture property of a TppImage
    component, simply alter it in your pass thru and the changes should be
    reflected when you run the report.

    If you are insistent on assigning a new TPicture to the TppImage
    component, you will need to do so in the pass thru (or another pass thru).

    ppImage1.Picture.Assign(Picture);


    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2011
    Hi,

    Sounds like a good idea, I'll give it a try. My only problem is how can
    I can send the graphic data from the pipeline to an existing pass-thru
    function that takes a tpicture as a parameter in rap code? Likewise how
    can I assign the graphic data from the pipeline to a TppImage object in Rap?

    Best Regards

    Bora Aydemir

    25/03/2011 18:43, Nico Cizik (Digital Metaphors) yazmis:
  • edited March 2011
    Hi Bora,

    If you are using a TppDBImage you could send that TPicture as the data.
    Or an easier route would be to simply send no parameter, and access
    the datapipeline directly from the pass-thru function. This way you
    will have full access to all the DBPipeline's functionality. Then, once
    you process the data, reassign the TPicture object to the TppImage in
    the pass-thru as well.


    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.