15,907,395 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 11749706 (Top 28 by date)
Member 11749706
29-Sep-15 7:46am
View
my total code is as follows,
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports System.Configuration
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class ledger
Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("DCS").ConnectionString)
Dim ds As New DataSet
Private Sub ledger_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.Open()
Dim cmd As String = "select ACID,Account from vact"
Dim da1 As New SqlDataAdapter(cmd, con)
da1.Fill(ds, "vact")
cbaccount.DataSource = ds.Tables("vact")
cbaccount.DisplayMember = "Account"
cbaccount.ValueMember = "Account"
DTP1.Format = DateTimePickerFormat.Custom
DTP1.CustomFormat = "MM/dd/yyyy"
DTP2.Format = DateTimePickerFormat.Custom
DTP2.CustomFormat = "MM/dd/yyyy"
con.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim reportDocument As New ReportDocument
Dim paramField = New ParameterField
Dim paramFields = New ParameterFields
Dim paramDiscreteValue = New ParameterDiscreteValue
'Set instances for input parameter 1-@name
paramField.Name = "@Name"
paramDiscreteValue.Value = cbaccount.Text
paramField.CurrentValues.Add(paramDiscreteValue)
'Add the paramField to paramFields
paramFields.Add(paramField)
'Set instances for input parameter 2 - @sd
paramField = New ParameterField()
paramField.Name = "@SD"
paramDiscreteValue = New ParameterDiscreteValue
paramDiscreteValue.Value = DTP1.Value
paramField.CurrentValues.Add(paramDiscreteValue)
'Add the paramField to paramFields
paramFields.Add(paramField)
'Set instances for input parameter 2 - @ED
paramField = New ParameterField()
paramField.Name = "@ED"
paramDiscreteValue = New ParameterDiscreteValue
paramDiscreteValue.Value = DTP2.Value
paramField.CurrentValues.Add(paramDiscreteValue)
'Add the paramField to paramFields
paramFields.Add(paramField)
CrystalReportViewer1.ParameterFieldInfo = paramFields
reportDocument.Load("C:\Users\User\Documents\Visual Studio 2005\Projects\Alisoftpremium\Alisoftpremium\CrystalReport1.rpt")
'Load the report by setting the report source
CrystalReportViewer1.ReportSource = reportDocument
End Sub
End Class
my sp as follows
@Name nvarchar (50),
@SD as date,
@ED as date
as
begin
select VNo,convert(nvarchar(15), Date,106)as Date, CreditAccount as Account, AmountDr as Amount,convert(nvarchar(15), DueDate,106)as [Due Date],Remarks from vTotalTrans where Debitaccount = @Name and Date between @SD and @ED
union all
select VNo,convert(nvarchar(15), Date,106)as Date, DebitAccount as Account, AmountCr as Amount,convert(nvarchar(15), DueDate,106)as [Due Date],Remarks from vTotalTrans where CreditAccount = @Name and Date between @SD and @ED
order by date
Member 11749706
29-Sep-15 5:30am
View
yes..
i changed @name to
paramDiscreteValue.Value = cbaccount.text
i am getting result in my database but not in crystal report..
exec spLegderNameDt 'Emichem','09/01/2015','09/29/2015'
do i need to configure anything else?? I am getting only blank page with headings in crystal report
Member 11749706
17-Jun-15 5:18am
View
its ok bro.. thanks..just think from my side..it is easy to say study and learn..and not easy to solve an issue fast..i have already registered many sites to get this answer...first in my life i am doing this..if i can post videos i can show you each steps of error..I already explain everything..now i need a solution instead of asking me to learn..thanks buddy..
Member 11749706
15-Jun-15 7:07am
View
thanks for your advise. I realize you wont solve my issue..but thanks for at least responding with me. I quite ..let me check other sites
Member 11749706
14-Jun-15 4:54am
View
i cannot connect the database by above code (app config)
Member 11749706
13-Jun-15 4:15am
View
I understand how you help me. I am really appreciating your effort.If i have studied much I would have achieve the result. I am learning programming from youtube and other sites. I know how to update databound datagirdview control. I know how to use combobox but I dont know how to do button click event which update database from datagridview control which contains date and combobox columns..pls provide me demo code .so that I can study or provide me better site. MSDN I have already checked as you have suggested but no use.so pls provide me demo code which insert database from unbound datagridview control which contains date and combobox columns..
Member 11749706
13-Jun-15 2:47am
View
I have searched many places for this but could not see. This site at least am getting some response. I could achieve whatever I have attempted. But this is really important for me. So if you can help me please do.I have tried whatever you said. Since this is my passion... but no one settle my purpose.
Member 11749706
13-Jun-15 2:33am
View
how can i send you screen shot??
Member 11749706
13-Jun-15 2:23am
View
Dim cellvalue2 As string = "" says date column named date cannot be found parameter name:columnname
then I changed to Dim cellvalue2 As date = "" then date cannot be infinity.
so I left date by putting comment and tried other two column . Then it says employee column named employee cannot be found parameter name:columnname and manager column named manager cannot be found parameter name:columnname etc. Please check my code and correct it. I am not at all a programmer but just a beginner only.I am really stuck in this button click event which update database from datagridview control which contains date and combobox columns
Member 11749706
12-Jun-15 10:56am
View
I have updated my question. kindly check why button click event which brings error
Member 11749706
11-Jun-15 15:32pm
View
...
i am getting error when am trying to insert row to database by button click event
Member 11749706
11-Jun-15 12:49pm
View
thanks dear.. actually i am getting trouble only when i use datagridviewcomboxcolum..let me comeback to you if i still face any trouble
Member 11749706
11-Jun-15 12:44pm
View
thanks dude.. i will try my level best..i love this site a lot
Member 11749706
11-Jun-15 12:10pm
View
that is what i am getting confused!!!i am working same method in other computer without error. any how i will try to send u screenshot of it. but my code is ok right??
Member 11749706
11-Jun-15 6:50am
View
how it can be null..i could achieve it by normal declaration. I mean with out using app configuration method. but when we are making exe that will b problem right. that is why i am using app config file. i have put reference system.config dll also. then why error comes???
Member 11749706
10-Jun-15 8:44am
View
Dim con As New SqlConnection(ConfigurationManager.ConnectionStrings("DBCS").ConnectionString)
error which marked on "con"... use the new keyword to create an object instance
and immediate window shows...
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll
A first chance exception of type 'System.NullReferenceException' occurred in codeprojects.exe
A first chance exception of type 'System.NullReferenceException' occurred in codeprojects.exe
Member 11749706
10-Jun-15 2:29am
View
still not working.. I put in form load event with try ..catch.. so error coming " object reference not set to an instance of an object"
Member 11749706
9-Jun-15 14:02pm
View
please see error message below and kindly help me
Member 11749706
9-Jun-15 14:02pm
View
pls see the error message below
Member 11749706
9-Jun-15 9:59am
View
if there any spelling mistake vb can notice me by read line?
Member 11749706
9-Jun-15 9:58am
View
can you please help me in this error : http://www.codeproject.com/Questions/999088/connect-sqlserver-through-app-config?arn=0
Member 11749706
9-Jun-15 9:56am
View
http://www.codeproject.com/Members/CHill60 --can u pls help me here??
Member 11749706
9-Jun-15 9:54am
View
i could fix it but why no read line came..
Member 11749706
9-Jun-15 9:43am
View
thanks dear
Member 11749706
9-Jun-15 9:43am
View
but it is vb.net which is not case sensitive na
Member 11749706
9-Jun-15 9:33am
View
error has gone. let me work it out. thanks a lot dear..
Member 11749706
9-Jun-15 8:04am
View
yes ..error which marked on "con"... use the new keyword to create an object instance
and immediate window shows...
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll
A first chance exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll
A first chance exception of type 'System.NullReferenceException' occurred in codeprojects.exe
A first chance exception of type 'System.NullReferenceException' occurred in codeprojects.exe
Member 11749706
9-Jun-15 5:23am
View
I know how to bind combobox more simply but i dont know anything about datagridcombobox data binding from a database. So please provide help me for that
Show More