Crystal Report problem. Help me?

damxuanthai

Well-known member
Joined
Mar 1, 2007
Messages
48
Location
Việt Nam.
Programming Experience
Beginner
I am using Vb2005, and make a test program to practice CrystalReport.
This is Error found: (see the Picture). This Error was occured when I pressed the "Next page" on the Report to access the next page. I don't khow how to solve this thread. Im sure there are two pages in Report.
Help me, please.
I have searched and read much in this room, but no Error like this, If there are a other one, please give me a link.
 

Attachments

  • Error.JPG
    Error.JPG
    94.5 KB · Views: 27
I have edited my code. And found the reason cause Error.
Old Code:
VB.NET:
[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] Button1_Click([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] Button1.Click[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] objRep [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] ReportDocument[/SIZE]
[SIZE=2]objRep = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] CrystalReport1[/SIZE]
[SIZE=2]rptView.ReportSource = objRep[/SIZE]
[SIZE=2]rptView.Refresh()[/SIZE]
[SIZE=2][COLOR=#008000]objRep.Dispose()[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
Changed Code:
VB.NET:
[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] Button1_Click([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] Button1.Click[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] objRep [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] ReportDocument[/SIZE]
[SIZE=2]objRep = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] CrystalReport1[/SIZE]
[SIZE=2]rptView.ReportSource = objRep[/SIZE]
[SIZE=2]rptView.Refresh()[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
This is so simple....:D
Thank to see
 
Sometimes it's those littlest of things that causes us the greatest amount of grief.

-tg
 
Back
Top