|
Any other way to create the report without dataset in VB.net 2005
Vv
|
|
|
|
|
You can always create a crystal report (or any other report engines) without any datasource (DB, dataset, mdb, xml, etc)
You can expose fields as parameters and set these parameters in your program.
|
|
|
|
|
hi, i have a little problem in populating my TreeView. i already populated all the Parent Node and its corresponding Child Node orderly. the problem is, when my form load where the treeview is place this is the output.
i attached the picture to be able to understand well because my english is not that good. sorry for that. but anyway the ordering of the Parent and Child Node is correct. what i want is all the child node of the specific parent node will under it.
this is my code
Dim DA As clsDataAccess
Dim DA2 As clsDataAccess
Dim DT As DataTable
Dim DT2 As DataTable
Dim i As Integer
Dim nRow As Integer
Dim nRow2 As Integer
Dim strParent As String
Dim strChild As String
Dim intParent As String
Try
DA = New clsDataAccess
DT = DA.ExecQuery("SELECT DISTINCT(tblMicromixParentNode.intParentNodeID), dbo.tblMicromixParentNode.vchrDescription AS " & _
"vchrParentDesc,dbo.tblMicromixParentNOde.intOrder FROM dbo.tblMicromixMenu INNER JOIN dbo.tblMicromixParentNode ON " & _
"dbo.tblMicromixMenu.intParentNodeID = dbo.tblMicromixParentNode.intParentNodeID ORDER BY intOrder ASC")
If DT.Rows.Count > 0 Then
Dim PNode As Windows.Forms.TreeNode
TV.Nodes.Clear()
For nRow = 0 To DT.Rows.Count - 1
intParent = DT.Rows(nRow).Item("intParentNodeID")
strParent = DT.Rows(nRow).Item("vchrParentDesc")
PNode = TV.Nodes.Add(strParent)
DA2 = New clsDataAccess
DT2 = DA2.ExecQuery("SELECT t1.*, t2.vchrDescription AS vchrFormDesc, " & _
" t2.vchrFormName AS vchrFormName FROM " & _
" tblMicromixMenu t1 INNER JOIN tblMicromixChildNode " & _
" t2 ON t1.intChildNodeID = t2.intChildNodeID " & _
" where t1.intAccessID=1 and t1.intParentNodeID=" & intParent & " and intShow=1")
If DT2.Rows.Count > 0 Then
Dim CNode As TreeNode
For nRow2 = 0 To DT2.Rows.Count - 1
strChild = DT2.Rows(nRow2).Item("vchrFormDesc")
CNode = TV.Nodes.Add(strChild)
Next
End If
PNode.EnsureVisible()
Next
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
by the way i am using vb.net for that.
your reply will be really appreciated.
Thank You.
-- modified at 1:17 Tuesday 25th September, 2007
Don't block the drive way of all the newbies in programming.
|
|
|
|
|
It doesn't work because you didn't add your child nodes to any of the existing parent nodes at all. They're all children of the root.
You're using lousy variable names by the way. It's very difficult to figure out what the variable is used for just be glancing at it.
This section of code should be modified:
If DT2.Rows.Count > 0 Then
Dim CNode As TreeNode
For nRow2 = 0 To DT2.Rows.Count - 1
strChild = DT2.Rows(nRow2).Item("vchrFormDesc")
PNode.Nodes.Add(strChild)
Next
End If
You add the children to the parent node you created above it, not to the root of the TreeView nodes collection.
|
|
|
|
|
first of all thank u for the reply sir.
oh yes i see now. my code below is the same so i get an output that they become all Parent Node.
so my problem now is how can i add the child node in a specific parent node? because in vb6 they have Relative,Relationship and Text. which is the Relative is the Parent Node and the Relationship is the word "tvwChild".
how can i convert this line of code in VB6 to .Net
TreeView1.Nodes.Add(Relative,Relationship,Key,Text,Image)
where the Relationship should be "tvwChild"
Parent Node
For nRow = 0 To DT.Rows.Count - 1
intParent = DT.Rows(nRow).Item("intParentNodeID")
strParent = DT.Rows(nRow).Item("vchrParentDesc")
PNode = TV.Nodes.Add(strParent)
Child Node
If DT2.Rows.Count > 0 Then
Dim CNode As TreeNode
For nRow2 = 0 To DT2.Rows.Count - 1
strChild = DT2.Rows(nRow2).Item("vchrFormDesc")
CNode = TV.Nodes.Add(strChild)
Next
End If
sorry for my english.
Thank You.
Don't block the drive way of all the newbies in programming.
|
|
|
|
|
Did you understand the changes I made to your code in my last post?
You add a parent node to the root of the tree. Then you retrieve all the children of that node from the database and add those to the Nodes collection of the Parent you just added.
|
|
|
|
|
oh yes sir i do understand that. i just explaining my previous code.
the code is working now. thank you very much.
i wish you are open again when i have a difficulties in my code.
Thank You.
Don't block the drive way of all the newbies in programming.
|
|
|
|
|
I have a Windows VB.Net Application with MSFoxPro Database, third party controls within it. With all the granted permissions for assemblies and strong name for dll.
I install my App in one system and copy the shortcut key in the other syatem within the LAN. Now if i click on shortcut key it has to fetch the data from the system where I have installed.
Can anyone PLS help me in this.
Very Urgent.
Rekha
|
|
|
|
|
skandaapriya wrote: Now if i click on shortcut key it has to fetch the data from the system where I have installed.
Can anyone PLS help me in this.
what???
what do you want? fetch the data from the machine where your app is installed to the machine where you put the shortcut???
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
You need Client/Server programming. You should write different codes which should run on clients and the server.
Your application should be installed on all machines!
|
|
|
|
|
if i am gettin it correctly then you want to fetch your database to all the lan connected system where ever you have installed your executable file
well this is server client application...
if this is the case,
then i know the procedure for sql and excess , i hope same logic should work.
In the connection string where you are giving path of your database in coding, jst add the ip adress of server like "//ipaddress of server computer/path of database".
and from server computer you have to share the database file.
try this out, may it helps you....
|
|
|
|
|
This is easy. In your code, you have to build the fully qualified path to the folder where the database is. You can do this with something like:
Dim fullPath As String = Path.Combine(Application.StartupPath, "database.mdb")
Or, if the database file is in a subdirectory of the StartupPath:
Dim fullPath As String = Path.Combine(Application.StartupPath, "subfolder\database.mdb")
Other than that, you haven't said what the problem is, nor mentioned any error messages you're getting, so it's very hard to help you.
BTW, mentioning "urgent" in your post tends to get people to ignore you.
|
|
|
|
|
hi guys
i want to get domain servers date and time through my vb.net application,
how can i do that ?
thanks in advance
hello
|
|
|
|
|
Any machine that starts up and is part of the same domain automatically gets it's date/time synced with the domain controller it logs into the domain with. You get the date/time from the workstation, not the domain controller.
|
|
|
|
|
thanks
but what if some one has changed the local system time and because of that my application logic
will not work according to its functionality thats why in my vb.net i am getting the domain
system time .
hello
|
|
|
|
|
Rather you should use UDT.Now()
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
The local domain workstations resync their time with the server every once in a while.
If you're worried about people rolling back the clock because you're giving them a timed trial software, you are simply at the mercy of the clock. There is no way around it that's 100% foolproof.
|
|
|
|
|
I am developing a program that will keep in inventory of items that we have plus I want to be able to write an order for each person individually. I am trying to use a Listview control, but I want to just be able to scroll across and in each row and column edit the quantity to order for each person. But the labeledit property only applies to the first column. I have done a lot of searching and all I can find are program that will do this in C and I can't really even get those to work right for me. Does anyone have a suggestion?
Any suggestions would be appreciated.
B.
|
|
|
|
|
Scrap the ListView and go with the DataGridView. It's designed to do exactly what you described.
|
|
|
|
|
Wrong tool
The listview is really not designed for inline editing or large datasets.
Use the datagridview.
|
|
|
|
|
Hi
Does anyone have any inclues of doing random numbers in one group and not one number in that group are to be the same.
Example ; 12,14,12,17,14 <-- not like that.
; 12,14,16,17,18 <--- like that.
Thanks
Joey
|
|
|
|
|
The way to do this, is to fill a List with your valid number values, then use a random generator to generate an index from which to pull a value out of that list. Once you pull it out, remove it from the list, so next time, your random generator generates an index into a list that only contains values that have not been picked.
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 )
|
|
|
|
|
Yeh this is the best way to do it, i'd preserve the original numbers in one list, then create an identical list and use this for your selection process. You would be getting a number between 0 and the list's count - 1.
|
|
|
|
|
Hi
I was wondering how to get scores to a game I am doing and it has to telly-up. For example a Space game, for every hit I make on my target, the scores will add up. This has to done in VB.Net.
Thanks
Joe
Joey
|
|
|
|
|
The fact that you're asking this, makes me doubt you're able to write any game. I suggest buying a VB.NET book and working through it before starting your magnum opus.
In any programming language, values are stored in variables. Declare an integer variable, and when you hit your target, add the right number of points to that value.
Or, did I misunderstand the question ?
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 )
|
|
|
|