473,395 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ASP Report to Word / PDF etc ??

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
Jul 19 '05 #1
7 1945
"TomT" <to**@adslweb.co.uk> wrote in message
news:14*******************************@40tude.net. ..
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
Jul 19 '05 #2
On Wed, 11 Aug 2004 17:37:48 +0100, TomT <to**@adslweb.co.uk> 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
Jul 19 '05 #3
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" <to**@adslweb.co.uk> wrote in message
news:14*******************************@40tude.net. ..
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

Jul 19 '05 #4
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" <to**@adslweb.co.uk> wrote in message
news:14*******************************@40tude.net. ..
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

Jul 19 '05 #5
"Dan Nash" <da********@musoswire.co.uk> wrote in message
news:Oe**************@TK2MSFTNGP11.phx.gbl...
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
Jul 19 '05 #6
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

Jul 19 '05 #7
On Thu, 12 Aug 2004 08:15:05 -0700, "Dan Nash" <da*@musoswire.co.uk>
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" <da********@musoswire.co.uk> wrote in message
news:Oe**************@TK2MSFTNGP11.phx.gbl...
> 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


Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Phil Stanton | last post by:
I am trying to create a text box in Word the same height as one on a report and then fill it with text. I can "read" the position of the text box from the report OK and create a text box in Word...
3
by: Lore Leuneog | last post by:
Hello Which command do I've to use to set the focus on a control placed on a report in Design-View. Ctrl.SetFocus and Cmd.GoToControl don't work for a report. The aim is to copy the control...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
3
by: Phil Stanton | last post by:
In code I am opening a report in deign view, adding code to the report to output it to Word in an editable form. I then want t close the report but not save the changes. Is there any way or...
2
by: amith.srinivas | last post by:
Hi all, From a word macro in VBA, I am trying to create a report in access DB. The report is based on a query with a parameter. I am using Set rpt = Application.CreateReport rpt.RecordSource =...
5
by: rick m | last post by:
We have a fairly good sized Access database that contains some info on the children our agency sees. We also have 40+ templates that require some info from the database be inputted into them, such...
11
by: Ryan | last post by:
I am writing a VB (2005) program that will allow the user to fill out and print a form. The form input is stored in a database (SQL 2005) to be retrieved/viewed/printed later. The form is...
2
by: jmar | last post by:
I am updating a VB4.0 quote generation program to VB.net. The old program takes user inputs, performs calculations, saves the data to Access databases and uses Crystal Reports 5.0 to generate a...
5
by: jmar | last post by:
I posted a week ago and received one response. I'm looking for the opinion of several experienced .NET people before I proceed so I'm posting again. Sorry for the repost... I am updating a...
2
by: rmfoley | last post by:
All, I would like to create a professional looking cover sheet with information loaded from an MS Access Report. I created the cover sheet in MS Word that includes my company logo, etc. My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.