Problem with TfrxPictureView

edited 9:46AM in FastReport 4.0
I am developing a small project in which it is creating report runtime by fetching values database. It also involves fetching image from database and display same in TfrxPictureView object on fastreport. I am using SQLite database.

My code segment as below

procedure TFrmMain.frxReport1BeforePrint(Sender: TfrxReportComponent);
var
  ID1: String;
  DESC1: String;
  //i: Integer;
  j: String;
  mystring: String;
  Subreport1: TfrxSubReport;
  MasterData1: TfrxMasterData;
  MasterData2: TfrxMasterData;
  mdrowcount: Integer;
  Memo2, Memo3: TfrxMemoView;
  Picture1: TfrxPictureView;
begin
   //showmessage('Inside BEfore Print Event');
   MasterData2 := frxReport1.FindObject('MasterData2') as TfrxMasterData;
   MasterData1 := frxReport1.FindObject('MasterData1') as TfrxMasterData;
   Memo2 := frxReport1.FindObject('Memo2') as TfrxMemoView;
   Memo3 := frxReport1.FindObject('Memo3') as TfrxMemoView;
   Picture1 := frxReport1.FindObject('Picture1') as TfrxPictureView;


procedure TFrmMain.frxReport1GetValue(const VarName: string;  var Value: Variant);
var
  j: Integer;
  Memo2, ID1, DESC1: TfrxMemoView;
  Picture1: TfrxPictureView;
begin

      //showmessage('Inside Get Value Event');
     frxUserDataSet1.RangeBegin := rbFirst;
     frxUserDataSet1.RangeEnd := reLast;
     frxUserDataSet1.RangeEndCount := 9;

     Memo2 := frxReport1.FindObject('Memo2') as TfrxMemoView;
     ID1 := frxReport1.FindObject('ID1') as TfrxMemoView;
     DESC1 := frxReport1.FindObject('DESC1') as TfrxMemoView;
     Picture1 := frxReport1.FindObject('Picture1') as TfrxPictureView;

               if j < rowcount then
                 begin
                   if (VarName = 'ID1') then
                   Begin
                      showmessage('showing ID');
                      Value := j + 1;
                   End;

                   if (VarName = 'DESC1') then
                      Value :=  mydesc[j];
                   
                   //its not going inside below if loop while there is picture object placed on the report
                   if (VarName = 'Picture1') then
                       showmessage('showing picture');


                 end
               else


It is parsing variable ID1, DESC1 however it is not parsing variable Picture1.
Any idea what should be problem

iuLBIwI.jpg

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.