|
<br />
s = "drop view q1"<br />
cmd.CommandText = s<br />
dr = cmd.ExecuteReader()<br />
dr.Close()<br />
<br />
<br />
<br />
<br />
<br />
s = "create view q1 as select sum(fatrq1)reglz from reglz where fatrdate between '" + str + "'and'" + str2 + "'"<br />
cmd.CommandText = s<br />
dr = cmd.ExecuteReader<br />
dr.Close()<br />
<br />
Form7.Show()<br />
in form 7 i put this code
CrystalReportViewer1.ReportSource = ("CrystalReport1.rpt")
and i saved my report in debug
and when i when i click the bottom to show the report
he tell me error loading the report
is there any one to help me
|
|
|
|
|
hi,
specify the error in detail.
anyway use this procedure (in place of Form7.show) to show report
call crystalForm.showReport()
where crystalForm contains crystalReportviewer and showReport procedure.
Private sub ShowReport()<br />
Try<br />
Dim obj As CrystalReport1 = New CrystalReport1<br />
Dim ds As New DataSet<br />
Dim da As OleDbDataAdapter<br />
Dim str As String<br />
str = "select * from TableName" 'Query<br />
<br />
da = New OleDbDataAdapter(str, conn) ' where conn is connection object<br />
da.Fill(ds)<br />
<br />
obj.SetDataSource(ds.Tables(0))<br />
me.CrystalReportViewer1.ReportSource = obj<br />
Me.Show()<br />
Catch ex As Exception<br />
MsgBox(ex.Message, MsgBoxStyle.Information, "Report")<br />
End Try<br />
End sub
one more thing ,CrystalReport1.rpt must be include in your project (not in debug folder)
hope this helps
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
Hi there,
The user input a decimal number 123.456, how do i work on the number behind the decimal point.
|
|
|
|
|
Hi,
integer numbers can't handle the fractional part.
Floating-point numbers can; that is their purpsoe.
Look for the Single and Double data types, and the corresponding classes.
Double.TryParse() may suit your needs.
If this is new to you, I strongly recommend you buy an introductory book on
VB.NET and work your way through it.
|
|
|
|
|
Luc Pattyn wrote: ForumVisual Basic / VB.NET
Subject:Re: Decimal Point
Sender:Luc Pattyn
Date:6:13 5 Aug '07
Hi,
integer numbers can't handle the fractional part.
Floating-point numbers can; that is their purpsoe.
Look for the Single and Double data types, and the corresponding classes.
Double.TryParse() may suit your needs.
If this is new to you, I strongly recommend you buy an introductory book on
VB.NET and work your way through it.
Luc Pattyn
Integer numbers can't handle fractions, WELL DUH....Anyone knows that
Everyone needs a little help, now and then, even people like you.........
|
|
|
|
|
Yeah, I need help in guessing which elementary things you know and don't know.
The integer part of a floating-point number is available by ... to ...,
or by using the ... method, and the fractional part is what is left when you
subtract the integer part from it. But of course you knew all that.
Now what is the question ?
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/AllLanguages/General
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I'm creating a datagridview in VS2005, and two of the columns is comboboxes. I don't know how to change to populate the datasource to 2nd combox from the selection on the 1st combox. The point is I don't know how to return the value from the 1st combox selection on a row. Could someone here tell me how, please
Your Helps are Very Appreciated. Ryan
|
|
|
|
|
Hello, i am 16, at the moment i am learing VB 6 however was recently told this isnt the best language to use. I am familier with the bascis of C++, should i contiue to learn C++?
Which language would you say would help me get started into the world of proggraming?
I know the basics of VB 6, HTML and C++, so i have some knoledge haha
Benjamin Dodd
|
|
|
|
|
It really depends on what you want to do. For web programming, PHP, ruby, or asp.net would probably be good choices.
For desktop programming, C++ would definitely be the way to go, although java might also work well for you.
Also, at some point I'd really recommend spending some time with C and assembly. They aren't necessarily the best introductory languages (although the first programming class I ever took started from assembly and then went to C), but a good grasp of the low level workings of the computer will help you out.
|
|
|
|
|
ooo thanks i have experince with C++, i will use C# i think as i have had it reconmended to me.
Rareed wrote: For desktop programming
this i what i want to do desktop programming, i will use C# i think
Thanks
Benjamin Dodd
|
|
|
|
|
c# is a good middle ground for you, although, c# and vb.net are virtually identical in power. There is a stigma that C# is better because it used to better the better of the two, now microsoft has basically built C# and VB.net from the same stuff and used different syntax. If you prefer the sentence like interaction of VB.net syntax, i'd go for that. But if you like the C# style then i'd go for that.
|
|
|
|
|
Rareed wrote: For desktop programming, C++ would definitely be the way to go
I would tend to disagree. C# is an excellent language for developing desktop applications. I would suggest that more desktop applications are written in C# than C++ nowadays. Sure, the big old applications like Word and Excel are likely written in C++ or C, but modern business applications aren't.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Agreed
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The easiest solution is that learn FORTRAN as quick as possible. Thats all I can say you at this time.
Be a good professional who shares programming secrets with others.
|
|
|
|
|
Benjamin Dodd wrote: at the moment i am learing VB 6 however was recently told this isnt the best language to use.
It is a dead language. It was superceded in 2002 by VB.NET
Benjamin Dodd wrote: I am familier with the bascis of C++, should i contiue to learn C++?
It is a useful language to have.
What really matters is what you want to do with it. However, a good grounding in any modern language will provide you with a transferrable skill set.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Colin Angus Mackay wrote: a good grounding in any modern language will provide you with a transferrable skill set.
If only recruiters saw it that way.
Kevin
|
|
|
|
|
VB6 is a waste of time. VB.NET is fine, but C# is also good. The bottom line is, there is no such thing as knowing too many languages. The only reason VB6 is a waste is that it's a dead language. I'd learn C#, because of the C++ background, and because going to VB.NET is easy, if you need to, when you know C#. But, keep using C++, there's no law against using more than one, it's not like marriage.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: there's no law against using more than one, it's not like marriage.
haha
Ok Thanks for the advice, i will begin to learn C# from today onwards , i will also continue with C++.
Thanks for the advice
Benjamin Dodd
|
|
|
|
|
I am assuming that you will be moving to the .Net platform sooner or latter. If thats the case then go for the language you feel good and strong about personally. Under the .Net platform, all languages have exactly equal capabilities (at least according to some Microsoft learning aids) and you can do the same task in almost the same number of lines and using the exact same classes and data types. Knowing more languages wont do you harm though, given that due to cross language programming now taking place, you might have to use and debug components written in another language.
However C# is more universally used: by Microsoft and major players.
|
|
|
|
|
What version of VB is everyone using, i use VB 6. What are peoples views on this?
Benjamin Dodd
|
|
|
|
|
Benjamin Dodd wrote: i use VB 6
It's pretty much dead language, now days.
Benjamin Dodd wrote: What version of VB
VB.NET if there is really ever a need for it...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
ok, and nice quote. I use VB 6 because i am a beginner and find it easy, once i get better at coding i will use C++ or soming along those lines. What language are you best with?
Benjamin Dodd
|
|
|
|
|
Benjamin Dodd wrote: I use VB 6 because i am a beginner and find it easy
Just go to VB.NET. VB6 is no longer supported.
Benjamin Dodd wrote: What language are you best with?
C++/C#/Java/PHP/Perl/Fortran/VB.NET/Assembly (80x86, 6502), just to name a few
Take note of my other sig at the bottom
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
haha i jus bought the VB 6 book, and that comment is not funny haha, you are a Genius hehe, you know lots of languages, im only 16, what do u suggest i use to program, i used C++ some time ago i have the books for that. Just found it a bit ahrd after a while.
Any suggestions
Benjamin Dodd
|
|
|
|