Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: FastReport (TFRXReport nonvisual component) on WebBroker Ap


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Jul 3, 2017 12:34 AM Last Post By: Bernt Wold
James Fielland

Posts: 32
Registered: 4/22/97
FastReport (TFRXReport nonvisual component) on WebBroker Ap  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 1, 2017 12:32 PM
Does anyone know if I can use non-visual components on a WebBroker module (ISAPI dll)?

A WebBroker project does not show FMX, nor probably VCL, components on Tools because, well, it is not a VCL nor FMX form project so that makes sense; however, I'd like my ISAPI dll to create a FastReport (probably report.pdf) and ship it back to the user.

Can I just put TFRXReport units in the uses clause & do it? VCL FastReports would be find too, but I don't own a copy of that & would have to buy it (for the extra features).

Perhaps it would be necessary to create a Visual Project & add a TWebBroker object to that & generate an ISAPI dll, but that doesn't seem quite right and I don't want any visual form on the Server.

Perhaps a WebBroker, ISAPI dll could call execute on a standard delphi.exe & have it create the FastReport, put it to file & tell me when it's done?

The easier the better.

Thanks,
--tex
James Fielland

Posts: 32
Registered: 4/22/97
Re: FastReport (TFRXReport nonvisual component) on WebBroker Ap  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 1, 2017 2:36 PM   in response to: James Fielland in response to: James Fielland
CORRECTION: The Tools for my WebBroker Ap DOES show FMX components. I will be trying to see if I can do what I want. If any know I'll have a problem, please advise as I'll be at this for quite some time before I know.

James Fielland wrote:
Does anyone know if I can use non-visual components on a WebBroker module (ISAPI dll)?

A WebBroker project does not show FMX, nor probably VCL, components on Tools because, well, it is not a VCL nor FMX form project so that makes sense; however, I'd like my ISAPI dll to create a FastReport (probably report.pdf) and ship it back to the user.

Can I just put TFRXReport units in the uses clause & do it? VCL FastReports would be find too, but I don't own a copy of that & would have to buy it (for the extra features).

Perhaps it would be necessary to create a Visual Project & add a TWebBroker object to that & generate an ISAPI dll, but that doesn't seem quite right and I don't want any visual form on the Server.

Perhaps a WebBroker, ISAPI dll could call execute on a standard delphi.exe & have it create the FastReport, put it to file & tell me when it's done?

The easier the better.

Thanks,
--tex
Bernt Wold

Posts: 10
Registered: 9/27/99
Re: FastReport (TFRXReport nonvisual component) on WebBroker Ap  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 3, 2017 12:34 AM   in response to: James Fielland in response to: James Fielland
Hi , I have done it with teechart as a visual component in a dll and produced a jpeg chart , maybe this information can put you in a direction for it.
I found this old forum link you can look at , how we did it.
https://forums.embarcadero.com/thread.jspa?threadID=107610

PDF

For PDF i dont use any component today but a webservice.
This is not what you are askining for but I give you an example anyway.

we use : http://pdfcrowd.com/

I have a function like this

htmlTekst is a html file I convert to pdf , so we create our doc using html and then convert by using this service.
StreamPdf is pdf file returned , can be send directly to client

function TWebModule1.createPDF_pdfCrowd(htmlTekst: string;StreamPdf : Tmemorystream; reportError:Boolean): Boolean;
var
 lparamPdf : Tstringlist;
 
begin
  
  result:=true;
  lparamPdf:= Tstringlist.Create;
  try
     // setting the param
      lparamPdf.Add('username='+'some username from pdfcrowd ');
      lparamPdf.Add('key='+'some api key from pdfcrowd');
      lparamPdf.Add('src='+htmlTekst);
      try
       IdHTTPpdfCrowd.Disconnect;
       IdHTTPpdfCrowd.Request.Clear;
       IdHTTPpdfCrowd.ProxyParams.Clear;
       IdHTTPpdfCrowd.Post('http://pdfcrowd.com/api/pdf/convert/html/',lparamPdf,StreamPdf);
       StreamPdf.Position:=0;
       IdHTTPpdfCrowd.Disconnect;
      except
        On E: Exception do
        begin
          result:=false;
          if reportError then lagCustomErrorRapport(E,'error generating pdf file');
          IdHTTPpdfCrowd.Disconnect;
        end;
      end;
  finally
   lparamPdf.Free;
  end;
end;


in webmodule is use this code to get the pdf

 pdfOK:= createPDF_pdfCrowd(response.Content,StreamPdf,false);

Maybe this can help you a little.

B


James Fielland wrote:
CORRECTION: The Tools for my WebBroker Ap DOES show FMX components. I will be trying to see if I can do what I want. If any know I'll have a problem, please advise as I'll be at this for quite some time before I know.

James Fielland wrote:
Does anyone know if I can use non-visual components on a WebBroker module (ISAPI dll)?

A WebBroker project does not show FMX, nor probably VCL, components on Tools because, well, it is not a VCL nor FMX form project so that makes sense; however, I'd like my ISAPI dll to create a FastReport (probably report.pdf) and ship it back to the user.

Can I just put TFRXReport units in the uses clause & do it? VCL FastReports would be find too, but I don't own a copy of that & would have to buy it (for the extra features).

Perhaps it would be necessary to create a Visual Project & add a TWebBroker object to that & generate an ISAPI dll, but that doesn't seem quite right and I don't want any visual form on the Server.

Perhaps a WebBroker, ISAPI dll could call execute on a standard delphi.exe & have it create the FastReport, put it to file & tell me when it's done?

The easier the better.

Thanks,
--tex
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02