Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-17-2012, 07:49 AM   PM User | #1
m2h9111
New to the CF scene

 
Join Date: Jan 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
m2h9111 is an unknown quantity at this point
Help on Converting ASP Page to Word Document

Greetings Everyone,

I am using classic ASP language and I would like to convert the page into Word Document.

I used the below line:
Response.ContentType = "application/ms-word"

It works fine with me except that the background images at the chart are not showing into the Word Document after conversion.

Below is the code for the chart that is not showing:


StyleSheet Code:
ul.xAxis{margin:0 0 0 27px;padding:0;float:left;clear:left;display:inlin e;width:454px;}
ul.yAxis{margin:27px 0 0 0;padding:0;display:inline;float:left;}
ul.xAxis li{float:left; list-style:none;width:66px;text-align:center;}
ul.yAxis li{
list-style:none;
height:33px;
text-align:right;
float:left;
clear:left; }
dl#csschart, dl#csschart dt, dl#csschart dd{
margin:0;
padding:0; }
dl#csschart{
background:url(../images/ESR-Graph.gif) no-repeat 0 0;
width:265px;
height:150px;
padding-left:11px;
float:left; }
dl#csschart dt{
display:none; }
dl#csschart dd{
position:relative;
float:left;
display:inline;
width:66px;
height:330px;
margin-top:22px;
margin:-195px 0px 11px 0px }
dl#csschart span{
position:absolute;
display:block;
width:66px;
bottom:0;
left:0;
z-index:1;
color:#555;
text-decoration:none; }
dl#csschart span b{
display:block;
font-weight:bold;
font-style:normal;
float:left;
line-height:200%;
color:#fff;
position:absolute;
top:5px;
left:3px;
text-align:center;
width:60px; }
/* default column styling */
dl#csschart span{
height:50%;
background:url(../images/bar.png); }

dl#csschart .sub{
margin-left:-33px;

}
dl#csschart .sub span{
background:url(../images/subBar.png) repeat-y;
}
/* // column types */
/* percentages */
dl#csschart .p0 span{height:0%}
dl#csschart .p15 span{height:10%;}
dl#csschart .p20 span{height:14%}




HTML Code:
<table border="1" cellpadding="0" cellspacing="0" width="75%" align="center">
<tr>
<td align="center">

<ul class="yAxis">
<li>45</li>
<li>30</li>
<li>15</li>
</ul>

<dl id="csschart">

<dt></dt>
<dd class="p0"><span><b></b></span></dd>

<dt>Week</dt>
<dd class="p20"><span style="background-image:url(images/bar2.png)"><b>20</b></span></dd>

<dt>YTD</dt>
<dd class="p15"><span><b>15</b></span></dd>
</dl>

<ul class="xAxis">
<li></li>
<li>Week</li>
<li>YTD</li>
</ul>
</td></tr></table>


I need your help to resolve this issue.
Thanks,
m2h9111 is offline   Reply With Quote
Old 02-02-2012, 10:40 PM   PM User | #2
miranda
Senior Coder

 
Join Date: Dec 2002
Location: Arlington, Texas USA
Posts: 1,062
Thanks: 4
Thanked 8 Times in 8 Posts
miranda is an unknown quantity at this point
This is because the Word document is running on YOUR computer and the asp page is running on the webserver. Even if you run this page locally on your computer you do not have the entire path to the images spelled out in the style sheet so they could never be found.
miranda is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 01:01 AM.


Advertisement
Log in to turn off these ads.