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. The Lounge
  3. print

print

Scheduled Pinned Locked Moved The Lounge
questionhtmldatabasewpf
8 Posts 5 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.
  • C Offline
    C Offline
    cp andy
    wrote on last edited by
    #1

    Hello All, Not a programming question. But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button say 'print further information'? Or the best way is on click user goes to another page with all the information and then give him an option to print the page as usual using print styles? Can such generic questions be posted here? Else i will move it to Q/A section. Thanks in advance.

    P D B 3 Replies Last reply
    0
    • C cp andy

      Hello All, Not a programming question. But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button say 'print further information'? Or the best way is on click user goes to another page with all the information and then give him an option to print the page as usual using print styles? Can such generic questions be posted here? Else i will move it to Q/A section. Thanks in advance.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      cp-andy wrote:

      But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button

      Yes. It's not that difficult - providing you're using appropriate techniques (for example WebSockets). Such generic questions can be asked here. It's when you want to know how to do it that it's no longer appropriate for the lounge. Be aware though, with such a vague requirement, you will most likely get abuse if you post it in QA; not everyone is friendly in there.

      This space for rent

      C 1 Reply Last reply
      0
      • C cp andy

        Hello All, Not a programming question. But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button say 'print further information'? Or the best way is on click user goes to another page with all the information and then give him an option to print the page as usual using print styles? Can such generic questions be posted here? Else i will move it to Q/A section. Thanks in advance.

        D Offline
        D Offline
        Duncan Edwards Jones
        wrote on last edited by
        #3

        A pint would be nice, thank you (I'm assuming that was a typo? If not, look at CSS3 Media Queries[^] ?

        C 1 Reply Last reply
        0
        • C cp andy

          Hello All, Not a programming question. But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button say 'print further information'? Or the best way is on click user goes to another page with all the information and then give him an option to print the page as usual using print styles? Can such generic questions be posted here? Else i will move it to Q/A section. Thanks in advance.

          B Offline
          B Offline
          BillWoodruff
          wrote on last edited by
          #4

          imho questions like this are often answered on the QA forums, but I suggest you be as specific as possible; be sure and tag your question so it shows what stack you are using: ASP.NET, WinForms, WPF, etc.

          «Tell me and I forget. Teach me and I remember. Involve me and I learn.» Benjamin Franklin

          1 Reply Last reply
          0
          • D Duncan Edwards Jones

            A pint would be nice, thank you (I'm assuming that was a typo? If not, look at CSS3 Media Queries[^] ?

            C Offline
            C Offline
            cp andy
            wrote on last edited by
            #5

            Duncan Edwards Jones wrote:

            pint would be nice

            haha I wish.

            Duncan Edwards Jones wrote:

            If not, look at CSS3 Media Queries[^] ?

            D 1 Reply Last reply
            0
            • P Pete OHanlon

              cp-andy wrote:

              But just wondering, if we can retrieve fields from the database and generate html on the fly(including lot of div styling) on a click of a button

              Yes. It's not that difficult - providing you're using appropriate techniques (for example WebSockets). Such generic questions can be asked here. It's when you want to know how to do it that it's no longer appropriate for the lounge. Be aware though, with such a vague requirement, you will most likely get abuse if you post it in QA; not everyone is friendly in there.

              This space for rent

              C Offline
              C Offline
              cp andy
              wrote on last edited by
              #6

              Thanks Pete - I will take care in future. Here is the user journey to give you more details - 1. In page A, there is a list of articles that user can click on and view it. 2. Next to the list, there is a button that says 'print further information' 3. Once user clicks on that - behind the scene, we pull through all the relevant data from the DB and add it to the html template (on the fly)(with all the styling i.e. text in two column instead of one, header logo, footer, coloured divs etc) So my question is whether it is better/easy to create a page with html template and pulling relevant data seperately. And on button click we just redirect to that page and force print option so that print window appears? Or this all can be done behind the scene and on button click, user just gets an print window option straight away? I will see what WebSockets can offer on this matter. Thanks

              R 1 Reply Last reply
              0
              • C cp andy

                Thanks Pete - I will take care in future. Here is the user journey to give you more details - 1. In page A, there is a list of articles that user can click on and view it. 2. Next to the list, there is a button that says 'print further information' 3. Once user clicks on that - behind the scene, we pull through all the relevant data from the DB and add it to the html template (on the fly)(with all the styling i.e. text in two column instead of one, header logo, footer, coloured divs etc) So my question is whether it is better/easy to create a page with html template and pulling relevant data seperately. And on button click we just redirect to that page and force print option so that print window appears? Or this all can be done behind the scene and on button click, user just gets an print window option straight away? I will see what WebSockets can offer on this matter. Thanks

                R Offline
                R Offline
                raddevus
                wrote on last edited by
                #7

                No, no. Not websockets for this. You're definitely going to need RPC over the SFTP protocol to get this done. Absolutely read up on media queries over RPC via SFTP. That's what you need. Anything else, is just less. You could do this in one line of assembly if you leverage the media query libraries found on any of the Internet sockets. For sure. lda (2000:3) over the SFTP and next thing you know, it's printing away.

                1 Reply Last reply
                0
                • C cp andy

                  Duncan Edwards Jones wrote:

                  pint would be nice

                  haha I wish.

                  Duncan Edwards Jones wrote:

                  If not, look at CSS3 Media Queries[^] ?

                  D Offline
                  D Offline
                  Duncan Edwards Jones
                  wrote on last edited by
                  #8

                  To the best of my knowledge, you can't print HTML without viewing it first...this is a good thing for those of us old and grey enough to remember fax spam.

                  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