sql query to variable and export cadview to file

Good morning, I want make a new procedure for repot. How must work?

  • 1.Get ProgramName
  • 2.Check exist in external DB (I have connection)
  • If exist make memo1 at 'RE-PRINTING' if not at 'NEW'

I have problem with get value from sql query, maybe you have any thinks how to fixed

//code here

procedure rara(Sender: TfrxComponent);
var                       
CHECKEDVALUE : integer;                                                                                                                                              
begin
ProgramName := <Nest."PrgName">;

SQLIntranetExist.SQL.Clear;      
SQLIntranetExist.SQL.Add('SELECT COUNT(ProgramName) As Returninfo FROM dbo.RecivePrograms WHERE ProgramName ='''+ProgramName+'''');
try
       CHECKEDVALUE = SQLIntranetExist.ExecSQL;

       if CHECKEDVALUE > 1 then begin
               memo1.text := 'RE-PRINTING';                   
       end else begin
               memo1.text := 'NEW';                                    
       end;                 

except
       Showmessage('Error in SQLQuery:'+SQLIntranetExist.SQL.Text);
end;  

end;


and secound question:

In my raport i have a automaticly generated image, If record from first question is changing memo 1 at 'NEW' i need to export this image to for example C:\Programs\ and file: <Nest."PrgName">.JPG


properties of image:

https://wrzucplik.pl/pobierz/1810591---6ael/Untitled.png

example of image:

https://pluto.uploadfile.pl/pobierz/1810590---nw6u/5316677400_1326980696.jpg

i Hope you have a thinks to solved problem :)

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.