Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP Report to Word / PDF etc ??

Reply
Thread Tools

ASP Report to Word / PDF etc ??

 
 
TomT
Guest
Posts: n/a
 
      08-11-2004
I have created an ASP App that seems to be working well.

I can get the data out of the Access DB and displayed in screen fine.

But instead of sending it to the screen, is there any way I can create the
report and have it saved / outputted as a PDF or word Doc ?

Any links with examples ??

Thanks
 
Reply With Quote
 
 
 
 
Tom Kaminski [MVP]
Guest
Posts: n/a
 
      08-11-2004
"TomT" <(E-Mail Removed)> wrote in message
news:14aj9hthbmwf7$.1bwv63lo8njei$(E-Mail Removed). ..
> I have created an ASP App that seems to be working well.
>
> I can get the data out of the Access DB and displayed in screen fine.
>
> But instead of sending it to the screen, is there any way I can create the
> report and have it saved / outputted as a PDF or word Doc ?
>
> Any links with examples ??


http://support.microsoft.com/default...b;EN-US;270906

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com


 
Reply With Quote
 
 
 
 
Jeff Cochran
Guest
Posts: n/a
 
      08-11-2004
On Wed, 11 Aug 2004 17:37:48 +0100, TomT <(E-Mail Removed)> wrote:

>I have created an ASP App that seems to be working well.
>
>I can get the data out of the Access DB and displayed in screen fine.
>
>But instead of sending it to the screen, is there any way I can create the
>report and have it saved / outputted as a PDF or word Doc ?


Sure.

>Any links with examples ??


Simplest ASP method I've found is the ASPPDF Persits component:

http://www.asppdf.com/

Also see:

How To Use ASP to Generate a Rich Text Format (RTF) Document to Stream
to Microsoft Word:
http://support.microsoft.com/default...b;EN-US;270906

Jeff
 
Reply With Quote
 
Dan Nash
Guest
Posts: n/a
 
      08-11-2004
Tom,

Opening Word and pasting is quite easy, assuming your running on your local
server. Just use Create Object...

set app = createobject("Word.Application")
app.Application.Visible = True
app.Documents.Add()

then paste your data in...

app.Selection.TypeText("yourtext")

However, if (as is more likely) you want to open Word on the client from ASP
on the server, it's still possible.

Basically what you need to do is use some scripting (Javascript / VBScript).
Unfortunately I haven't got my code handy, but have a look in the help etc,
sure you'll find something. If you get really stuck, let me know and I'll
try find the stuff I did.

HTH


Dan


"TomT" <(E-Mail Removed)> wrote in message
news:14aj9hthbmwf7$.1bwv63lo8njei$(E-Mail Removed). ..
> I have created an ASP App that seems to be working well.
>
> I can get the data out of the Access DB and displayed in screen fine.
>
> But instead of sending it to the screen, is there any way I can create the
> report and have it saved / outputted as a PDF or word Doc ?
>
> Any links with examples ??
>
> Thanks



 
Reply With Quote
 
Dan Nash
Guest
Posts: n/a
 
      08-11-2004
Hi

Just noticed the others posts (switched to OE, its acting daft). Just
thought I'd post the code that I just tried for opening Word on the client
from server-side ASP...

<HTML>
<HEAD>
<SCRIPT language="VBScript">

sub doword()
set app = createobject("Word.Application")
app.Application.Visible = True
app.Documents.Add()
end sub

</SCRIPT>
</HEAD>

<BODY onload="doword()">
</BODY>
</HTML>

In order for this to work, your server needs to be in your "Trusted Sites"
list in IE. However, from here you can write code to make word automatically
print things and close, without the need to create a Word/RTF file first.

Cheers


Dan


"TomT" <(E-Mail Removed)> wrote in message
news:14aj9hthbmwf7$.1bwv63lo8njei$(E-Mail Removed). ..
> I have created an ASP App that seems to be working well.
>
> I can get the data out of the Access DB and displayed in screen fine.
>
> But instead of sending it to the screen, is there any way I can create the
> report and have it saved / outputted as a PDF or word Doc ?
>
> Any links with examples ??
>
> Thanks



 
Reply With Quote
 
