Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Printing

Printing

Scheduled Pinned Locked Moved ASP.NET
asp-nethelpcsharpcssdatabase
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 13575266
    wrote on last edited by
    #1

    Help. New to asp.net. I have a webpage with 2 gridview grids that are populated from database. Each grid represents 1 week of a 2 week pay period. The employees are selected from a listbox that is databound from my-aspnet-user database. I can manually select each employee and click on print button and all is good. Printout looks good. My issue is, is there a way to set it up that I can click print once and have all the separate pay info printed for each employee in the list.

    L D 2 Replies Last reply
    0
    • U User 13575266

      Help. New to asp.net. I have a webpage with 2 gridview grids that are populated from database. Each grid represents 1 week of a 2 week pay period. The employees are selected from a listbox that is databound from my-aspnet-user database. I can manually select each employee and click on print button and all is good. Printout looks good. My issue is, is there a way to set it up that I can click print once and have all the separate pay info printed for each employee in the list.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Just create a loop that iterates through each item in the listbox, and print the data for that employee.

      U 1 Reply Last reply
      0
      • L Lost User

        Just create a loop that iterates through each item in the listbox, and print the data for that employee.

        U Offline
        U Offline
        User 13575266
        wrote on last edited by
        #3

        Yeah but that is the problem. Using a loop to go thru employees, do I have to bring up a webpage for each one and then hit print 50 + times. Need a way to do it once. Example would be awesome as am fairly new to asp. Thank you in advance.

        L M 2 Replies Last reply
        0
        • U User 13575266

          Yeah but that is the problem. Using a loop to go thru employees, do I have to bring up a webpage for each one and then hit print 50 + times. Need a way to do it once. Example would be awesome as am fairly new to asp. Thank you in advance.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Sorry I cannot answer that as I have no idea how your code works. It should be possible to capture all the data from your server, and build the print document without going to the server more than once.

          1 Reply Last reply
          0
          • U User 13575266

            Help. New to asp.net. I have a webpage with 2 gridview grids that are populated from database. Each grid represents 1 week of a 2 week pay period. The employees are selected from a listbox that is databound from my-aspnet-user database. I can manually select each employee and click on print button and all is good. Printout looks good. My issue is, is there a way to set it up that I can click print once and have all the separate pay info printed for each employee in the list.

            D Offline
            D Offline
            David Mujica
            wrote on last edited by
            #5

            This sounds to me like you want to generate a report. You would use the values in the listbox and some date range to generate the report. Do you have Crystal Reports or something installed ? What version of Visual Studio are you using? Where are you storing your data? SQL server?

            U 1 Reply Last reply
            0
            • U User 13575266

              Yeah but that is the problem. Using a loop to go thru employees, do I have to bring up a webpage for each one and then hit print 50 + times. Need a way to do it once. Example would be awesome as am fairly new to asp. Thank you in advance.

              M Offline
              M Offline
              MadMyche
              wrote on last edited by
              #6

              Unfortunately I do not know a way to open 50 pages automatically and have them print automatically. The best you could do if it needs to be done on web pages is to use simple javascript command:

              window.onload = function() { window.print(); }


              Director of Transmogrification Services Shinobi of Query Language Master of Yoda Conditional

              1 Reply Last reply
              0
              • D David Mujica

                This sounds to me like you want to generate a report. You would use the values in the listbox and some date range to generate the report. Do you have Crystal Reports or something installed ? What version of Visual Studio are you using? Where are you storing your data? SQL server?

                U Offline
                U Offline
                User 13575266
                wrote on last edited by
                #7

                I'm using vs2013 ultimate. Don't have crystal reports though. Looking at reportviewer but can only figure out on how to do one payday report. Not sure if possible either way. Was thinking it would be nice if I could some how send all pages to pdf and then print it that way. I'm using Vb as code. And Mysql for database.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups