Generating Report Builder report within a Web Application?
Hi:
I am having problem building a web application which will generate a report
in pdf format and return to the client. I put the TppReport and the
TDBPipeline on a WebModule. In the WebAction, I connect to the database,
open a query, and call TppReport.print method. I tried the ReportStream and
copy it to a string and assign the string to WebResponse.content. That took
forever to run. I then tried to save the report to a file and return a
simple HTML pages. I just want to see if the file is created. Again, it
took forever to run. Everything works just fine if I took out the call to
print the report.
What did I do wrong? Can I generate a report from a Web application?
TIA
Ping Kam
I am having problem building a web application which will generate a report
in pdf format and return to the client. I put the TppReport and the
TDBPipeline on a WebModule. In the WebAction, I connect to the database,
open a query, and call TppReport.print method. I tried the ReportStream and
copy it to a string and assign the string to WebResponse.content. That took
forever to run. I then tried to save the report to a file and return a
simple HTML pages. I just want to see if the file is created. Again, it
took forever to run. Everything works just fine if I took out the call to
print the report.
What did I do wrong? Can I generate a report from a Web application?
TIA
Ping Kam
This discussion has been closed.
Comments
copy and paste the rpt and the TextPipeline component from the TExtraDevices
demo program into my WebModule and relink the datafile. I preview it at
design time and everything looks fine.
Then all I do is call rpt.print and then return the date and time in a
simple html page. If I docuement out the call to print, it works and I see
the date and time of the system. If I include the call, Sambar report
process time out.
Here is all the code in my program:
procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
Rpt.DeviceType := 'Screen';
// Rpt.Print;
Response.Content := 'Test1' +
DateTimeToStr(Now) + '';
Handled := True;
end;
The only thing I didn't do is create the report with code at runtime but I
really doubt what different would this make. The code are still run from
TDataModule, the only difference will be the owner or parent. I am now also
seeking tech support from Digital Metaphors. If that does not work out, I
will try your suggestion to create the TppReport and the PipeLine at run
time and might need your help again then.
Thanks again for your help,
Ping Kam
see what comes up.
After running the Inetstp.exe, I got an entry in the Start|Programs call
Microsoft Peer Web Services (Common) but I don't see any IIS related entry
understand this group. I am not sure if I am installing the right server.
How do I know IIS is installed and running? All I can run is the Internet
Service Manager from the new installed group. What to do next?
Ping Kam
Finally, I got a simple CGI to return a report in pdf format and I can view
it in IE without generating an external file. Thanks for all your help.
There is still one glitch though. Sometimes, instead of the report, I will
get a page of text (look like the source), refresh does not fix it. I have
to switch to another web page or close the browser, get back again and then
my report will show up. Do you know what is causing that? How can I
prevent that from happening?
Thanks,
Ping Kam