15,897,187 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 14976615 (Top 2 by date)
Member 14976615
17-May-21 23:30pm
View
Hi, Can you please help me out to figure the Error please. this is my dataset link"https://drive.google.com/file/d/1m8CTh0S594saqtD2UaQwqpq6HFy-nVHB/view?usp=sharing". I have no idea about this i am very new in this field.I have tried to find through command window (GetError) but no use.Please Help me
Member 14976615
15-May-21 13:00pm
View
Hi,
Can you please give me a solution for my second error pls:This is my code to Generate the Report:
Try
Cursor = Cursors.WaitCursor
Timer1.Enabled = True
Dim rpt As New rptVoucher
Dim myConnection As SqlConnection
Dim MyCommand As New SqlCommand()
Dim myDA As New SqlDataAdapter()
Dim myDS As New SchoolmanagementDataSet
myConnection = New SqlConnection(cs)
MyCommand.Connection = myConnection
MyCommand.CommandText = "Select Pettycash.ID,Pettycash.Pettycashno,Pettycash.Date,Pettycash.Accountno,Pettycash.Accountname,Pettycash.Amount,Pettycash_Details.VD_ID,Pettycash_Details.Accountname,Pettycash_Details.AccountNo,Pettycash_Details.Billref, Pettycash_Details.Narration, Pettycash_Details.Amount FROM Pettycash INNER JOIN Pettycash_Details On Pettycash.ID = Pettycash_Details.VoucherID where Pettycashno='" & txtVoucherNo.Text & "'"
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand
'myDS.EnforceConstraints = False
myDA.Fill(myDS, "Pettycash")
myDA.Fill(myDS, "Pettycash_Details")
rpt.SetDataSource(myDS)
frmReport.CrystalReportViewer1.ReportSource = rpt
frmReport.ShowDialog()
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
This is my DataTable-1:
CREATE TABLE [dbo].[Pettycash] (
[ID] INT NOT NULL,
[Pettycashno] NCHAR (30) NULL,
[Date] DATE NULL,
[Accountno] NCHAR (150) NULL,
[Accountname] NCHAR (150) NULL,
[Amount] DECIMAL (18, 2) NULL,
[rnumber] NCHAR (150) NULL,
CONSTRAINT [PK_Pettycash] PRIMARY KEY CLUSTERED ([ID] ASC)
);
This is my DataTable-2;
CREATE TABLE [dbo].[Pettycash_Details] (
[VD_ID] INT IDENTITY (1, 1) NOT NULL,
[VoucherID] INT NULL,
[Date] DATE NULL,
[Accountname] NCHAR (150) NULL,
[AccountNo] NCHAR (150) NULL,
[Billref] NVARCHAR (50) NULL,
[Narration] NVARCHAR (MAX) NULL,
[Amount] DECIMAL (18, 2) NULL,
[rnumber] NCHAR (150) NULL,
CONSTRAINT [PK_Pettycash_Details] PRIMARY KEY CLUSTERED ([VD_ID] ASC),
CONSTRAINT [FK_Pettycash_Details_Pettycash] FOREIGN KEY ([VoucherID]) REFERENCES [dbo].[Pettycash] ([ID]) ON DELETE CASCADE ON UPDATE CASCADE
);
This is my DataSet Download Link;
https://drive.google.com/file/d/1m8CTh0S594saqtD2UaQwqpq6HFy-nVHB/view?usp=sharing