By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,925 Members | 732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,925 IT Pros & Developers. It's quick & easy.

Is this possible? Session sharing etc.

P: n/a
HG
Hi gurus

Sorry the rather long post...

I am facing a real world problem here, and I dunno how to approach it.
Don't even know if this is the right group...but since my app is ASP.NET I
tried here first.

I have an ASP.NET WebApp running, database tier is SQL Server 2000 in a
intranet environment.
The front end is HTML (generated from ASP.NET pages). Nothing new here.

BUT:

I want to add letter writing and reporting facilities based on the data in
SQL Server.
The lette writing has to be done in Word and the reporting in Excel. So I
though of the following scenario:

- Have a template (.dot for Word), which is hosted on the Web Server. When
the user hits the link to the template my ASP.NET page will put some
parameters in the session, before it return the requested template as
content to the browser. In the document template a VBA OnLoad eventhandler
has been implemented. What it will do, comes later.
- When the template is received at the browser, it show a new document based
on this template AND the code in the VBA OnLoad eventhandler is executed.
- The VBA code, contacts a WebService hosted on the very same webserver that
the template was received from. The WebService fetches the parameters that
were placed on the session before returned the document template, and
executes a query against the database. The result of the quuery is returned
as XML to the client (ie. still the OnLoad eventhandler)
- The VBA code, parses the XML and performs inserts at the correct places in
the new document.
- Done.!

Serveral issue arise here:
1)
Does the template show up as a new document based on that template?
2)
Does security setttings allow the OnLoad eventhandler to be executed?
3)
Does WebService call share the same session as the browser? Is it possible
to get to the parameters that the ASP.NET page placed there?

These 3 issues a crucial for the above to work.

Are there any other way... What about the WebServices ToolKit for Office XP?

Anyone please

Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi HG:

#3 is an issue as the web service call from Office program will not
share a session with the browser. Any chance your requirements allow
you to prompt the user for a ticket number or login?

--
Scott
http://www.OdeToCode.com/

On Tue, 12 Oct 2004 12:02:05 +0200, "HG" <hg@nospam.websolver.dk>
wrote:
Hi gurus

Sorry the rather long post...

I am facing a real world problem here, and I dunno how to approach it.
Don't even know if this is the right group...but since my app is ASP.NET I
tried here first.

I have an ASP.NET WebApp running, database tier is SQL Server 2000 in a
intranet environment.
The front end is HTML (generated from ASP.NET pages). Nothing new here.

BUT:

I want to add letter writing and reporting facilities based on the data in
SQL Server.
The lette writing has to be done in Word and the reporting in Excel. So I
though of the following scenario:

- Have a template (.dot for Word), which is hosted on the Web Server. When
the user hits the link to the template my ASP.NET page will put some
parameters in the session, before it return the requested template as
content to the browser. In the document template a VBA OnLoad eventhandler
has been implemented. What it will do, comes later.
- When the template is received at the browser, it show a new document based
on this template AND the code in the VBA OnLoad eventhandler is executed.
- The VBA code, contacts a WebService hosted on the very same webserver that
the template was received from. The WebService fetches the parameters that
were placed on the session before returned the document template, and
executes a query against the database. The result of the quuery is returned
as XML to the client (ie. still the OnLoad eventhandler)
- The VBA code, parses the XML and performs inserts at the correct places in
the new document.
- Done.!

Serveral issue arise here:
1)
Does the template show up as a new document based on that template?
2)
Does security setttings allow the OnLoad eventhandler to be executed?
3)
Does WebService call share the same session as the browser? Is it possible
to get to the parameters that the ASP.NET page placed there?

These 3 issues a crucial for the above to work.

Are there any other way... What about the WebServices ToolKit for Office XP?

Anyone please


Nov 18 '05 #2

P: n/a
HG
Hi Scott

Thanx for answering so fast.

My worst fear just realized itself :-)

No, I was kinda suspecting that... I do not have any chance of promting for
a login as this must happen as seamlessly as possible.

BUT, that said:

I have checked out the new "developer friendly" toolkit of Office 2003,
which happens to be what I can expect to be on the client.
Intranet environment you know..... You can actually predict what is on the
client...GREAT compared to Internet solutions...

From Office 2003 (Maybe Office XP, too, couldn't find that), Word and Excel
supports saving in XML format, that is Word ML and Excel ML.
How about this scenario then.
1)
Construct the Word/Excel ML based on a template and fill in the data
serverside.

2)
Stream the result to the client (browser) with content type
"application/ms-word". Just as you could stream a "tab-delimited-file" to
the browser nowadays with content type "application/ms.excel".

3)
Browser fires up Word/Excel and it knows exactly how to deal with the
Word/Excel ML content...

4)
Done. You have a report/letter containing the data and layout you want.

Can anyone confirm this is the way to go....maybe there's a even better
way...

Thanx in advance

Regards

