BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Newbie question about architecture

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker
View previous topic :: View next topic  
Author Message
PRA
Guest





PostPosted: Mon Sep 22, 2003 12:53 pm    Post subject: Newbie question about architecture Reply with quote



Hi all,

I would like to write a report server based on the isapi-webroker system.
I have made some tests with 1 report (report builder) and it works fine.
I placed the report component, the DB connexion and the queries on the
webmodule and I sent a stream (PDF application) back to the client.
OK, fine, but ...
If I want to use more than 1 report and many queries in this application, it
becomes rapidly something unreadable, with all these components on the
webmodule.
So I tried to use another webmodule where I could place the new report and
queries : forbidden, only 1 webmodule per application.
I tried to use a datamodule : same problem, since a webmodule is a
datamodule if I understand well.
So I tried to use forms, but I got AV when using them.

The question is : where can I place the different reports and queries
components ?
The idea is that the different actions switch to the asked reports.

Thanks in advance,

Patrice.



Back to top
DaveH
Guest





PostPosted: Mon Sep 22, 2003 7:58 pm    Post subject: Re: Newbie question about architecture Reply with quote



Place them in Units and pass the db components as parameters. Pass the
reportbuilder component as well or initiate a new one local to the
procedure.

Example:

Unit OtherReports;
....
procedure MondayReport(Query : TQuery) : string;
var
ReportBuilder : TReportBuilder;
begin
Query.Sql.Add('select * from Monday');
Query.Open;
ReportBuilder := TReportBuilder.Create(nil);
try
ReportBuilder.Run ???
Result := ReportBuilder.Report.AsPDF; ???
finally
ReportBuilder.Free;
end;
end;

You get the idea...
DaveH

"PRA" <patrice.raucq (AT) f1p2m3s4 (DOT) ac.be> wrote

Quote:
Hi all,

I would like to write a report server based on the isapi-webroker system.
I have made some tests with 1 report (report builder) and it works fine.
I placed the report component, the DB connexion and the queries on the
webmodule and I sent a stream (PDF application) back to the client.
OK, fine, but ...
If I want to use more than 1 report and many queries in this application,
it
becomes rapidly something unreadable, with all these components on the
webmodule.
So I tried to use another webmodule where I could place the new report and
queries : forbidden, only 1 webmodule per application.
I tried to use a datamodule : same problem, since a webmodule is a
datamodule if I understand well.
So I tried to use forms, but I got AV when using them.

The question is : where can I place the different reports and queries
components ?
The idea is that the different actions switch to the asked reports.

Thanks in advance,

Patrice.





Back to top
PRA
Guest





PostPosted: Sat Sep 27, 2003 7:15 pm    Post subject: Re: Newbie question about architecture Reply with quote



Hi Dave,

(sorry for the delay : I reinstalled my machine + the NG was down)

Thank you for the answer.
But the reports need to be placed at design time on a form (Form,
Datamodule, WebModule).
The properties and events you manage in your report are common Delphi
things.
I mean that when you place a component on the report, you see it in the
Object Inspector.
So, creating the report like you suggest, is not useful.
It was the way I tried when I placed the reports on Forms, but I get AV when
I create these forms at runtime.
Could you explain me why you can't use forms in a webbroker application ?

Thanks in advance,

Patrice.

"DaveH" <daveh (AT) sympatico (DOT) com> a écrit dans le message de news:
[email]1064260688.321179 (AT) news (DOT) drenet.dnd.ca[/email]...
Quote:
Place them in Units and pass the db components as parameters. Pass the
reportbuilder component as well or initiate a new one local to the
procedure.

Example:

Unit OtherReports;
...
procedure MondayReport(Query : TQuery) : string;
var
ReportBuilder : TReportBuilder;
begin
Query.Sql.Add('select * from Monday');
Query.Open;
ReportBuilder := TReportBuilder.Create(nil);
try
ReportBuilder.Run ???
Result := ReportBuilder.Report.AsPDF; ???
finally
ReportBuilder.Free;
end;
end;

You get the idea...
DaveH

"PRA" <patrice.raucq (AT) f1p2m3s4 (DOT) ac.be> wrote in message
news:3f6ef0ce (AT) newsgroups (DOT) borland.com...
Hi all,

I would like to write a report server based on the isapi-webroker
system.
I have made some tests with 1 report (report builder) and it works fine.
I placed the report component, the DB connexion and the queries on the
webmodule and I sent a stream (PDF application) back to the client.
OK, fine, but ...
If I want to use more than 1 report and many queries in this
application,
it
becomes rapidly something unreadable, with all these components on the
webmodule.
So I tried to use another webmodule where I could place the new report
and
queries : forbidden, only 1 webmodule per application.
I tried to use a datamodule : same problem, since a webmodule is a
datamodule if I understand well.
So I tried to use forms, but I got AV when using them.

The question is : where can I place the different reports and queries
components ?
The idea is that the different actions switch to the asked reports.

