473,395 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Print MultiPage DB Report

GW
Trying to force a new page when required using e.HasMorePages = True but not
having much luck.

All prints OK except for trying to figure out how to do a page feed without
exiting the loop.

There is a lot of data gathering from DB in each loop so exiting the loop is
not an option.

All the examples for multipage printing I found so far are based on printing
simple text from a streamreader , or list box, etc.

LS_PAR7311 is to be called only once.

Tried placing the code for LS-PAR7311 inside the PrintPage but that didn't
do the trick either.

Any suggestions or a different approach would be appreciated.

(Posted this in drawing.ng but no solutions as of yet).

Thks in advance, GW
'//----------------------------------------------------------------\\

Private Sub oPrintDoc_PrintPage(ByVal sender As Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs)

Dim grfx As Graphics = e.Graphics
LS_PBH_7310(grfx, grp, ipMgns) '// Prints boxes, lines and static text
for each page

If mi_Pgn <= 1 Then

'// Sub with details to be printed (some 12 pages of code. Passed "e"
ByRef but appears to have no effect, probably because this is only called
once inside mi_Pgn <= 1)

LS_PAR7311(msSOurceFrm, msSQL, grfx, e)

End If

mi_Pgn += 1

End Sub '(oPrintDoc_PrintPage)

'\\--------------------------------------------//
'//----------------------------------------------------------------\\

Private Sub LS_PAR7311(....)
Do While Critera "A"

'/ Print Details for criteria "A"
Do While Ctriteria "B"

Do While Criteria "C"

'// gather details for "C"

End Do '("C")

'// Print Details for "C"

if iCnt = 5

iCnt = 0

e.HasMorePages = True '*** <== This is where I'm stuck, need to
do a page feed WITHOUT the loop. ***

'// Print another template with lines and static text thru
LS_PBH7310()

end if '(iCnt = 5)

End Do '("B")

'// Print Details for "B"

End Do '("C")

End Sub '(LS_PAR7311)

'\\--------------------------------------------//

Nov 20 '05 #1
1 1526
GW

"GW" <gw@nospam.look.ca> wrote in message
news:OI****************@TK2MSFTNGP12.phx.gbl...
Trying to force a new page when required using e.HasMorePages = True but not having much luck.

All prints OK except for trying to figure out how to do a page feed without exiting the loop.

There is a lot of data gathering from DB in each loop so exiting the loop is not an option.

All the examples for multipage printing I found so far are based on printing simple text from a streamreader , or list box, etc.

LS_PAR7311 is to be called only once.

Tried placing the code for LS-PAR7311 inside the PrintPage but that didn't
do the trick either.

Any suggestions or a different approach would be appreciated.

(Posted this in drawing.ng but no solutions as of yet).

Thks in advance, GW
'//----------------------------------------------------------------\\

Private Sub oPrintDoc_PrintPage(ByVal sender As Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles oPrintDoc.PrintPage

Dim grfx As Graphics = e.Graphics
LS_PBH_7310(grfx, grp, ipMgns) '// Prints boxes, lines and static text for each page

If mi_Pgn <= 1 Then

'// Sub with details to be printed (some 12 pages of code. Passed "e"
ByRef but appears to have no effect, probably because this is only called
once inside mi_Pgn <= 1)

LS_PAR7311(msSOurceFrm, msSQL, grfx, e)

End If

mi_Pgn += 1

End Sub '(oPrintDoc_PrintPage)

'\\--------------------------------------------//
'//----------------------------------------------------------------\\

Private Sub LS_PAR7311(....)
Do While Critera "A"

'/ Print Details for criteria "A"
Do While Ctriteria "B"

Do While Criteria "C"

'// gather details for "C"

End Do '("C")

'// Print Details for "C"

if iCnt = 5

iCnt = 0

e.HasMorePages = True '*** <== This is where I'm stuck, need to
do a page feed WITHOUT exiting the loop. ***

'// Print another template with lines and static text thru
LS_PBH7310()

end if '(iCnt = 5)

End Do '("B")

'// Print Details for "B"

End Do '("C")

End Sub '(LS_PAR7311)

'\\--------------------------------------------//

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: quantumcloud | last post by:
Hi, Can anyone show me an example of how to write a script in php to sho multipage navigation links like 1, 2, 3,...last. Script will retriev result from the database and display a report by...
1
by: news.microsoft.com | last post by:
Hello group, My goal is to attach an image over another image. Top image should be transparent so the back image is visible through the top one. Bellow is a test code in VB.NET. You need to...
1
by: szabelin | last post by:
Is it possible to dynamically add a PageView to MultiPage? TabStrip has items property, so Tab and TabSeparator can be added... how about adding PageView to MultiPage? If not possible please...
1
by: Dan | last post by:
IE WebControls Tab/MultiPage state problem I have a IE tab/multipage on a WebForm (aspx) like this: <code> <iewc:TabStrip id="tabs" runat="server" TargetID="MultiPage1"> <iewc:Tab...
2
by: Child | last post by:
I have a page which has a tabbstrip and a multipage. The tab strip works great, and navigates the multipage no problem. However, I have a situation where I would like to have a "hidden"...
1
by: Ather Ali Shaikh | last post by:
I have a toolkit which is doing the same. but I want to write my own code. That will receive a tiff image and convert it into multipage jpeg file. Regards Ather Ali Shaikh
0
by: John | last post by:
This is in reference to Internet Explorer WebControls that can be located at the following link: http://msdn.microsoft.com/library/default.asp?url=/workshop/webcontrols/overview/overview.asp ...
2
by: Rob | last post by:
I have a webform that uses the TabStrip and MultiPage webcontrols. I also have a Print button on the form to print all of the information of the webform (all tabs): <input type="button"...
1
by: Ira | last post by:
I was successful in creating the multipage Tif files in VB.net using the following the following code: Public Sub SaveSeveralOnePageFilesInADir(ByVal DrNm As String, ByVal resultFl As String)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.