Since you didn't mention why you need to change the picture or where the picture is placed (i.e., how often it is printed) in the report and what purpose it serves, it's difficult to provide a good answer.
Having said that, the best way to change pictures is to store them in a database and either join to the table that contains them or use a subreport to get them. You can also use the section format event to point to a specific picture. I can't provide you with any Delphi code samples, as I work primarily with VB. The third option is to create the picture as a linked ole object, in which case the link is updated at runtime. But that is only practical for things like logos.
I don't believe you can pass pictures as parameters.
Actually i have to place the pictures in the report header to give description about a calculation.
I can say that its similar to logos. wat do u mean by linked OLE objects.
I cannot use the option of placing them in tables as they are in header.So please tell me about using section pointer and linked ole objects.
Well, the comment that you cannot place the pictures in a table because it is used in a header does not sound right to me. You could create a subreport in the report header to pull the picture.
As for the linked OLE Object, when you Insert the OLE Object, make sure you select Create from file and then check the "Link" checkbox. This will allow CR to update the object either at designtime or runtime as it changes.
As for using the section format event of the RDC, I don't have any sample delphi code. I would strongly recommend one fo the first two approaches over using the section format event.
In Crystal 8.5 when you liked the .bmp object you could remove the path and it would default to wherever the .rpt file was located. In Crystal 10, it defaults to a folder. How can you change this to be the folder where the .rpt file is located like in 8.5??
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.