You are not logged in.
Pages: 1
I generated a report using FastReport and would like to send to client extjs, what steps?
I am using Delphi XE7 with mormot.
Offline
Take first a look at those extjs samples:
https://github.com/synopse/mORMot/tree/ … tJS%20Grid
https://github.com/synopse/mORMot/tree/ … 0FishFacts
You have a way to return any kind of information from the server, then consume it from extjs.
Offline
this already implemented
My problem is how to send PDF to the client
function TMyClassDirect.relatorio(): RawJSON;
var
ExtjsVO : TExtjsVO;
ListaRelatorio : TList;
RelatorioVO : TRelatorioVO;
FS : TFileStream;
begin
ExtjsVO := TExtjsVO.Create;
ListaRelatorio := TList.Create();
RelatorioVO := TRelatorioVO.Create;
try
FS := TFileStream.Create('\pdf\pedido.pdf', fmCreate);
RelatorioVO.LISTA := FS;
ListaRelatorio.Add(RelatorioVO);
ExtjsVO.success := true;
ExtjsVO.rows := ListaRelatorio;
ExtjsVO.total := Registros;
except
ExtjsVO.success := False;
ExtjsVO.rows := ListaRelatorio;
ExtjsVO.total := 0;
end;
Result := ObjectToJson(ExtjsVO,[]);
FreeAndNil(ExtjsVO);
FreeAndNil(ListaRelatorio);
FreeAndNil(RelatorioVO);
FreeAndNil(FS);
end;
return:
{"result":[{"success":false,"rows":[],"total":0}]}
Offline
Transmit the response as a BLOB, using a custom answer type for the interface method.
Offline
sorry if I did not understand me
I just want to get a pdf server and render on the client using httpserver
researched and found not to do
I'm starting in mormot
Offline
My previous link http://synopse.info/files/html/Synopse% … #TITLE_405
would show you how to transmit a pdf from the server.
Offline
sorry i read all the documentation
but still did not understand
my client is extjs 4
only understands json
so I can not send as Interface
if you can help with an example in direct mode?
Offline
Pages: 1