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 :)