Reporting Help Needed
Reporting Help Needed
Reporting Help Needed
Reporting Help Needed
Reporting Help Needed
Reporting Help Needed Reporting Help Needed Reporting Help Needed Reporting Help Needed Reporting Help Needed Reporting Help Needed Reporting Help Needed Reporting Help Needed
Reporting Help Needed Reporting Help Needed
Reporting Help Needed
Go Back  Xtreme Visual Basic Talk > > > Reporting Help Needed


Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2013, 11:47 AM
brown brown is offline
Freshman
 
Join Date: Jan 2013
Posts: 39
Default Reporting Help Needed


Hi there

So I have got a form that is linked to a database table which shows all the records in the table (Transactions Table)

This was made using the Visual basic datasource wizard then dragging the "Details" onto the form

I now want to print ALL the records, not just the one being shown. I used other pieces I had found and come up with the following code

I have made the areas I am having problems with BOLD

Essentially it says that TransactionsTable is not defined, which I know its not, as that line was from another piece of work but im not sure what Transactionstable is, as to what I should replace it with in my work.

Hope that makes sense?

In the current state (With that section and the if statements commented out) it runs, creates the print preview as it should, but just says "generating preview 1 of .. " and just rapidly increases until you click cancel

Once I click cancel and view the document created, its added all the records until it reaches the last one, then it just repeats that record until you click cancel. Any suggestions?


Code:
   Private Sub btnPrintTransactions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintTransactions.Click
        'Start printing process at first record
        PageNumber = 1
        'click the "FIRST RECORD" Button to recive the first record
        Button2.PerformClick()
        Dim TransactionDocument As Drawing.Printing.PrintDocument
        'Create the document and name it
        TransactionDocument = New Drawing.Printing.PrintDocument()
        TransactionDocument.DocumentName = "Transaction List"
        'Add code handler
        AddHandler TransactionDocument.PrintPage, AddressOf Me.PrintTransactionPage
        'Print document
        dlgPreview.Document = TransactionDocument
        dlgPreview.ShowDialog()
        'Dispose of document when done printing
        TransactionDocument.Dispose()

    End Sub
