how I can change fp3 preview file
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;
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;