Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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,

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •