Executing a asp.net page repeatedly????New page???

Discussion in 'ASP .Net' started by Dan, Dec 29, 2005.

  1. Dan

    Dan Guest

    Hi,

    I have an asp.net page i have made that creates an invoice based on the
    invoice id given.

    It works fine but the problem i have is i now want to loop through my
    database and grab all the invoice numbers.

    As it grabs each invoice number i want to pass it into my asp.net page,
    execute it and display it so that each invoice falls on its own page leaving
    me with an end result of pages of invoices all after one another so i just
    click print.

    The problem is as i have absolutely positioned everything with the
    gridlayout so it doesn't move any of my items along so they all go on top of
    each other in a mess.

    SO ideally i want to execute the asp.net page for an invoice number, pass
    the result not to the screen to be displayed but directly to the printer,
    then move to the next invoice number and repeat.

    Can anyone tell me how i can do this? Also it is important to mention i work
    remotely from my server, so i am guessing any printing being fired off on
    the server will attempt to print from my servers printer and not mine.

    If that is the case i do have an internet printer so i would still be
    interested in those answers however the option of getting the invoices to be
    displayed neatly within my browser one after the other would suffice.

    Options i have thought of is to put it all in a panel that is exactly one
    page in size and then loop making new panels with the contents inside,
    however if i had any invoices over a page long they would get truncated i
    imagine?

    I have also thought of making the first invoice then the second one to
    always be x many pixels below it relative to the first etc, again very messy
    way of doing it.

    Surely there is a simple 'new page' ability?


    Thank you in advance
     
    Dan, Dec 29, 2005
    #1
    1. Advertising

  2. Dan

    Mr Newbie Guest

    Im not 100% sure what you are trying to do but it sounds like you are trying
    to build one huge page composed of loads of invoice pages. If this is
    correct, you are not really going about this in the best way I would think.

    On your page, have a btnRetreive which populates the fields for the number
    supplied, for each subsequent request like btnRetreieveNext_Click

    Create an SQL statement which gets the next number and populate again.

    --
    Best Regards

    The Inimitable Mr Newbie º¿º
    "Dan" <> wrote in message
    news:...
    > Hi,
    >
    > I have an asp.net page i have made that creates an invoice based on the
    > invoice id given.
    >
    > It works fine but the problem i have is i now want to loop through my
    > database and grab all the invoice numbers.
    >
    > As it grabs each invoice number i want to pass it into my asp.net page,
    > execute it and display it so that each invoice falls on its own page
    > leaving me with an end result of pages of invoices all after one another
    > so i just click print.
    >
    > The problem is as i have absolutely positioned everything with the
    > gridlayout so it doesn't move any of my items along so they all go on top
    > of each other in a mess.
    >
    > SO ideally i want to execute the asp.net page for an invoice number, pass
    > the result not to the screen to be displayed but directly to the printer,
    > then move to the next invoice number and repeat.
    >
    > Can anyone tell me how i can do this? Also it is important to mention i
    > work remotely from my server, so i am guessing any printing being fired
    > off on the server will attempt to print from my servers printer and not
    > mine.
    >
    > If that is the case i do have an internet printer so i would still be
    > interested in those answers however the option of getting the invoices to
    > be displayed neatly within my browser one after the other would suffice.
    >
    > Options i have thought of is to put it all in a panel that is exactly one
    > page in size and then loop making new panels with the contents inside,
    > however if i had any invoices over a page long they would get truncated i
    > imagine?
    >
    > I have also thought of making the first invoice then the second one to
    > always be x many pixels below it relative to the first etc, again very
    > messy way of doing it.
    >
    > Surely there is a simple 'new page' ability?
    >
    >
    > Thank you in advance
    >
     
    Mr Newbie, Dec 29, 2005
    #2
    1. Advertising

  3. Dan

    Marina Guest

    First off, if it is the absolute positioning causing the problem, then the
    obvious solution is to get rid of it, and redo your page with relative
    positioning. Absolute positioning should almost never be used, in my
    opinion.

    Secondly, you should build a datalist or a repeater, with the right template
    for displaying one invoice. Then just bind the list of invoices to the
    datalist/repeater, and it will all look correct right away. The only part I
    am not sure about is if you can force page breaks so that you print them all
    on a separate page.

    "Dan" <> wrote in message
    news:...
    > Hi,
    >
    > I have an asp.net page i have made that creates an invoice based on the
    > invoice id given.
    >
    > It works fine but the problem i have is i now want to loop through my
    > database and grab all the invoice numbers.
    >
    > As it grabs each invoice number i want to pass it into my asp.net page,
    > execute it and display it so that each invoice falls on its own page
    > leaving me with an end result of pages of invoices all after one another
    > so i just click print.
    >
    > The problem is as i have absolutely positioned everything with the
    > gridlayout so it doesn't move any of my items along so they all go on top
    > of each other in a mess.
    >
    > SO ideally i want to execute the asp.net page for an invoice number, pass
    > the result not to the screen to be displayed but directly to the printer,
    > then move to the next invoice number and repeat.
    >
    > Can anyone tell me how i can do this? Also it is important to mention i
    > work remotely from my server, so i am guessing any printing being fired
    > off on the server will attempt to print from my servers printer and not
    > mine.
    >
    > If that is the case i do have an internet printer so i would still be
    > interested in those answers however the option of getting the invoices to
    > be displayed neatly within my browser one after the other would suffice.
    >
    > Options i have thought of is to put it all in a panel that is exactly one
    > page in size and then loop making new panels with the contents inside,
    > however if i had any invoices over a page long they would get truncated i
    > imagine?
    >
    > I have also thought of making the first invoice then the second one to
    > always be x many pixels below it relative to the first etc, again very
    > messy way of doing it.
    >
    > Surely there is a simple 'new page' ability?
    >
    >
    > Thank you in advance
    >
     
    Marina, Dec 29, 2005
    #3
  4. Dan

    Daniel Guest

    Thanks for the comments so far.

    Mr newbie - i had thought of the same method the problem is that when i have
    20-30 invoices to print a day and going up all the time it gets very tedious
    to do them one by one even with a click next and print method. Which is why
    i want them all available to be printed straight off with one print.

    Marina - not sure why you hate absolute positioning so much, each to their
    own i guess. I find it much easier to position items exactly where i want
    them that way, maybe it was the way i was doing it before.
    I did consider the datarepeater route but I am quite the amateur with it so
    i am not sure if you can help but i will explain why.

    First of all is it not possible to use a data repeater with absolutely
    positioned elements?
    Secondly my invoice is laid out with an image of the company logo in the top
    left, a logo and delivery address to the right of this that, when printed,
    lines up perfectly with the paper we use so that part is peeled off and
    stuck on a parcel, then under this a list of the items for the invoice but
    laid out to look more pretty than just a grid but this is built in a table.

    Can a layout like that be done using repeater?

    Thanks in advance


    "Marina" <> wrote in message
    news:...
    > First off, if it is the absolute positioning causing the problem, then the
    > obvious solution is to get rid of it, and redo your page with relative
    > positioning. Absolute positioning should almost never be used, in my
    > opinion.
    >
    > Secondly, you should build a datalist or a repeater, with the right
    > template for displaying one invoice. Then just bind the list of invoices
    > to the datalist/repeater, and it will all look correct right away. The
    > only part I am not sure about is if you can force page breaks so that you
    > print them all on a separate page.
    >
    > "Dan" <> wrote in message
    > news:...
    >> Hi,
    >>
    >> I have an asp.net page i have made that creates an invoice based on the
    >> invoice id given.
    >>
    >> It works fine but the problem i have is i now want to loop through my
    >> database and grab all the invoice numbers.
    >>
    >> As it grabs each invoice number i want to pass it into my asp.net page,
    >> execute it and display it so that each invoice falls on its own page
    >> leaving me with an end result of pages of invoices all after one another
    >> so i just click print.
    >>
    >> The problem is as i have absolutely positioned everything with the
    >> gridlayout so it doesn't move any of my items along so they all go on top
    >> of each other in a mess.
    >>
    >> SO ideally i want to execute the asp.net page for an invoice number, pass
    >> the result not to the screen to be displayed but directly to the printer,
    >> then move to the next invoice number and repeat.
    >>
    >> Can anyone tell me how i can do this? Also it is important to mention i
    >> work remotely from my server, so i am guessing any printing being fired
    >> off on the server will attempt to print from my servers printer and not
    >> mine.
    >>
    >> If that is the case i do have an internet printer so i would still be
    >> interested in those answers however the option of getting the invoices to
    >> be displayed neatly within my browser one after the other would suffice.
    >>
    >> Options i have thought of is to put it all in a panel that is exactly one
    >> page in size and then loop making new panels with the contents inside,
    >> however if i had any invoices over a page long they would get truncated i
    >> imagine?
    >>
    >> I have also thought of making the first invoice then the second one to
    >> always be x many pixels below it relative to the first etc, again very
    >> messy way of doing it.
    >>
    >> Surely there is a simple 'new page' ability?
    >>
    >>
    >> Thank you in advance
    >>

    >
    >
     
    Daniel, Dec 30, 2005
    #4
  5. Dan

    Mr Newbie Guest

    There is no 'Easy' answer to your question, its just really about choosing a
    method which will work. To break down the problem into smaller steps if I am
    correct ?

    1.) Choose a range of invoices and then hit the print button right ?
    2.) Watch them reel off the printer and have them peeled of and stuck on the
    box ?

    Why not skip the web forms entirely and use something like crystal reports
    you can orgainise it so the reports go directly to the printer without
    having to have each invoice form brought up.





    --
    Best Regards

    The Inimitable Mr Newbie º¿º
    "Daniel" <> wrote in message
    news:...
    > Thanks for the comments so far.
    >
    > Mr newbie - i had thought of the same method the problem is that when i
    > have 20-30 invoices to print a day and going up all the time it gets very
    > tedious to do them one by one even with a click next and print method.
    > Which is why i want them all available to be printed straight off with one
    > print.
    >
    > Marina - not sure why you hate absolute positioning so much, each to their
    > own i guess. I find it much easier to position items exactly where i want
    > them that way, maybe it was the way i was doing it before.
    > I did consider the datarepeater route but I am quite the amateur with it
    > so i am not sure if you can help but i will explain why.
    >
    > First of all is it not possible to use a data repeater with absolutely
    > positioned elements?
    > Secondly my invoice is laid out with an image of the company logo in the
    > top left, a logo and delivery address to the right of this that, when
    > printed, lines up perfectly with the paper we use so that part is peeled
    > off and stuck on a parcel, then under this a list of the items for the
    > invoice but laid out to look more pretty than just a grid but this is
    > built in a table.
    >
    > Can a layout like that be done using repeater?
    >
    > Thanks in advance
    >
    >
    > "Marina" <> wrote in message
    > news:...
    >> First off, if it is the absolute positioning causing the problem, then
    >> the obvious solution is to get rid of it, and redo your page with
    >> relative positioning. Absolute positioning should almost never be used,
    >> in my opinion.
    >>
    >> Secondly, you should build a datalist or a repeater, with the right
    >> template for displaying one invoice. Then just bind the list of invoices
    >> to the datalist/repeater, and it will all look correct right away. The
    >> only part I am not sure about is if you can force page breaks so that you
    >> print them all on a separate page.
    >>
    >> "Dan" <> wrote in message
    >> news:...
    >>> Hi,
    >>>
    >>> I have an asp.net page i have made that creates an invoice based on the
    >>> invoice id given.
    >>>
    >>> It works fine but the problem i have is i now want to loop through my
    >>> database and grab all the invoice numbers.
    >>>
    >>> As it grabs each invoice number i want to pass it into my asp.net page,
    >>> execute it and display it so that each invoice falls on its own page
    >>> leaving me with an end result of pages of invoices all after one another
    >>> so i just click print.
    >>>
    >>> The problem is as i have absolutely positioned everything with the
    >>> gridlayout so it doesn't move any of my items along so they all go on
    >>> top of each other in a mess.
    >>>
    >>> SO ideally i want to execute the asp.net page for an invoice number,
    >>> pass the result not to the screen to be displayed but directly to the
    >>> printer, then move to the next invoice number and repeat.
    >>>
    >>> Can anyone tell me how i can do this? Also it is important to mention i
    >>> work remotely from my server, so i am guessing any printing being fired
    >>> off on the server will attempt to print from my servers printer and not
    >>> mine.
    >>>
    >>> If that is the case i do have an internet printer so i would still be
    >>> interested in those answers however the option of getting the invoices
    >>> to be displayed neatly within my browser one after the other would
    >>> suffice.
    >>>
    >>> Options i have thought of is to put it all in a panel that is exactly
    >>> one page in size and then loop making new panels with the contents
    >>> inside, however if i had any invoices over a page long they would get
    >>> truncated i imagine?
    >>>
    >>> I have also thought of making the first invoice then the second one to
    >>> always be x many pixels below it relative to the first etc, again very
    >>> messy way of doing it.
    >>>
    >>> Surely there is a simple 'new page' ability?
    >>>
    >>>
    >>> Thank you in advance
    >>>

    >>
    >>

    >
    >
     
    Mr Newbie, Dec 30, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SteveLB
    Replies:
    0
    Views:
    327
    SteveLB
    Aug 8, 2003
  2. Jarrod Hermer
    Replies:
    2
    Views:
    2,204
    kahlawat
    Jul 13, 2007
  3. =?Utf-8?B?TWljaGFlbCBFLiBPLiBCb3JjaGVydA==?=

    Integrated Security Problem? - User must log in repeatedly

    =?Utf-8?B?TWljaGFlbCBFLiBPLiBCb3JjaGVydA==?=, Jan 18, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    348
    Mark Milley
    Jan 19, 2006
  4. Replies:
    24
    Views:
    1,694
    alchemist
    Aug 4, 2005
  5. Replies:
    1
    Views:
    496
Loading...

Share This Page