|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Executing a asp.net page repeatedly????New page???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 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. -- Show quoteBest Regards The Inimitable Mr Newbie º¿º "Dan" <dvazan***@aol.com> wrote in message news:eXqoMSKDGHA.208@TK2MSFTNGP10.phx.gbl... > 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 > 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. Show quote "Dan" <dvazan***@aol.com> wrote in message news:eXqoMSKDGHA.208@TK2MSFTNGP10.phx.gbl... > 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 > 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 Show quote "Marina" <someone@nospam.com> wrote in message news:uK6kLuKDGHA.3984@TK2MSFTNGP14.phx.gbl... > 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" <dvazan***@aol.com> wrote in message > news:eXqoMSKDGHA.208@TK2MSFTNGP10.phx.gbl... >> 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 >> > > 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. -- Show quoteBest Regards The Inimitable Mr Newbie º¿º "Daniel" <Dani***@vestryonline.com> wrote in message news:OV3m3dWDGHA.2436@TK2MSFTNGP15.phx.gbl... > 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" <someone@nospam.com> wrote in message > news:uK6kLuKDGHA.3984@TK2MSFTNGP14.phx.gbl... >> 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" <dvazan***@aol.com> wrote in message >> news:eXqoMSKDGHA.208@TK2MSFTNGP10.phx.gbl... >>> 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 >>> >> >> > > |
|||||||||||||||||||||||