473,654 Members | 2,968 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1965
"TomT" <to**@adslweb.c o.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.c o.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("W ord.Application ")
app.Application .Visible = True
app.Documents.A dd()

then paste your data in...

app.Selection.T ypeText("yourte xt")

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.c o.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="VBScr ipt">

sub doword()
set app = createobject("W ord.Application ")
app.Application .Visible = True
app.Documents.A dd()
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.c o.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********@mus oswire.co.uk> wrote in message
news:Oe******** ******@TK2MSFTN GP11.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="VBScr ipt">

sub doword()
set app = createobject("W ord.Application ")
app.Application .Visible = True
app.Documents.A dd()
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********@mus oswire.co.uk> wrote in message
news:Oe******** ******@TK2MSFTN GP11.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="VBScr ipt">
>
> sub doword()
> set app = createobject("W ord.Application ")
> app.Application .Visible = True
> app.Documents.A dd()
> 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
8335
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 with the correct position, but it's size is identical to the size of the "ungrown" text box on the report. I need to create the text box in Word the same size as the grown text box on the report. So, in Design view the report has a text box...
3
6396
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 from the report into memory using the DoCmd.RunCommand command. (Access 2000) Thank you
8
3508
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 the moment the printed output is usually going to Word. It's turning into an unholy mess, because I'm having to prepare umpteen different Word templates, and the queries that drive them, depending on what events a course has.
3
3914
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 preventing the option to save changes from being displayed (the answer is always no) The "DoCmd.Close acReport, me.Name, acSaveNo" on the close event does not work TIA
2
9341
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 = <<Query_Name>> Once I create the report, I m trying to create labels to display the Report title in the Report Header section.
5
2591
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 as the name of the child, their address, etc. At this time staff will look into the database for that info and enter it into the form. Management wants to automate this a bit so each of these templates is a report. That leads to my question. ...
11
1963
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 originally a Word Document, I also have this form as a PDF. Appearance and quality is critical for this form.. so what I thought I'd do is convert the form to a bitmap, use a picture object on my VB form and overlay textbox (no border) controls on top...
2
2185
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 quote. A while back users obviously wanted to be able to edit/e-mail the quote (these ancient Cyrstal 5.0 reports don't allow PDF creation) so I modified the old VB4.0 code to allow users to save the Crystal Report as Word document which they can...
5
3730
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 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 quote. A while back users obviously wanted to be able to edit/e-mail ...
2
4177
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 only problem is when I insert the Word doc, the sizing is different. (i.e. the word document's width is 7.5", but when I insert it into the Access report - it's about 5")
0
8285
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8706
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8591
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7304
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1592
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.