Henrik
"Scott Allen" <bitmask@[nospam].fred.net> skrev i en meddelelse
news:kl********************************@4ax.com...
Hi HG:

#3 is an issue as the web service call from Office program will not
share a session with the browser. Any chance your requirements allow
you to prompt the user for a ticket number or login?

--
Scott
http://www.OdeToCode.com/

On Tue, 12 Oct 2004 12:02:05 +0200, "HG" <hg@nospam.websolver.dk>
wrote:
Hi gurus

Sorry the rather long post...

I am facing a real world problem here, and I dunno how to approach it.
Don't even know if this is the right group...but since my app is ASP.NET Itried here first.

I have an ASP.NET WebApp running, database tier is SQL Server 2000 in a
intranet environment.
The front end is HTML (generated from ASP.NET pages). Nothing new here.

BUT:

I want to add letter writing and reporting facilities based on the data inSQL Server.
The lette writing has to be done in Word and the reporting in Excel. So I
though of the following scenario:

- Have a template (.dot for Word), which is hosted on the Web Server. Whenthe user hits the link to the template my ASP.NET page will put some
parameters in the session, before it return the requested template as
content to the browser. In the document template a VBA OnLoad eventhandlerhas been implemented. What it will do, comes later.
- When the template is received at the browser, it show a new document basedon this template AND the code in the VBA OnLoad eventhandler is executed.
- The VBA code, contacts a WebService hosted on the very same webserver thatthe template was received from. The WebService fetches the parameters thatwere placed on the session before returned the document template, and
executes a query against the database. The result of the quuery is returnedas XML to the client (ie. still the OnLoad eventhandler)
- The VBA code, parses the XML and performs inserts at the correct places inthe new document.
- Done.!

Serveral issue arise here:
1)
Does the template show up as a new document based on that template?
2)
Does security setttings allow the OnLoad eventhandler to be executed?
3)
Does WebService call share the same session as the browser? Is it possibleto get to the parameters that the ASP.NET page placed there?

These 3 issues a crucial for the above to work.

Are there any other way... What about the WebServices ToolKit for Office XP?
Anyone please

Nov 18 '05 #3

P: n/a
Hi Henrik:

I think this approach will be better. Creating the office xml markup
server side is a lightweight approach and much better than trying to
automate Word on the web server. Microsoft SQL Reporting Services can
use this approach and it works well (better than PDF rendering from a
performance standpoint).

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Tue, 12 Oct 2004 15:53:10 +0200, "HG" <hg@nospam.websolver.dk>
wrote:
Hi Scott

Thanx for answering so fast.

My worst fear just realized itself :-)

No, I was kinda suspecting that... I do not have any chance of promting for
a login as this must happen as seamlessly as possible.

BUT, that said:

I have checked out the new "developer friendly" toolkit of Office 2003,
which happens to be what I can expect to be on the client.
Intranet environment you know..... You can actually predict what is on the
client...GREAT compared to Internet solutions...

From Office 2003 (Maybe Office XP, too, couldn't find that), Word and Excel
supports saving in XML format, that is Word ML and Excel ML.
How about this scenario then.
1)
Construct the Word/Excel ML based on a template and fill in the data
serverside.

2)
Stream the result to the client (browser) with content type
"application/ms-word". Just as you could stream a "tab-delimited-file" to
the browser nowadays with content type "application/ms.excel".

3)
Browser fires up Word/Excel and it knows exactly how to deal with the
Word/Excel ML content...

4)
Done. You have a report/letter containing the data and layout you want.

Can anyone confirm this is the way to go....maybe there's a even better
way...

Thanx in advance

Regards

Henrik
"Scott Allen" <bitmask@[nospam].fred.net> skrev i en meddelelse
news:kl********************************@4ax.com.. .
Hi HG:

#3 is an issue as the web service call from Office program will not
share a session with the browser. Any chance your requirements allow
you to prompt the user for a ticket number or login?

--
Scott
http://www.OdeToCode.com/

On Tue, 12 Oct 2004 12:02:05 +0200, "HG" <hg@nospam.websolver.dk>
wrote:
>Hi gurus
>
>Sorry the rather long post...
>
>I am facing a real world problem here, and I dunno how to approach it.
>Don't even know if this is the right group...but since my app is ASP.NETI >tried here first.
>
>I have an ASP.NET WebApp running, database tier is SQL Server 2000 in a
>intranet environment.
>The front end is HTML (generated from ASP.NET pages). Nothing new here.
>
>BUT:
>
>I want to add letter writing and reporting facilities based on the datain >SQL Server.
>The lette writing has to be done in Word and the reporting in Excel. So I
>though of the following scenario:
>
>- Have a template (.dot for Word), which is hosted on the Web Server.When >the user hits the link to the template my ASP.NET page will put some
>parameters in the session, before it return the requested template as
>content to the browser. In the document template a VBA OnLoadeventhandler >has been implemented. What it will do, comes later.
>- When the template is received at the browser, it show a new documentbased >on this template AND the code in the VBA OnLoad eventhandler is executed.
>- The VBA code, contacts a WebService hosted on the very same webserverthat >the template was received from. The WebService fetches the parametersthat >were placed on the session before returned the document template, and
>executes a query against the database. The result of the quuery isreturned >as XML to the client (ie. still the OnLoad eventhandler)
>- The VBA code, parses the XML and performs inserts at the correct placesin >the new document.
>- Done.!
>
>Serveral issue arise here:
>1)
>Does the template show up as a new document based on that template?
>2)
>Does security setttings allow the OnLoad eventhandler to be executed?
>3)
>Does WebService call share the same session as the browser? Is itpossible >to get to the parameters that the ASP.NET page placed there?
>
>These 3 issues a crucial for the above to work.
>
>Are there any other way... What about the WebServices ToolKit for OfficeXP? >
>Anyone please
>
>