Thanks in advance,

Patrice.







Back to top
Dave Hackett
Guest





PostPosted: Sun Sep 28, 2003 10:05 pm    Post subject: Re: Newbie question about architecture Reply with quote

Because forms are "visible" components and ISAPI modules don't get display
device contexts when they execute because they are run from a service (IIS).

I thought RB had a way to save the report template to a file (it's been a
long time since I looked at ReportBuilder) similar to the way Crystal
Reports works. So in your code, you simply load the file and call something
like "Run" to produce the report.

This is the way you need to do it in the ISAPI world. Consider another
reporting package if RB doesn't work this way.

DaveH


"PRA" <Patrice.Raucq@n0sp@m.fpms.ac.be> wrote

Quote:
Hi Dave,

(sorry for the delay : I reinstalled my machine + the NG was down)

Thank you for the answer.
But the reports need to be placed at design time on a form (Form,
Datamodule, WebModule).
The properties and events you manage in your report are common Delphi
things.
I mean that when you place a component on the report, you see it in the
Object Inspector.
So, creating the report like you suggest, is not useful.
It was the way I tried when I placed the reports on Forms, but I get AV
when
I create these forms at runtime.
Could you explain me why you can't use forms in a webbroker application ?

Thanks in advance,

Patrice.

"DaveH" <daveh (AT) sympatico (DOT) com> a écrit dans le message de news:
[email]1064260688.321179 (AT) news (DOT) drenet.dnd.ca[/email]...
Place them in Units and pass the db components as parameters. Pass the
reportbuilder component as well or initiate a new one local to the
procedure.

Example:

Unit OtherReports;
...
procedure MondayReport(Query : TQuery) : string;
var
ReportBuilder : TReportBuilder;
begin
Query.Sql.Add('select * from Monday');
Query.Open;
ReportBuilder := TReportBuilder.Create(nil);
try
ReportBuilder.Run ???
Result := ReportBuilder.Report.AsPDF; ???
finally
ReportBuilder.Free;
end;
end;

You get the idea...
DaveH

"PRA" <patrice.raucq (AT) f1p2m3s4 (DOT) ac.be> wrote in message
news:3f6ef0ce (AT) newsgroups (DOT) borland.com...
Hi all,

I would like to write a report server based on the isapi-webroker
system.
I have made some tests with 1 report (report builder) and it works
fine.
I placed the report component, the DB connexion and the queries on the
webmodule and I sent a stream (PDF application) back to the client.
OK, fine, but ...
If I want to use more than 1 report and many queries in this
application,
it
becomes rapidly something unreadable, with all these components on the
webmodule.
So I tried to use another webmodule where I could place the new report
and
queries : forbidden, only 1 webmodule per application.
I tried to use a datamodule : same problem, since a webmodule is a
datamodule if I understand well.
So I tried to use forms, but I got AV when using them.

The question is : where can I place the different reports and queries
components ?
The idea is that the different actions switch to the asked reports.

Thanks in advance,

Patrice.









Back to top
PRA
Guest





PostPosted: Mon Sep 29, 2003 7:33 am    Post subject: Re: Newbie question about architecture Reply with quote

Dave,

You are right, RB can store its data in files or DB.
But I was searching an easy way to design my different reports, with all in
the application, since it is the only purpose of it.
Furthermore, I can imagine that Forms are not compatible with ISAPI, but I
only need the forms as containers at design time because at runtime I
generate a stream that I send back to the client.
My ISAPI app has not graphic interface.

Well, thanks a lot, and if you have any idea, I will be happy to test it.

Patrice.


"Dave Hackett" <dave.hackett (AT) ns (DOT) sympatico.com> a écrit dans le message de
news: [email]3f775b2f (AT) newsgroups (DOT) borland.com[/email]...
Quote:
Because forms are "visible" components and ISAPI modules don't get display
device contexts when they execute because they are run from a service
(IIS).

I thought RB had a way to save the report template to a file (it's been a
long time since I looked at ReportBuilder) similar to the way Crystal
Reports works. So in your code, you simply load the file and call
something
like "Run" to produce the report.

This is the way you need to do it in the ISAPI world. Consider another
reporting package if RB doesn't work this way.

DaveH


"PRA" <Patrice.Raucq@n0sp@m.fpms.ac.be> wrote in message
news:3f75e18b (AT) newsgroups (DOT) borland.com...
Hi Dave,

(sorry for the delay : I reinstalled my machine + the NG was down)

Thank you for the answer.
But the reports need to be placed at design time on a form (Form,
Datamodule, WebModule).
The properties and events you manage in your report are common Delphi
things.
I mean that when you place a component on the report, you see it in the
Object Inspector.
So, creating the report like you suggest, is not useful.
It was the way I tried when I placed the reports on Forms, but I get AV
when
I create these forms at runtime.
Could you explain me why you can't use forms in a webbroker application
?

Thanks in advance,

Patrice.

