how I can change fp3 preview file

edited February 2013 in FastReport 4.0
Hi. sory for my english.
I have 30000-400000 fp3 preview report in my database.
previews have a big size logo picture. and I want to change this picture with other small picture.

I am use this code. If I Use fxReport->ShowPreparedReport preview display changed picture. But does not change the data stored in my database.
activate this line 'DM->frxReport1->PreviewPages->SaveToFile("d:\\dene.fp3");' then dene.fp3 is contain old fp3.

TfrxComponent *op;

S=new TMemoryStream();
GepQ->FieldByName("PDF")->SaveToStream(S);
S->Position = 0;
DM->frxReport1->PreviewPages->LoadFromStream(S);
op=DM->frxReport1->PreviewPages->Page[0]->FindObject("Picture1"); // FindObject("Pıcture1");
if(!VarIsNull(op))
dynamic_cast<TfrxPictureView *>(op)->Picture->LoadFromFile(Ara);
//DM->frxReport1->ShowPreparedReport();
DM->frxReport1->PreviewPages->SaveToStream(S);
//DM->frxReport1->PreviewPages->SaveToFile("d:\\dene.fp3");
Q->SQL->Add("Update ARSIV Set PDF= :PDF Where IDX="+GepQ->FieldByName("IDX")->AsString);
S->Position = 0;
Q->ParamByName("PDF")->LoadFromStream(S);
delete S;

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.