Nov 18 '05 #4

P: n/a
HG
Hi again Scott

Tremendous, thanx...and lightwight indeed.

I will check out reporting services

/Henrik

"Scott Allen" <bitmask@[nospam].fred.net> skrev i en meddelelse
news:fe********************************@4ax.com...
Hi Henrik:

I think this approach will be better. Creating the office xml markup
server side is a lightweight approach and much better than trying to
automate Word on the web server. Microsoft SQL Reporting Services can
use this approach and it works well (better than PDF rendering from a
performance standpoint).

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Tue, 12 Oct 2004 15:53:10 +0200, "HG" <hg@nospam.websolver.dk>
wrote:
Hi Scott

Thanx for answering so fast.

My worst fear just realized itself :-)

No, I was kinda suspecting that... I do not have any chance of promting fora login as this must happen as seamlessly as possible.

BUT, that said:

I have checked out the new "developer friendly" toolkit of Office 2003,
which happens to be what I can expect to be on the client.
Intranet environment you know..... You can actually predict what is on theclient...GREAT compared to Internet solutions...

From Office 2003 (Maybe Office XP, too, couldn't find that), Word and Excelsupports saving in XML format, that is Word ML and Excel ML.
How about this scenario then.
1)
Construct the Word/Excel ML based on a template and fill in the data
serverside.

2)
Stream the result to the client (browser) with content type
"application/ms-word". Just as you could stream a "tab-delimited-file" to
the browser nowadays with content type "application/ms.excel".

3)
Browser fires up Word/Excel and it knows exactly how to deal with the
Word/Excel ML content...

4)
Done. You have a report/letter containing the data and layout you want.

Can anyone confirm this is the way to go....maybe there's a even better
way...

Thanx in advance

Regards

Henrik
"Scott Allen" <bitmask@[nospam].fred.net> skrev i en meddelelse
news:kl********************************@4ax.com.. .
Hi HG:

#3 is an issue as the web service call from Office program will not
share a session with the browser. Any chance your requirements allow
you to prompt the user for a ticket number or login?

--
Scott
http://www.OdeToCode.com/

On Tue, 12 Oct 2004 12:02:05 +0200, "HG" <hg@nospam.websolver.dk>
wrote:

>Hi gurus
>
>Sorry the rather long post...
>
>I am facing a real world problem here, and I dunno how to approach it.
>Don't even know if this is the right group...but since my app is ASP.NET
I
>tried here first.
>
>I have an ASP.NET WebApp running, database tier is SQL Server 2000 in
a >intranet environment.
>The front end is HTML (generated from ASP.NET pages). Nothing new here. >
>BUT:
>
>I want to add letter writing and reporting facilities based on the datain
>SQL Server.
>The lette writing has to be done in Word and the reporting in Excel.
So I >though of the following scenario:
>
>- Have a template (.dot for Word), which is hosted on the Web Server.

When
>the user hits the link to the template my ASP.NET page will put some
>parameters in the session, before it return the requested template as
>content to the browser. In the document template a VBA OnLoad

eventhandler
>has been implemented. What it will do, comes later.
>- When the template is received at the browser, it show a new document

based
>on this template AND the code in the VBA OnLoad eventhandler is executed. >- The VBA code, contacts a WebService hosted on the very same

webserverthat
>the template was received from. The WebService fetches the parameters

that
>were placed on the session before returned the document template, and
>executes a query against the database. The result of the quuery is

returned
>as XML to the client (ie. still the OnLoad eventhandler)
>- The VBA code, parses the XML and performs inserts at the correct
placesin
>the new document.
>- Done.!
>
>Serveral issue arise here:
>1)
>Does the template show up as a new document based on that template?
>2)
>Does security setttings allow the OnLoad eventhandler to be executed?
>3)
>Does WebService call share the same session as the browser? Is it

possible
>to get to the parameters that the ASP.NET page placed there?
>
>These 3 issues a crucial for the above to work.
>
>Are there any other way... What about the WebServices ToolKit for
OfficeXP?
>
>Anyone please
>
>

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.