+ Reply to Thread
Results 1 to 7 of 7

Thread: print option

  1. #1
    Barn Loyal todd2006 is an unknown quantity at this point todd2006's Avatar
    Join Date
    Mar 2008
    Posts
    889
    Rep Power
    4

    print option

    Hi,

    I have a drop down right now a user selects a name and hits submit and it opens up a excel file


    I have to make a change so that a user can select multiple names from the drop down and when he hits submit button it opens up a excel file for all the names that were selected and prints out the excel files for all the names.

    I am just not getting the printing side of the excel file can someone tell me how i can make it happen.

    todd

  2. #2
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    As far as I know, you can't use ASP to make an Excel document print. You can only use ASP to add a header which will generate the Excel document.

    As for selecting multiple users, do the following in your HTML:

    Code:
    <select multiple="multiple">
    <option value="1">Option 1</option>
    <option value="2">Option 2</option>
    <option value="3">Option 3</option>
    <option value="4">Option 4</option>
    </select>
    
    This will store a comma delimited string in the post value. Create an array from this using the Split() function and then iterate through this array to generate your documents.
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  3. #3
    Drunk Barn Owl dr_rock will become famous soon enough dr_rock's Avatar
    Join Date
    Jun 2008
    Location
    Melbourne, Australia
    Posts
    180
    Rep Power
    4

    I would create a simple CSV file using FSO dependent on the options selected, then redirect the page to that file you just created, this will prompt the user to dl/open the file, at this poing the user simply presses CTRL+P to bring up the print options.


  4. #4
    Barn Loyal todd2006 is an unknown quantity at this point todd2006's Avatar
    Join Date
    Mar 2008
    Posts
    889
    Rep Power
    4

    Hi,

    I have not tried it as my on vacation currently but i thought of this idea and u guys might tell me if it will work or not

    when i hit submit button it opens up a excel file in the excel file i will have the body tag can i have a function called onload so when the page is loading the function is called which has window.print()

    will this work

    todd

  5. #5
    Barn Frequenter BLaaaaaaaaaarche will become famous soon enough BLaaaaaaaaaarche will become famous soon enough BLaaaaaaaaaarche's Avatar
    Join Date
    Mar 2008
    Posts
    188
    Rep Power
    5

    I don't see why not as long as you are controlling with JS.
    "You'll never be as perfect as BLaaaaaaaaarche."

  6. #6
    Barn Loyal todd2006 is an unknown quantity at this point todd2006's Avatar
    Join Date
    Mar 2008
    Posts
    889
    Rep Power
    4

    ok guys i am back to work

    i had the code window.print which i fire in onload event

    when the page is loaded it shows me the print option dialog box is there a way i can automatically print it instead of the user clicking on "OK" button in the dialog box

    todd

  7. #7
    Barn Enthusiast guddu is on a distinguished road guddu's Avatar
    Join Date
    Jul 2008
    Location
    Oxford UK
    Posts
    471
    Rep Power
    4

    as per my knowledge u can not do like this when u use window.print

    for details pls see this link
    Print Directly to Printer
    Love is physical attraction and mental destruction

+ Reply to Thread

Similar Threads

  1. Previous n Next option for threads!
    By micky in forum Community Support, Suggestions & Feedback
    Replies: 5
    Last Post: April 16th, 2009, 02:44 PM
  2. print problem
    By todd2006 in forum JavaScript Programming
    Replies: 5
    Last Post: June 25th, 2008, 02:36 PM
  3. Text or List option plus
    By Rebelle in forum JavaScript Programming
    Replies: 8
    Last Post: June 17th, 2008, 01:27 PM
  4. Print out data on a letterhead format
    By Shem in forum .NET Development
    Replies: 3
    Last Post: May 22nd, 2008, 10:15 AM

Bookmarks

Posting Permissions

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

SEO by vBSEO