|
hey
i have the same problem
but your given link is down
can you provide any new link
or provide any example
thanks in advance
waiting for rply
Regards
Narendra Singh
(Jindal Tech Ventures)
|
|
|
|
|
Hi Narendra,
Sorry for the delay in response. I was on vacation last week when you posted. The Microsoft GotDotNet.com website is no longer maintained so the link I posted in 2004 no longer works. I dug back through the e-mails I kept and here were the 4 suggestions I received on that forum. Not sure which one I used or even which project I was working on at that time to even check, but hopefully posting the actual responses that they gave me will help you in some way.
1st answer:
You could write the schema of the dataset created out to an xmlfile, and then add the xml file to crystal reports using More Data Sources, ADO.Net(XML).
Public Sub CreateXmlFile(ByVal XmlFilename As String, ByVal XmldataSet As DataSet)
Dim XmlFile As System.IO.FileStream
Dim XmlFileStream As New System.IO.FileStream _
(XmlFilename, System.IO.FileMode.Create)
Dim XmlOutput As New System.Xml.XmlTextWriter _
(XmlFileStream, System.Text.Encoding.Unicode)
XmldataSet.WriteXmlSchema(XmlOutput)
End Sub
2nd answer:
Can't you just connect to the CSV file with an OleDb.OleDbConnection, and fill a DataSet with an OleDb.OleDbDataAdpater?
I fill datasets in this way all the time.
-------------------------------------------
Dim txtConn as New OleDb.OleDbConnection
txtConn.ConnectionString = "Provider=miscrosoft.jet.oledb.4.0;Data Source=Directory Name;Extended Properties=Text;"
Dim txtCmd as New OleDb.OleDbCommand
txtCmd.Connection = txtConn
txtCmd.CommandText = "SELECT * FROM [filename.csv];"
Dim txtAdpt as New OleDb.OleDbDataAdpater
txtAdpt.SelectCommand = txtCmd
Dim ds as New Dataset
txtAdpt.Fill(ds)
------------------------------------------------
Now you have a disposable dataset that should be able to interact with Crystal Reports.
3rd answer:
There is a workaround for this problem on page 262 of the book at this site:
http://www.crystalreportsbook.com/?cpgn=ngcr_021803
This is a very good .Net Crystal Reports book.
It states to connect to the Excel file using DAO, then design the report, and since the DAO connection prompts for login, password, switch the connection to ODBC after the report is designed.
4th answer:
I think crystal made a fix to this problem, you might check their support site.
Lost in the vast sea of .NET
|
|
|
|
|
hi
i want to know how to make windows application template for vb.net
|
|
|
|
|
|
Hi,
Has anyone worked with WinHTTP and multithreading in VB.NET
I have written a small application for understanding threading in VB.NET.
It consists of initializing new thread, each consisting of a winHTTP request to open a particular page located on our local LAN.
The code for opening a new page in a new thread is
Private Sub Start()
Dim myWinHTTP As New WinHttp.WinHttpRequest()
myWinHTTP.Abort()
myWinHTTP.SetTimeouts(5000, 5000, 5000, 5000)
myWinHTTP.Open("GET", "http://192.168.0.60/Alliance/Login.aspx", False)
myWinHTTP.Send()
textbox.Multiline = True
textbox.Text = textbox.Text & " $$$ " & myWinHTTP.StatusText & ". Thread Id : " & Thread.CurrentThread.GetHashCode()
countLbl.Text = serial
End Sub
As observed, there were frequent errors in opening the page. The sub Stated above too was not completely exectued for quite a few threads. The control used to dissaper from the code post the command 'Dim myWinHTTP As New WinHttp.WinHttpRequest()' itself.
In anyone has any clue abt the corresponding error, please inform.
Amit
|
|
|
|
|
I've got a couple of questions...
Why are you using WinHTTPxxx instead of the System.Net namespace and the WebRequest class? Are you using some component for Web requests or are you using a library your put together yourself?
Why are you creating a new WinHttpRequest object and the first thing you do is call the .Abort method?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I need the user of my program to select a computer name from the computers attached to his network, but have no idea how to get started to make a list of the computers.
This has to be done in VB6 (or Delphi)
Once that is done I can readily handle all the rest of the code I need.
Laurie
|
|
|
|
|
Try to check the information from here.[^]
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
In VB6 you can find a lot of info regarding the network using the Active DS Type Library (Domains, Groups, Users and Computers).
First set a reference to the above library
then declare your object variables
Dim objIADsContainer As IADsContainer
Dim objIADsDomain As IADsDomain
Dim objIADSComputer As IADsComputer
If you need to find a list of the domains first use the following code:
Set objIADsContainer = GetObject("WinNT:")
For Each objIADsDomain In objIADsContainer
Debug.Print objIADsDomain.Name
Next
If you only have 1 domain and want to find all computers on that use the following:
Set objIADsContainer = GetObject("WinNT://" & "Your_Domain_Name")
objIADsContainer.Filter = Array("Computer")
For Each objIADSComputer In objIADsContainer
Debug.Print objIADSComputer.Name
Next
All this assumes you have a windows NT network. You should be able to get the basic info above on any NT network. If you have a well designed Active Directory structure you can find a lot more than just the computer name.
Hope its helpful
Jonathan
|
|
|
|
|
how can i calculate total levels in a treeview?
Sumit Domyan
Software Developer
ANALEC INFOTECH
|
|
|
|
|
What do you mean by "total levels"?
Are you talking about how many levels deep the deepest child node is from the tree root?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
yup dear, you got my point, any solution?
Sumit Domyan
Software Developer
ANALEC INFOTECH
|
|
|
|
|
Hey, this is my first time, so I'll try to be as clear as possible
What I am trying to do, is control the system device audio levels in my VB app. Basically I want to create my own "mixer board" very similar to the supplied "Volume Control" program supplied with windows. On first glance, it seems relatively easy, however I am running into some problems.
Here is what I have so far...
Public Declare Function auxSetVolume Lib "winmm.dll" (ByVal uDeviceID As Integer, ByVal dwVolume As Integer) As Integer
Public Declare Function auxGetVolume Lib "winmm.dll" (ByVal uDeviceID As Integer, ByRef lpdwVolume As Integer) As Integer
Public Declare Function auxGetNumDevs Lib "winmm.dll" () As Integer etc.
the problem is, whenever I call auxGetNumDevs(), it returns 0, which means there are no sound cards present (which is NOT the case), or an error occured. I have no idea why it keeps returning 0.
Maybe this isn't the best way to go about controlling the system audio, so I am open to any suggestions
Thanks in advance
|
|
|
|
|
Since auxGetNumDevs doesn't return an error value, there's no way to tell why the call is failing. auxGetNumDevs doesn't exactly return the number of sound cards, but returns the number of controllable auxillary audio output devices. This might not be supported by your sound card.
I think your just using the wrong interface to get at the sound cards' mixers. Try using mixerGetNumDevs instead. The docs start here[^] on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you sooo much, I've asked questions about this on many forums, and have had no good responses, this seems to be EXACTLY what I need, I'll keep working on it and probably be back with more questions
Thanks again Dave!
-Eric
|
|
|
|
|
Hi All,
Please help me with this problem, say in VB I have two variables of string type
dim x as string
dim y as string
x="y"
y="dd"
Is there any way by which I can change the value of y through x, like in some languages u can use
&x="fff"
which actually changes the value of y thru x.
Is there any thing like that in VB, Please help
|
|
|
|
|
Your talking about pointers and VB/VB.NET doesn't support them. That's reserved for C++ and C#.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi! Im trying to convert this stuff and im new to his vb.net Can somebody help me to convet this in .NET.. thanks for your help guyz..
<br />
If pPayload.Length > 0 Then<br />
ReDim pPayload.Data(pPayload.Length - 1)<br />
For i = 1 To pPayload.Length<br />
pPayload.Data(i - 1) = AscB(Mid(txtPayLoadData.Text, i, 1))<br />
Next i<br />
End If<br />
<br />
' kernel32 Windows API<br />
CopyMemory(pPayloadBuffer(0), VarPtr(pPayload.Length), 4)<br />
If pPayload.Length > 0 Then<br />
CopyMemory(pPayloadBuffer(4), VarPtr(pPayload.Data(0)), <br />
pPayload.Length)<br />
End If<br />
|
|
|
|
|
Another question to make (and so soon). How can i make a label on another form (lets say Form1) to change from a Form2. In vb6 we used to say Form1.lblTest.caption = "Test"
in VB.NET how is it possible???
So far i have:
==============================
Dim frmRead As New Form2
Form2.Show
==============================
In Form2 when i click a button i want to change a label text in form1.
=====================================================================
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
form1.lblTest.Text = txtTestBox.text
=====================================================================
the above command produces an error.
Any help? Please?
Trying to find the way
|
|
|
|
|
|
V_A_S_S wrote:
Dim frmRead As New Form2
Form2.Show
First of all, I hope that's a typo, cause it should be:
frmRead.Show
You have to set the access modifier for lblTest to either Public or Friend to be able to access it from another form.
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
|
|
|
|
|
Yes it was a typo. A messaage comes up saying:
"Reference to a non-shared member requires an object reference"
The modifier of the text box in form1 is Friend.
ARGG!! Why VB.NET is so crapy???!!?!
if i type form1.lblTest.text = "Test" then there is a blue wiggly line under it.
Trying to find the way
|
|
|
|
|
what's the name of your form1? is it really form1?
Unlike vb6, VB.Net does not automatically create a variable for a form, you have to manually create it.
Try setting the text without referencing the form.
lblTest.text = "Test"
See if that works
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
|
|
|
|
|
No still doesn't work.... yes i keep my forms form1, form2 etc for now. I am new in VB.NET.
Thanks for all the help though.
Trying to find the way
|
|
|
|
|
Hmmm, that's strange.
Are you sure that there's a line:
Friend WithEvents lblTest as Label
in your form1?
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
|
|
|
|