Print Preview 'Headers'

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Evan Camilleri

    Print Preview 'Headers'

    I have a datagrid with headers. I managed to 'freeze' the headers OK and
    then one can scroll to see contents.

    I would like to be able to print this list by re-prinitng the headers on
    each page.


    Evan Camilleri


  • Bruno Alexandre

    #2
    Re: Print Preview 'Headers'

    I'm not responding directly to your question because I always do it in a
    diferent maner and in ASP 3.0...

    I just print the Headers and then again everytime I want like

    i = 0
    do while not rs.eof
    i = i + 1
    if i = 10 then ' 10 is the number of rows that I print in the page
    printheader()
    i = 0
    end if
    printRow()

    rs.movenext()
    loop

    and in the header I use a CSS in Header tag
    style='page-break-after:always;'


    but here is a link to something usefull:
    Say no to “printer-friendly” versions and yes to printer-specific style sheets. CSS expert Eric Meyer shows how to conceive and design print style sheets that automatically format web c…


    Evan Camilleri wrote:[color=blue]
    > I have a datagrid with headers. I managed to 'freeze' the headers OK and
    > then one can scroll to see contents.
    >
    > I would like to be able to print this list by re-prinitng the headers on
    > each page.
    >
    >
    > Evan Camilleri
    >
    >[/color]

    Comment

    • Evan Camilleri

      #3
      Re: Print Preview 'Headers'

      hmmm.. quite a 'dirty' but 'efficient' work around.
      The quest is now to find a way to 'insert' a header every now and then in
      the datagrid!

      Thanks.


      "Bruno Alexandre" <bruno.pub@filt rarte.com> wrote in message
      news:evxAmh0TGH A.2656@TK2MSFTN GP10.phx.gbl...[color=blue]
      > I'm not responding directly to your question because I always do it in a
      > diferent maner and in ASP 3.0...
      >
      > I just print the Headers and then again everytime I want like
      >
      > i = 0
      > do while not rs.eof
      > i = i + 1
      > if i = 10 then ' 10 is the number of rows that I print in the page
      > printheader()
      > i = 0
      > end if
      > printRow()
      >
      > rs.movenext()
      > loop
      >
      > and in the header I use a CSS in Header tag
      > style='page-break-after:always;'
      >
      >
      > but here is a link to something usefull:
      > http://www.alistapart.com/articles/goingtoprint/
      >
      > Evan Camilleri wrote:[color=green]
      >> I have a datagrid with headers. I managed to 'freeze' the headers OK and
      >> then one can scroll to see contents.
      >>
      >> I would like to be able to print this list by re-prinitng the headers on
      >> each page.
      >>
      >>
      >> Evan Camilleri[/color][/color]


      Comment

      • Evan Camilleri

        #4
        Re: Print Preview 'Headers'

        This looks interesting:




        "Evan Camilleri" <e70mt@yahoo.co .uk.nospam> wrote in message
        news:esDVmY0TGH A.1688@TK2MSFTN GP11.phx.gbl...[color=blue]
        >I have a datagrid with headers. I managed to 'freeze' the headers OK and
        >then one can scroll to see contents.
        >
        > I would like to be able to print this list by re-prinitng the headers on
        > each page.
        >
        >
        > Evan Camilleri
        >[/color]


        Comment

        • Evan Camilleri

          #5
          Re: Print Preview 'Headers'

          :( nope! it is not ASP.NET but windows.


          Comment

          • Bruno Alexandre

            #6
            Re: Print Preview 'Headers'

            use Repeter (data read) instead datagrid :)

            Evan Camilleri wrote:[color=blue]
            > hmmm.. quite a 'dirty' but 'efficient' work around.
            > The quest is now to find a way to 'insert' a header every now and then in
            > the datagrid!
            >
            > Thanks.
            >
            >
            > "Bruno Alexandre" <bruno.pub@filt rarte.com> wrote in message
            > news:evxAmh0TGH A.2656@TK2MSFTN GP10.phx.gbl...[color=green]
            >> I'm not responding directly to your question because I always do it in a
            >> diferent maner and in ASP 3.0...
            >>
            >> I just print the Headers and then again everytime I want like
            >>
            >> i = 0
            >> do while not rs.eof
            >> i = i + 1
            >> if i = 10 then ' 10 is the number of rows that I print in the page
            >> printheader()
            >> i = 0
            >> end if
            >> printRow()
            >>
            >> rs.movenext()
            >> loop
            >>
            >> and in the header I use a CSS in Header tag
            >> style='page-break-after:always;'
            >>
            >>
            >> but here is a link to something usefull:
            >> http://www.alistapart.com/articles/goingtoprint/
            >>
            >> Evan Camilleri wrote:[color=darkred]
            >>> I have a datagrid with headers. I managed to 'freeze' the headers OK and
            >>> then one can scroll to see contents.
            >>>
            >>> I would like to be able to print this list by re-prinitng the headers on
            >>> each page.
            >>>
            >>>
            >>> Evan Camilleri[/color][/color]
            >
            >[/color]

            Comment

            • Evan Camilleri

              #7
              Re: Print Preview 'Headers' Oleeeeeeee..... ......

              i had my program ready!

              in any case..........i managed to make it with datagrid! something like:

              dgHeaderCell is a global variable of type DataGridItem

              If e.Item.ItemType = ListItemType.Fo oter Then
              dgHeaderCell = e.Item
              End If

              If e.Item.ItemType = ListItemType.Fo oter Then
              Dim dgItem As DataGridItem
              Dim dgCell As TableCell
              Dim iHeaderCtr As Integer = (m_RowsPerPage) + 1
              Do While iHeaderCtr < dg.Items.Count
              dgItem = New DataGridItem(iH eaderCtr, iHeaderCtr,
              ListItemType.He ader)
              dgItem.Attribut es.Add("style", "page-break-before:always")
              For Each dgHeaderCell As TableCell In m_dgiHeader.Cel ls
              dgCell = New TableCell
              dgItem.Cells.Ad d(dgCell)
              dgCell.Text = dgHeaderCell.Te xt
              dgCell.Visible = dgHeaderCell.Vi sible
              dg.Controls(0). Controls.AddAt( iHeaderCtr, dgItem)
              Next
              iHeaderCtr = iHeaderCtr + m_RowsPerPage + 1
              Loop
              End If


              So i am happy for the weekend!!!!!


              Evan


              "Bruno Alexandre" <bruno.pub@filt rarte.com> wrote in message
              news:eGMQQt1TGH A.5264@TK2MSFTN GP10.phx.gbl...[color=blue]
              > use Repeter (data read) instead datagrid :)
              >
              > Evan Camilleri wrote:[color=green]
              >> hmmm.. quite a 'dirty' but 'efficient' work around.
              >> The quest is now to find a way to 'insert' a header every now and then in
              >> the datagrid!
              >>
              >> Thanks.
              >>
              >>
              >> "Bruno Alexandre" <bruno.pub@filt rarte.com> wrote in message
              >> news:evxAmh0TGH A.2656@TK2MSFTN GP10.phx.gbl...[color=darkred]
              >>> I'm not responding directly to your question because I always do it in a
              >>> diferent maner and in ASP 3.0...
              >>>
              >>> I just print the Headers and then again everytime I want like
              >>>
              >>> i = 0
              >>> do while not rs.eof
              >>> i = i + 1
              >>> if i = 10 then ' 10 is the number of rows that I print in the page
              >>> printheader()
              >>> i = 0
              >>> end if
              >>> printRow()
              >>>
              >>> rs.movenext()
              >>> loop
              >>>
              >>> and in the header I use a CSS in Header tag
              >>> style='page-break-after:always;'
              >>>
              >>>
              >>> but here is a link to something usefull:
              >>> http://www.alistapart.com/articles/goingtoprint/
              >>>
              >>> Evan Camilleri wrote:
              >>>> I have a datagrid with headers. I managed to 'freeze' the headers OK
              >>>> and then one can scroll to see contents.
              >>>>
              >>>> I would like to be able to print this list by re-prinitng the headers
              >>>> on each page.
              >>>>
              >>>>
              >>>> Evan Camilleri[/color]
              >>[/color][/color]

              Comment

              • Evan Camilleri

                #8
                Read This: Print Preview 'Headers' Oleeeeeeee..... ......

                updating just a small mistake i did in previous post........

                m_dgiHeader is a global variable of type DataGridItem

                If e.Item.ItemType = ListItemType.Fo oter Then
                m_dgiHeader = e.Item
                End If

                If e.Item.ItemType = ListItemType.Fo oter Then
                Dim dgItem As DataGridItem
                Dim dgCell As TableCell
                Dim iHeaderCtr As Integer = (m_RowsPerPage) + 1
                Do While iHeaderCtr < dg.Items.Count
                dgItem = New DataGridItem(iH eaderCtr, iHeaderCtr, ListItemType.He ader)
                dgItem.Attribut es.Add("style", "page-break-before:always")
                For Each dgHeaderCell As TableCell In m_dgiHeader.Cel ls
                dgCell = New TableCell
                dgItem.Cells.Ad d(dgCell)
                dgCell.Text = dgHeaderCell.Te xt
                dgCell.Visible = dgHeaderCell.Vi sible
                dg.Controls(0). Controls.AddAt( iHeaderCtr, dgItem)
                Next
                iHeaderCtr = iHeaderCtr + m_RowsPerPage + 1
                Loop
                End If



                Comment

                Working...