Tom Kaminski [MVP]
Guest
Posts: n/a
 
      08-12-2004
"Dan Nash" <(E-Mail Removed)> wrote in message
news:OeIBUG$(E-Mail Removed)...
> Just noticed the others posts (switched to OE, its acting daft). Just
> thought I'd post the code that I just tried for opening Word on the client
> from server-side ASP...
>
> <HTML>
> <HEAD>
> <SCRIPT language="VBScript">
>
> sub doword()
> set app = createobject("Word.Application")
> app.Application.Visible = True
> app.Documents.Add()
> end sub
>
> </SCRIPT>
> </HEAD>
>
> <BODY onload="doword()">
> </BODY>
> </HTML>


For my own education, what server-side ASP code is in this sample?

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com


 
Reply With Quote
 
Michel Thiffault
Guest
Posts: n/a
 
      08-12-2004
http://www.activeup.com/products/components/activertf/


TomT wrote:
> I have created an ASP App that seems to be working well.
>
> I can get the data out of the Access DB and displayed in screen fine.
>
> But instead of sending it to the screen, is there any way I can
> create the report and have it saved / outputted as a PDF or word Doc ?
>
> Any links with examples ??
>
> Thanks



 
Reply With Quote
 
Jeff Cochran
Guest
Posts: n/a
 
      08-13-2004
On Thu, 12 Aug 2004 08:15:05 -0700, "Dan Nash" <(E-Mail Removed)>
wrote:

>None. THATs the code. If you mean whys that code of use in an ASP forum, I
>was just it might be useful for TomT.


Your statement was:

"Just thought I'd post the code that I just tried for opening Word on
the client from server-side ASP..."

And then you posted client side code, no ASP.

>However, I usually find it's pretty useless like that, unless you know what
>you want to put in word in the first place. Usually, I end up using ASP to
>write the VBS function (using Response.Write("<script language...") etc) to
>do what I want it to do (create/print a letter, etc).


That's using ASP to send a static page, which is kind of silly. You
make the server work to process something it never needed to touch,
since this is all on the client.

>At the mo I'm using it to create a mail merge based on information coming
>from Access. Seems to work fine.


Your sample has nothing to do with retrieving data and merging it on
the client. Which naturally relies on the client being configured
appropriately. In an intranet you may have that luxury, but what if
the poor user is trying to use a system that doesn't have Word? Such
as his cell phone?

Jeff



>"Tom Kaminski [MVP]" wrote:
>
>> "Dan Nash" <(E-Mail Removed)> wrote in message
>> news:OeIBUG$(E-Mail Removed)...
>> > Just noticed the others posts (switched to OE, its acting daft). Just
>> > thought I'd post the code that I just tried for opening Word on the client
>> > from server-side ASP...
>> >
>> > <HTML>
>> > <HEAD>
>> > <SCRIPT language="VBScript">
>> >
>> > sub doword()
>> > set app = createobject("Word.Application")
>> > app.Application.Visible = True
>> > app.Documents.Add()
>> > end sub
>> >
>> > </SCRIPT>
>> > </HEAD>
>> >
>> > <BODY onload="doword()">
>> > </BODY>
>> > </HTML>

>>
>> For my own education, what server-side ASP code is in this sample?
>>
>> --
>> Tom Kaminski IIS MVP
>> http://www.microsoft.com/windowsserv...y/centers/iis/
>> http://mvp.support.microsoft.com/
>> http://www.iisfaq.com/
>> http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
>> http://www.tryiis.com
>>
>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: PIL (etc etc etc) on OS X Kevin Walzer Python 4 08-13-2008 08:27 AM
PDF::Writer, create pdf and insert in other pdf file. Ricardo Pog Ruby 1 03-26-2008 08:24 PM
PDF Control for report formatting and displaying/downloading PDF to user? Jen ASP .Net Web Controls 0 08-15-2005 09:09 PM
XML from Word -- formerly Create pdf from existing Word doc (asp.net) Sharon ASP .Net 0 07-27-2005 02:07 AM
Setting a Range Parameter in a crystal report and streaming resulting report as a pdf James Wallace ASP .Net 0 10-17-2003 04:42 PM



Advertisments