|
refer following link
Crystal Report[^]
above search generate a list of article which is helpful for you
|
|
|
|
|
Firstly there are several ways to pass data to Crystal, including using a Typed DataSet which could be used with your ListView and your Crystal Report.
<blockquote class="FQ"><div class="FQA">NaliniNagarajan wrote:</div>and also i need how to use crystal report in vb.net</blockquote>
You really should buy a book as Crystal Reports is a very large subject in its our right.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Hello
I'm written an application using VB 6 to remote workstation, such as restart, shutting down and locked it.
Till now I'm still looking how to do that then I read your mail.
If u don't mind would you share with me, the code sample or what ever it is, thanks a lot before..
Regards Bono,
|
|
|
|
|
Try replying to the thread this equates to. Who is this aimed at?
You need to look into DCOM, but really you should not be using VB6, you should be using VB.NET and remoting.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
bono from indo wrote: I'm written an application using VB 6 to remote workstation,
bono from indo wrote: If u don't mind would you share with me, the code sample or what ever it is, thanks a lot before..
So, you are writing an application, but you want others to give the code samples to you. Correct me if I am wrong, but doesn't that mean, you are not writing that application at all but somebody else is? So... it's not your problem any more, but somebody else's and your request is therefore redundant. Wasn't that nice and easy?
|
|
|
|
|
I make a software in vb.net which is used multithreading
I want to Synchronization of threads so that multiple thread cannot be able to access same code at the same time ................
Thanx!!!!!
|
|
|
|
|
Without all the description that a question like this needs to be clear, I think you may need to look into using a SyncLock.
' Locks a section of code so only one thread can run it at a time
SyncLock lockObject
' Code
End SyncLock
The documentation on SyncLock can be found here[^]. The hardest part about using it is picking an appropriate object to use for the lock.
|
|
|
|
|
By "Same code" I assume you mean the same variable- each thread has its own copy of the code. Take a look at synclock, that does what you need.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Alright so I am just starting to learn VB and ran into a snag. This assignment is due tomorrow and I cannot format this correctly. In the image bellow, The top running program is my program which is run by the code in the background. The bottom running program is my teachers example of how things SHOULD work. All the formulas and math is correct so no issue there. The two obvious problems is the formatting and decimal placement. I cannot for the life of me figure out how to get the numbers to round to the nearest tenth. As for the formatting I cannot get everything to line up correctly like my teachers. Can anybody help me fix these small issues? I really appreciate any help I can get. Thank you.
Also the source Code is placed below the image link
Private Sub btnBill_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBill.Click
Dim frmStr As String = "{0,-10}{1,30:N}"
Dim cust, d1 As String
Dim a, b, sum1, sum2, sum3, sum4 As Double
a = CDbl(txtHour.Text)
b = CDbl(txtPart.Text)
sum1 = a * 35
sum2 = b * 0.05
sum3 = b + sum2
sum4 = sum1 + sum3
cust = txtCust.Text
d1 = "$"
lstOutput.Items.Clear()
lstOutput.Items.Add(String.Format(frmStr, "Customer", cust))
lstOutput.Items.Add(String.Format(frmStr, "Labor Cost", d1 & sum1))
lstOutput.Items.Add(String.Format(frmStr, "Parts Cost", d1 & sum3))
lstOutput.Items.Add(String.Format(frmStr, "Total Cost", d1 & sum4))
End Sub
|
|
|
|
|
You're on the right track. What you need to do, is read the documentation on format strings - you can specify the number of decimal places in your format string. And, I assume you can specify the alignment of items in the listview via a property.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I Figured as much for the decimal Places I just still don't know what property or even where to put it. As for the format, I don't know what property I would use or wear to put it either. Basically with these two I am stuck. Do you know the properties I would need to use and where to put them?
|
|
|
|
|
Hi shawndeprey;
The code below will correctly format the strings. The other issue you will have is that the font assign to controls by default are not monospace font meaning that each character will have a different width and therefore will never line up. What you need to do is go to the property page for the control and change the font of that control to a monospace font. One such font is Consolas. Once you have made this and the code change it will line up.
' You need two format strings one that has all text
' One that has currency values at the end.
Dim headerStr As String = "{0,-10}{1,30}"
' The C in the format string formats the number in
' currency format, $999.99, no need to add $ to string
Dim frmStr As String = "{0,-10}{1,30:C}"
Dim cust As String
Dim a, b, sum1, sum2, sum3, sum4 As Double
a = CDbl(txtHour.Text)
b = CDbl(txtPart.Text)
sum1 = a * 35
sum2 = b * 0.05
sum3 = b + sum2
sum4 = sum1 + sum3
cust = txtCust.Text
lstOutput.Items.Clear()
lstOutput.Items.Add(String.Format(headerStr, "Customer", cust))
lstOutput.Items.Add(String.Format(frmStr, "Labor Cost", sum1))
lstOutput.Items.Add(String.Format(frmStr, "Parts Cost", sum3))
lstOutput.Items.Add(String.Format(frmStr, "Total Cost", sum4))
Fernando
|
|
|
|
|
PERFECT!!! I changed to font to Courier New and presto! Thanks Bunches Fernando.
|
|
|
|
|
Not a problem, glad I was able to help.
|
|
|
|
|
|
Hi,
did you create subitem(10) before you tried to assign some text to it?
array elements need to be created before they can be operated on, same as simple objects: create first, then use.
How about ...items(5).subitems.add(something)
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
First, the ListViewItem is the first column, so now you've got 10 columns left. These would be the SubItems of the ListViewItem, numbered 0 through 9, not 10.
|
|
|
|
|
Do not delete your question, after you got an answer, ffs!!
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
how does one go about attaching an image in Vb.net,more specifying its image and what data type is it when creating a table?
|
|
|
|
|
There is a very interesting tool that has a name, something like google, you should learn to use it.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
ngugi wrote: how does one go about attaching an image in Vb.net
To what??
ngugi wrote: more specifying its image and what data type is it when creating a table
What table?? And what data type are you talking about? Type of what??
|
|
|
|
|
This is a bit of a Newbie question...
I am trying to write a class which adds a control to it's host, where the host could be any suitable container such as a Panel, GroupBox, or a Form.
I know I can add a control directly to a Form for example in the following way:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)_
Handles MyBase.Load
Dim myControl As New SomeControl
With myControl
.Left = myLeft
.Top = myTop
.Width = myWidth
.Height = myHeight
.Visible = True
End With
Me.Controls.Add(myControl)
End Sub
But I'm having trouble doing it from within a class.
Public Class MyNewClass
.
.
.
Public Sub New(ByVal newLeft As Short, ByVal newRight As Short, ByVal newWidth As Short,_
ByVal newHeight As Short)
myLeft = newLeft
myRight = newRight
myWidth = newWidth
myHeight = newHeight
Dim myControl As New SomeControl
With myControl
.Left = myLeft
.Top = myTop
.Width = myWidth
.Height = myHeight
.Visible = True
End With
Me.Controls.Add(myControl)
End Sub
Clearly "Me" now refers to the instance of MyNewClass and not the Container or Form in which it is intended to go, so it's not going to work.
How should I do it?
Thanks in advance.
|
|
|
|
|
hi
pass a reference of the form to your class.
Public Sub New(ByVal newLeft As Short, ByVal newRight As Short, ByVal newWidth As Short,_ ByVal newHeight As Short, ByVal form As Form1)
regards
|
|
|
|
|
Your suggestion would work, but IMO the form should be adding the control not vice-versa.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
It's bad form to do what you're attempting. The child should know nothing of it's parent, nor should it modify the environment of the parent. The parent tells the child what to do, not the other way around.
Normally, the parent container would add the child controls to the form, with the child having implemented a common interface that the parent expects it to.
|
|
|
|
|