"DaveH" <daveh (AT) sympatico (DOT) com> a écrit dans le message de news:
[email]1064260688.321179 (AT) news (DOT) drenet.dnd.ca[/email]...
Place them in Units and pass the db components as parameters. Pass
the
reportbuilder component as well or initiate a new one local to the
procedure.

Example:

Unit OtherReports;
...
procedure MondayReport(Query : TQuery) : string;
var
ReportBuilder : TReportBuilder;
begin
Query.Sql.Add('select * from Monday');
Query.Open;
ReportBuilder := TReportBuilder.Create(nil);
try
ReportBuilder.Run ???
Result := ReportBuilder.Report.AsPDF; ???
finally
ReportBuilder.Free;
end;
end;

You get the idea...
DaveH

"PRA" <patrice.raucq (AT) f1p2m3s4 (DOT) ac.be> wrote in message
news:3f6ef0ce (AT) newsgroups (DOT) borland.com...
Hi all,

I would like to write a report server based on the isapi-webroker
system.
I have made some tests with 1 report (report builder) and it works
fine.
I placed the report component, the DB connexion and the queries on
the
webmodule and I sent a stream (PDF application) back to the client.
OK, fine, but ...
If I want to use more than 1 report and many queries in this
application,
it
becomes rapidly something unreadable, with all these components on
the
webmodule.
So I tried to use another webmodule where I could place the new
report
and
queries : forbidden, only 1 webmodule per application.
I tried to use a datamodule : same problem, since a webmodule is a
datamodule if I understand well.
So I tried to use forms, but I got AV when using them.

The question is : where can I place the different reports and
queries
components ?
The idea is that the different actions switch to the asked reports.

Thanks in advance,

Patrice.











Back to top
Shiv Kumar
Guest





PostPosted: Mon Sep 29, 2003 1:42 pm    Post subject: Re: Newbie question about architecture Reply with quote

I don't see the start of this thread so I'm not sure what the questions
really are :)

To design an RB report, you don't need a form. You can drop the RB component
on a Web/Data module and take it from there. I use RB along with pragnaan's
PDF export device all the time for my application reports.

Each of my reports is generally in a separate Data Module. The WebModule,
creates and instance of this datamodule, calls it's method (GetReport that
generally expects some parameters and returns a TStream) and then frees the
instance.

--
Shiv R. Kumar
The Delphi Apostle
http://www.matlus.com


Back to top
PRA
Guest





PostPosted: Mon Sep 29, 2003 2:37 pm    Post subject: Re: Newbie question about architecture Reply with quote

Hi Shiv,

It is exactly what I'm trying to do.
But I got AV's when creating/freing the datamodules.
Could you post here a code snippet ?

Thanks in advance,

Patrice.

"Shiv Kumar" <shivk (AT) erols (DOT) com> a écrit dans le message de news:
[email]3f7838a5 (AT) newsgroups (DOT) borland.com[/email]...
Quote:
I don't see the start of this thread so I'm not sure what the questions
really are :)

To design an RB report, you don't need a form. You can drop the RB
component
on a Web/Data module and take it from there. I use RB along with
pragnaan's
PDF export device all the time for my application reports.

Each of my reports is generally in a separate Data Module. The WebModule,
creates and instance of this datamodule, calls it's method (GetReport that
generally expects some parameters and returns a TStream) and then frees
the
instance.

--
Shiv R. Kumar
The Delphi Apostle
http://www.matlus.com





Back to top
Shiv Kumar
Guest





PostPosted: Wed Oct 01, 2003 3:01 pm    Post subject: Re: Newbie question about architecture Reply with quote

In your Web Module, you need to create an instance of your Data Module.
That's all there is to it. What are you doing?

--
Shiv R. Kumar
The Delphi Apostle
http://www.matlus.com


Back to top
PRA
Guest





PostPosted: Wed Oct 01, 2003 6:40 pm    Post subject: Re: Newbie question about architecture Reply with quote

Hi Shiv,

Like said in my mail , I tried this when I saw that I could not use my RB
components:
In the default action:

DM1 := TDataModule1.Create(self);
DM1.sValue := 'This text comes from DataModule1';
response.Content := DataModule1.sValue;
DM1.Free;

I removed the creation of the DM in the DPR because the app crashed
immediately.

Patrice.

"Shiv Kumar" <shivk (AT) erols (DOT) com> a écrit dans le message de news:
[email]3f7aed2a (AT) newsgroups (DOT) borland.com[/email]...
Quote:
In your Web Module, you need to create an instance of your Data Module.
That's all there is to it. What are you doing?

--
Shiv R. Kumar
The Delphi Apostle
http://www.matlus.com





Back to top
PRA
Guest





PostPosted: Wed Oct 01, 2003 7:29 pm    Post subject: It works ! Reply with quote

Thanks a lot Shiv and Dave, it works now !
I forgot to remove the creation of my 2nd Datamodule in the dpr.
I did it for DM1, but not for DM2 ...

Bye,

Patrice.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.