Code:
    Private Sub PrintTransactionPage(ByVal sender As Object, ByVal e As Drawing.Printing.PrintPageEventArgs)
        'here you decide what goes on each page and draw it there
        'print headings
        Dim MyFont As Drawing.Font = New Font("Lucida Sans", 14, FontStyle.Bold)
        e.Graphics.DrawString("Transactions - Page: " + Str(PageNumber), MyFont, Brushes.Black, e.MarginBounds.Left, e.MarginBounds.Top)
        MyFont = New Font("Lucida Sans", 12, FontStyle.Underline)
        Dim Y As Integer = CInt(e.MarginBounds.Top + 50)
        e.Graphics.DrawString("Room Number", MyFont, Brushes.Black, e.MarginBounds.Left, Y)
        e.Graphics.DrawString("Total Value", MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
        Y += CInt(2 * MyFont.GetHeight)
        MyFont = New Font("Lucida Sans", 12, FontStyle.Regular)
        Dim IEnd As Integer = Recordsperpage * PageNumber
        'If IEnd > TransactionsTable.Rows.Count Then
        'IEnd = TransactionsTable.Rows.Count        e.HasMorePages = False
        'Else        Dim I As Integer
        For I = 1 + Recordsperpage * (PageNumber - 1) To IEnd
            'programmatically move through all the records
            e.Graphics.DrawString(Mid(RoomNumberTextBox.Text, 1, 35), MyFont, Brushes.Black, e.MarginBounds.Left, Y)
            e.Graphics.DrawString(Mid(TotalValueTextBox.Text, 1, 20), MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
            btnNextTransaction.PerformClick()
            Y += CInt(MyFont.GetHeight)
        Next I
        PageNumber += 1
        e.HasMorePages = True
        'End if

    End Sub
Reply With Quote
  #2  
Old 02-12-2013, 02:51 AM
brown brown is offline
Freshman
 
Join Date: Jan 2013
Posts: 39
Default

I get the impression this is a really easy fix, im just not sure where to start
Reply With Quote
  #3  
Old 02-12-2013, 04:08 AM
DrPunk's Avatar
DrPunkReporting Help Needed DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

I'm not too sure what the issue here is.

TransactionsTable in that code looks like it is of Type DataTable.

If you wanted to print all the transactions in the transactions table then you'd have to Fill TransactionsTable with "SELECT * FROM transactions".

Code:
Dim cn as New OleDBConnection(needsValidConnectionStringHere)
Dim cmd as new OleDBCommand("SELECT * FROM transactions", cn)
Dim da as new OleDBDataAdapter(cmd)

Dim TransactionsTable as New DataTable

Try
   cn.Open

   da.Fill(TransactionsTable)
Catch ex as Exception
   Messagebox.Show(ex.message)
   ' If it errors then it probably shouldn't carry on (i.e. there'll be no transactions to write)
   Exit Sub
Finally
   ' Always good to close the connection in a Finally so it gets closed regardless
   ' of error happening or not
   cn.Close
End Try

' Now you can process the TransactionsTable
Does that help?
__________________
There are no computers in heaven!
Reply With Quote
  #4  
Old 02-12-2013, 04:52 AM
brown brown is offline
Freshman
 
Join Date: Jan 2013
Posts: 39
Default

so add that to the form load screen? or when print has clicked then it will load everything into the dataset and print all?
Reply With Quote
  #5  
Old 02-12-2013, 05:16 AM
DrPunk's Avatar
DrPunkReporting Help Needed DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

When print is clicked.

No point doing it at form load because between the form loading and print button clicked transactions might have been added to the table (especially if there were multiple clients).

It's generally best to get stuff when you need it, work with it, then dispose of it all.
__________________
There are no computers in heaven!
Reply With Quote
  #6  
Old 02-12-2013, 05:23 AM
brown brown is offline
Freshman
 
Join Date: Jan 2013
Posts: 39
Default

Ok so this is my code now

Code:
 Private Sub btnPrintTransactions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintTransactions.Click
        'Start printing process at first record
        PageNumber = 1
        'click the "FIRST RECORD" Button to recive the first record
        Button2.PerformClick()
        Dim TransactionDocument As Drawing.Printing.PrintDocument
        'Create the document and name it
        TransactionDocument = New Drawing.Printing.PrintDocument()
        TransactionDocument.DocumentName = "Transaction List"
        'Add code handler
        AddHandler TransactionDocument.PrintPage, AddressOf Me.PrintTransactionPage
        'Print document
        dlgPreview.Document = TransactionDocument
        dlgPreview.ShowDialog()
        'Dispose of document when done printing
        TransactionDocument.Dispose()

    End Sub
Code:
Private Sub PrintTransactionPage(ByVal sender As Object, ByVal e As Drawing.Printing.PrintPageEventArgs)
        Dim cn As New OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = E:\The Grand Booking\database.mdb")
        Dim cmd As New OleDbCommand("SELECT * FROM transactions", cn)
        Dim da As New OleDbDataAdapter(cmd)

        Dim TransactionsTable As New DataTable

        Try
            cn.Open()

            da.Fill(TransactionsTable)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
            ' If it errors then it probably shouldn't carry on (i.e. there'll be no transactions to write)
            Exit Sub
        Finally
            ' Always good to close the connection in a Finally so it gets closed regardless
            ' of error happening or not
            cn.Close()
        End Try

        ' Now you can process the TransactionsTable

        'here you decide what goes on each page and draw it there
        'print headings
        Dim MyFont As Drawing.Font = New Font("Lucida Sans", 14, FontStyle.Bold)
        e.Graphics.DrawString("Transactions - Page: " + Str(PageNumber), MyFont, Brushes.Black, e.MarginBounds.Left, e.MarginBounds.Top)
        MyFont = New Font("Lucida Sans", 12, FontStyle.Underline)
        Dim Y As Integer = CInt(e.MarginBounds.Top + 50)

        'print other fields
        e.Graphics.DrawString("Room Number", MyFont, Brushes.Black, e.MarginBounds.Left, Y)
        e.Graphics.DrawString("Total Value", MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
        Y += CInt(2 * MyFont.GetHeight)
        MyFont = New Font("Lucida Sans", 12, FontStyle.Regular)
        Dim IEnd As Integer = Recordsperpage * PageNumber
        If IEnd > TransactionsTable.Rows.Count Then
            IEnd = TransactionsTable.Rows.Count
            e.HasMorePages = False
            'Else
            Dim I As Integer
            For I = 1 + Recordsperpage * (PageNumber - 1) To IEnd
                'programmatically move through all the records
                e.Graphics.DrawString(Mid(RoomNumberTextBox.Text, 1, 35), MyFont, Brushes.Black, e.MarginBounds.Left, Y)
                e.Graphics.DrawString(Mid(TotalValueTextBox.Text, 1, 20), MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
                btnNextTransaction.PerformClick()
                Y += CInt(MyFont.GetHeight)
            Next I
            PageNumber += 1
            e.HasMorePages = True
        End If

    End Sub

End Class
GOOD NEWS: it stops repeating the last record now
BAD NEWS: there is only a few records at the moment, so fits on half a page, yet after its filled those in, it just puts blank records in by the looks of it as it still generates as many pages as it can before you hit cancel, they are just blank this time though?
Reply With Quote
  #7  
Old 02-12-2013, 05:46 AM
DrPunk's Avatar
DrPunkReporting Help Needed DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

Quote:
Originally Posted by brown View Post
BAD NEWS: there is only a few records at the moment, so fits on half a page, yet after its filled those in, it just puts blank records in by the looks of it as it still generates as many pages as it can before you hit cancel, they are just blank this time though?
First of all your question was to get the transactions into the table.

Now you want me to write your printing.

At some point you have to engage your own brain.

Code:
Dim IEnd As Integer = Recordsperpage * PageNumber
        If IEnd > TransactionsTable.Rows.Count Then
            IEnd = TransactionsTable.Rows.Count
            e.HasMorePages = False
            'Else
            Dim I As Integer
            For I = 1 + Recordsperpage * (PageNumber - 1) To IEnd
                'programmatically move through all the records
                e.Graphics.DrawString(Mid(RoomNumberTextBox.Text, 1, 35), MyFont, Brushes.Black, e.MarginBounds.Left, Y)
                e.Graphics.DrawString(Mid(TotalValueTextBox.Text, 1, 20), MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
                btnNextTransaction.PerformClick()
                Y += CInt(MyFont.GetHeight)
            Next I
            PageNumber += 1
            e.HasMorePages = True
        End If
The code in the quote above appears like it should be looped over instead of run just once as it appears to be in your code (as in when it gets to the end of the For I loop in that code it should go back to the IEnd calculation because pagenumber will have changed).

Your code never sets HasMorePages = False (it sets it to false but then gets set to true again and will never get set to False again).

You need to try and understand what it's trying to do better.
__________________
There are no computers in heaven!
Reply With Quote
  #8  
Old 02-12-2013, 06:03 AM
brown brown is offline
Freshman
 
Join Date: Jan 2013
Posts: 39
Default

sorry, just quite stressed because im not getting any help from my teacher

I noticed the else statement was commented out
Code:
 ' Else
            Dim I As Integer
            For I = 1 + Recordsperpage * (PageNumber - 1) To IEnd
                'programmatically move through all the records
                e.Graphics.DrawString(Mid(RoomNumberTextBox.Text, 1, 35), MyFont, Brushes.Black, e.MarginBounds.Left, Y)
                e.Graphics.DrawString(Mid(TotalValueTextBox.Text, 1, 20), MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
                btnNextTransaction.PerformClick()
                Y += CInt(MyFont.GetHeight)
            Next I
            PageNumber += 1
            e.HasMorePages = True
I un commented that and now it just prints the one page, but none of the records?
Reply With Quote
  #9  
Old 02-12-2013, 06:28 AM
DrPunk's Avatar
DrPunkReporting Help Needed DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

The code is obviously copy and pasted incorrectly.

It appears the the Sub in question (PrintTransactionPage) is intended to just print one page of transactions. I'd expect it to be passed PageNumber telling it what page it should be printing.

So outside of this Sub would be the calculating of how many pages there are to print, then looping over that calling PrintTransactionPage with the page to print, and it's this Sub that would finish the printing off.

Without that calling sub then this PrintTransactionPage cannot work. There is nothing incrementing PageNumber amongst other things.
__________________
There are no computers in heaven!
Reply With Quote
  #10  
Old 02-12-2013, 06:56 AM
brown brown is offline
Freshman
 
Join Date: Jan 2013
Posts: 39
Default

This has really confused me to be honest, im not sure i entierly understand what you are suggesting?

Im sorry for all the questions, i really am grateful for your help. im just not 100% understanding this stage, after this deadline is out of the way i will be spending a lot more time trying to understand the code to a higher level

Thanks
Luke
Reply With Quote
  #11  
Old 02-12-2013, 07:16 AM
DrPunk's Avatar
DrPunkReporting Help Needed DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

I'm suggesting there's a large amount of code missing.

Where is RowsPerPage calculated? Where is the incrementing of the PageNumber?

Not only that, I now notice that the DrawString doesn't even refer to the TransactionsTable where it should be getting the information from.

I feel that we are at a "I have copied and pasted a load of code, I have no idea what it does but it's not doing what I need it to do, please make it do what I need it to do" stage. That's not really a battle I want to take on.

I'd rather create a print from scratch than fight to fix that.
__________________
There are no computers in heaven!
Reply With Quote
  #12  
Old 02-12-2013, 07:21 AM
brown brown is offline
Freshman
 
Join Date: Jan 2013
Posts: 39
Default

I tried following a tutorial that my teacher gave me, and thats the code it told me to use?
Reply With Quote
  #13  
Old 02-12-2013, 07:28 AM
brown brown is offline
Freshman
 
Join Date: Jan 2013
Posts: 39
Default

Code:
2.	Add these two lines in the form level declarations to store page number information:

  Dim PageNumber As Integer
  Const TitlesPerPage As Integer = 45

 
3.	Put this code in the btnPrintTitles_Click event:
	
  Private Sub btnPrintTitles_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintTitles.Click
    'Start printing process at first record
    PageNumber = 1
    btnFirst.PerformClick()
    Dim TitlesDocument As Drawing.Printing.PrintDocument
    'Create the document and name it
    TitlesDocument = New Drawing.Printing.PrintDocument()
    TitlesDocument.DocumentName = "Titles Listing"
    'Add code handler
    AddHandler TitlesDocument.PrintPage, AddressOf Me.PrintTitlesPage
    'Print document
    dlgPreview.Document = TitlesDocument
    dlgPreview.ShowDialog()
    'Dispose of document when done printing
    TitlesDocument.Dispose()
  End Sub
	
	This code sets up the PrintDocument object (TitlesDocument) to print using the information in the PrintTitlesPage procedure.  The document object is opened with the print preview dialog control (dlgPreview).
	
 
5.	Add this code to the PrintTitlesPage event procedure:
	
  Private Sub PrintTitlesPage(ByVal sender As Object, ByVal e As Drawing.Printing.PrintPageEventArgs)
    'here you decide what goes on each page and draw it there
    'print headings
    Dim MyFont As Drawing.Font = New Font("Courier New", 14, FontStyle.Bold)
    e.Graphics.DrawString("Titles - Page" + Str(PageNumber), MyFont, Brushes.Black, e.MarginBounds.Left, e.MarginBounds.Top)
    MyFont = New Font("Courier New", 12, FontStyle.Underline)
    Dim Y As Integer = CInt(e.MarginBounds.Top + 50)
    e.Graphics.DrawString("Title", MyFont, Brushes.Black, e.MarginBounds.Left, Y)
    e.Graphics.DrawString("Author", MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
    Y += CInt(2 * MyFont.GetHeight)
    MyFont = New Font("Courier New", 12, FontStyle.Regular)
    Dim IEnd As Integer = TitlesPerPage * PageNumber
    If IEnd > TitlesTable.Rows.Count Then
      IEnd = TitlesTable.Rows.Count
      e.HasMorePages = False
    Else
      Dim I As Integer
      For I = 1 + TitlesPerPage * (PageNumber - 1) To IEnd
        'programmatically move through all the records
        e.Graphics.DrawString(Mid(txtTitle.Text, 1, 35), MyFont, Brushes.Black, e.MarginBounds.Left, Y)
        e.Graphics.DrawString(Mid(cboAuthor1.Text, 1, 20), MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
        btnNext.PerformClick()
        Y += CInt(MyFont.GetHeight)
      Next I
      PageNumber += 1
      e.HasMorePages = True
    End If
  End Sub
	
	This code puts a header on each page.  It programmatically moves through all the records (by simulated clicks on the btnNext button).  As control moves through the records, the corresponding title and author values are printed (they are truncated using the Mid function so they fit on a line).
Thats the tutorial i was told to follow :/
Reply With Quote
  #14  
Old 02-12-2013, 07:57 AM
DrPunk's Avatar
DrPunkReporting Help Needed DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

OK, this is making a bit more sense to me now.

The filling of the DataTable wants to be in the button click rather PrintTitlesPage sub, I think.

I think then the code should work if it's not too different from that you've posted.

But you'll have to reference the DataTable in the DrawString, i.e.
Code:
e.Graphics.DrawString(TransactionsTable.Rows(I).Item("WhateverTheFieldIs").ToString, MyFont, Brushes.Black, e.MarginBounds.Left, Y)
Sorry for leading you a bit off track. Not done printing for a while. I'd forgotten it kinda calls itself. It's quite strange.
__________________
There are no computers in heaven!
Reply With Quote
  #15  
Old 02-12-2013, 02:27 PM
brown brown is offline
Freshman
 
Join Date: Jan 2013
Posts: 39
Default

Ok, so I added what I think you suggested

The data table etc have been declared in the public class so it can be accessed throughout

then I have

Code:
 Private Sub btnPrintTransactions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintTransactions.Click
        'Start printing process at first record
        PageNumber = 1
        'click the "FIRST RECORD" Button to recive the first record
        Button2.PerformClick()
        Dim TransactionDocument As Drawing.Printing.PrintDocument
        'Create the document and name it
        TransactionDocument = New Drawing.Printing.PrintDocument()
        TransactionDocument.DocumentName = "Transaction List"
        'Add code handler
        AddHandler TransactionDocument.PrintPage, AddressOf Me.PrintTransactionPage
        'Print document
        dlgPreview.Document = TransactionDocument
        dlgPreview.ShowDialog()
        'Dispose of document when done printing
        TransactionDocument.Dispose()

        

        Try
            cn.Open()

            da.Fill(TransactionsTable)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
            ' If it errors then it probably shouldn't carry on (i.e. there'll be no transactions to write)
            Exit Sub
        Finally
            ' Always good to close the connection in a Finally so it gets closed regardless
            ' of error happening or not
            cn.Close()
        End Try

    End Sub
and

Code:
  Private Sub PrintTransactionPage(ByVal sender As Object, ByVal e As Drawing.Printing.PrintPageEventArgs)
       

        ' Now you can process the TransactionsTable

        'here you decide what goes on each page and draw it there
        'print headings
        Dim MyFont As Drawing.Font = New Font("Lucida Sans", 14, FontStyle.Bold)
        e.Graphics.DrawString("Transactions - Page: " + Str(PageNumber), MyFont, Brushes.Black, e.MarginBounds.Left, e.MarginBounds.Top)
        MyFont = New Font("Lucida Sans", 12, FontStyle.Underline)
        Dim Y As Integer = CInt(e.MarginBounds.Top + 50)

        'print other fields
        e.Graphics.DrawString("Room Number", MyFont, Brushes.Black, e.MarginBounds.Left, Y)
        e.Graphics.DrawString("Total Value", MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
        Y += CInt(2 * MyFont.GetHeight)
        MyFont = New Font("Lucida Sans", 12, FontStyle.Regular)


        Dim IEnd As Integer = Recordsperpage * PageNumber
        If IEnd > TransactionsTable.Rows.Count Then
            IEnd = TransactionsTable.Rows.Count
            e.HasMorePages = False
        Else
            Dim I As Integer
            For I = 1 + Recordsperpage * (PageNumber - 1) To IEnd
                'programmatically move through all the records
                e.Graphics.DrawString(TransactionsTable.Rows(I).Item("RoomNumber").ToString, MyFont, Brushes.Black, e.MarginBounds.Left, Y)
                e.Graphics.DrawString(TransactionsTable.Rows(I).Item("TotalValue"), MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
                btnNextTransaction.PerformClick()
                Y += CInt(MyFont.GetHeight)
            Next I
            PageNumber += 1
            e.HasMorePages = True
        End If

    End Sub
No records are being shown?
Reply With Quote
  #16  
Old 02-12-2013, 02:46 PM
brown brown is offline
Freshman
 
Join Date: Jan 2013
Posts: 39
Default

It writes the headings etc, but no records?
Reply With Quote
  #17  
Old 02-13-2013, 02:30 AM
DrPunk's Avatar
DrPunkReporting Help Needed DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

Code:
Dim IEnd As Integer = Recordsperpage * PageNumber
        If IEnd > TransactionsTable.Rows.Count Then
            IEnd = TransactionsTable.Rows.Count
            e.HasMorePages = False
        Else
            Dim I As Integer
            For I = 1 + Recordsperpage * (PageNumber - 1) To IEnd
                'programmatically move through all the records
                e.Graphics.DrawString(TransactionsTable.Rows(I).Item("RoomNumber").ToString, MyFont, Brushes.Black, e.MarginBounds.Left, Y)
                e.Graphics.DrawString(TransactionsTable.Rows(I).Item("TotalValue"), MyFont, Brushes.Black, e.MarginBounds.Left + CInt(0.6 * (e.MarginBounds.Width)), Y)
                btnNextTransaction.PerformClick()
                Y += CInt(MyFont.GetHeight)
            Next I
            PageNumber += 1
            e.HasMorePages = True
        End If
This bit doesn't seem quite right to me.

It's trying to work out where to loop up to in the data -> Dim IEnd As Integer = Recordsperpage * PageNumber

Then it checks if there are less records in the data than where it thinks it should end -> If IEnd > TransactionsTable.Rows.Count Then

And if it is then it doesn't print!!!!!

It only prints if IEnd < TransactionsTable.Rows.Count and I dare say you have less transactions than fit on a page so it never prints anything.

If you had more transactions than rowsperpage then you would get one page but it wouldn't print the last page.

That looks like the problem to me.
__________________
There are no computers in heaven!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Reporting Help Needed
Reporting Help Needed
Reporting Help Needed Reporting Help Needed
Reporting Help Needed
Reporting Help Needed
Reporting Help Needed Reporting Help Needed Reporting Help Needed Reporting Help Needed Reporting Help Needed Reporting Help Needed Reporting Help Needed
Reporting Help Needed
Reporting Help Needed
 
Reporting Help Needed
Reporting Help Needed
 
-->