|
I am using Crystal Report in vb.net 2005 I am passing a parameter from form to Crystal Report, If i click on Refresh button in Crystal Report Viewer is Asking to enter Parameter value.
Now my problem is If i refresh in Crystal report viewer it should not ask for parameter value and it should assign old values passed through program.
Can any one help me ASAP
dim rpt as new rptsales
rpt.SetParameterValue(0, "cy")
rpt.DataSourceConnections.Item(0).SetConnection("", "shinepos", False)
rpt.DataSourceConnections.Item(0).SetLogon("sa", "nimda")
CrystalReportViewer1.ReportSource = rpt
CrystalReportViewer1.DisplayGroupTree = False
|
|
|
|
|
Hii
I m working on excel with vb.net 2005. and i have 2 sheet in excel workbook. and want to add the reference of sheet A to sheet b and change the format of values in sheet B.
How can i do this.
Please suggest.
Thanks
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|
|
i have created a window service but it gives the following error
"The remote server returned an error: (407) Proxy Authentication Required."
why ?
this service is running under "LOCAL SYSTEM" SO WHY it doest not work?
if i provide the username and password than it works why ?
local system account is the most priviliged account in service context
so why it is like so ?
thanks in advance
Protected Overrides Sub OnStart(ByVal args() As String)
write()
End Sub
Sub write()
Try
Dim url As String = "http://www.yahoo.com"
Dim pr As New WebProxy("172.16.88.39", 8080)
pr.Credentials = CredentialCache.DefaultCredentials
Dim g As HttpWebRequest = WebRequest.Create(url)
g.Proxy = pr
Dim r As HttpWebResponse = CType(g.GetResponse, HttpWebResponse)
Dim sw As StreamWriter = New StreamWriter("c:\Weblog.txt", True)
sw.AutoFlush = True
sw.WriteLine(Date.Now.ToString & "-----------" & r.StatusCode.ToString)
Catch ex As Exception
MessageBox.Show(ex.Message, "Web Listner", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.ServiceNotification)
End Try
End Sub
hello
|
|
|
|
|
The proxy server is telling you that authentication is required and not the service.
|
|
|
|
|
hi..,
i think your pc connected through proxy,
do this
go to internet explorer -> tools-> internet optons->
go to connections tab--> lan settings -> in the popup box unchech all the check boxes. close the IE
run your application
this may help U....
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
The proxy is telling you that the LocalService account is not authorized to use the proxy. You have to supply the proxy with credentials, specifying an account that DOES have access to use the proxy.
|
|
|
|
|
Hi - I have a VB.Net app that controls several devices - including a servo on a USB/Com port using a VCP - I am adding another device with another USB/Comport VCP driver and my vb.et program will not send the write buffer contents to the port, but does not throw an error but hangs on the next read.
I have tested the interface and device (a USBI/O24R board) using hyperterminal and the device and ports work fine.
Lots of time searching for a similar problem - no joy - so here are a few questions.
Is there a limit on how many USB/Serial (virtual COm Port) emulators in a system. Is there a problem with high com munbers (I started at 17) - but I should point out that I move the USB/Serial port to com2 with the same results.
Is there a problem with the USBI/O24R driver ? I have had a few emails with the chip supplier but no help yet except try getting to a lower com port - no results.
Below is an extract of my test code . . .
I added the GetSerialPortNames to see what was happening - POrtmon shows tthe name of the port and the open/close and a single write of "0A" but none of the data string. No change when the VCP was forced to Com2
Thanks for the help
Bob
__________________________________________
Public SwitchCommName As String = "COM2"
Public SwitchCommSpeed As Integer = 9600
Public SwitchCommParity As System.IO.Ports.Parity = IO.Ports.Parity.None
Public SwitchCommDataBits As Integer = 8
Public SwitchCommStopBits As System.IO.Ports.StopBits = IO.Ports.StopBits.One
Public SwitchComDataOut As String
Public SwitchCommFlowControl As System.IO.Ports.Handshake = IO.Ports.Handshake.None
Dim SwitchCom As SerialPort = My.Computer.Ports.OpenSerialPort(SwitchCommName, SwitchCommSpeed, IO.Ports.Parity.None, SwitchCommDataBits, IO.Ports.StopBits.One)
Public SwitchCommdataOut As String
Public SwitchCommDataIn As String
Public Switch_WordOK As Boolean = False
Sub InitializeRemoteSwitch()
Call GetSerialPortNames()
MsgBox("OK")
SwitchCom.DiscardInBuffer()
'ID device First
SwitchCommdataOut = "?TTTTTTT" '& vbCrLf
SwitchCom.WriteLine(SwitchComDataOut)
Try
SwitchCommDataIn = SwitchCom.ReadLine()
MsgBox(SwitchCommDataIn)
Catch ex As Exception
End Try
'Set I/02 as Input (switch), I/04 as output (Red) and I/06 as Output (Green)
'Default is input
'Values = 2 , 8 and 32 so output total is 40
Dim SwitchCommOutputSelect As Integer = 40
Dim SwitchCommBothLightsOn As Integer = 40
Dim SwitchCommGreenLightOn As Integer = 32
Dim SwitchCommRedLightOn As Integer = 8
Dim IOValA As String = System.Convert.ToChar(SwitchCommOutputSelect)
SwitchCommdataOut = "!A" & IOValA
SwitchCom.WriteLine(SwitchComDataOut)
'Set both lights on
SwitchCommdataOut = "A" & System.Convert.ToChar(SwitchCommBothLightsOn)
SwitchCom.WriteLine(SwitchComDataOut)
MsgBox("Both Lights")
'Set red light on
SwitchCommdataOut = "A" & System.Convert.ToChar(SwitchCommBothLightsOn)
SwitchCom.WriteLine(SwitchComDataOut)
MsgBox("Red Light")
'Set Green light on
SwitchCommdataOut = "A" & System.Convert.ToChar(SwitchCommBothLightsOn)
SwitchCom.WriteLine(SwitchComDataOut)
MsgBox("Green Light")
Dim I As Integer
For I = 1 To 10
'Get Switch Data
SwitchCommdataOut = "a"
SwitchCom.WriteLine(SwitchComDataOut)
Try
SwitchCommDataIn = SwitchCom.ReadLine()
MsgBox(SwitchCommDataIn)
Catch ex As Exception
End Try
Next
End Sub
Sub GetSerialPortNames()
' Show all available COM ports.
For Each sp As String In My.Computer.Ports.SerialPortNames
ListBox1.Items.Add(sp)
Next
End Sub
|
|
|
|
|
Hi all,
Any help with this one very much appreciated (I've spent weeks on it (on and off) and it is driving me mad...)
I have a need to retrieve and set the raw values of a joystick (not the calibrated values returned normally). The code is written in VB.NET and uses DirectInput.
My code works at present but returns calibrated data (so a range of 0 - 65535). A snippet of the code below:
My question is: How can I retrieve (and set) the raw data values returned by each axis?
My reading did point me at IDirectInputDevice8::SetProperty, and to use the DIPROP_CALIBRATIONMODE parameter - but I can't work out how to do this in vb.net.
(In case anyone is wondering why I would not use the control panel to calibrate a joystick - I need this code as the program will manually 'calibrate' the pots out of a joystick on a DIY motion platform simulator we are building - and we wish to use joystick pots as the feedback mechanism).
Again - thanks in advance to anyone that can help.
Dim devices As Microsoft.DirectX.DirectInput.DeviceList
Dim device As Microsoft.DirectX.DirectInput.DeviceInstance
Dim Joystick As Microsoft.DirectX.DirectInput.Device
Dim JState As Microsoft.DirectX.DirectInput.JoystickState
'Get all the devices of type joystick
devices = Microsoft.DirectX.DirectInput.Manager.GetDevices(DeviceType.Joystick, EnumDevicesFlags.AllDevices)
'Do we have at least one Joystick?
[...]
devices = Microsoft.DirectX.DirectInput.Manager.GetDevices(DeviceType.Joystick, EnumDevicesFlags.AllDevices)
[...]
'Move to the first
devices.MoveNext()
'Now get the first device.
device = devices.Current
'Now get joystick handle to the device
Joystick = New Microsoft.DirectX.DirectInput.Device(device.InstanceGuid)
'Tell the joystick to behave itself as we want it to.
Joystick.SetCooperativeLevel(Me, CooperativeLevelFlags.Background + CooperativeLevelFlags.NonExclusive)
Joystick.Acquire()
Joystick.Poll()
JState = Joystick.CurrentJoystickState
Joystick.Poll()
JState = Joystick.CurrentJoystickState
TBJoyX.Value = JState.X
TBJoyY.Value = JState.Y
|
|
|
|
|
For others, in case this is useful in future, I didn't need to calibrate the joystick (or get to its underlying RAW values). The reason is that I discovered that 'modern' USB joysticks auto-calibrate...
|
|
|
|
|
I've been trying to deal with bitmaps in DPX format (a motion picture format). After ages of trial and error I stumbled upon some information in the help files that GDI+ would only support several standard formats (like JPG, BMP etc.). Still being a newbie I assume now that all of the useful image classes obviously don't work with a dpx-file... and I'm close to giving up the idea of direct pixel access through VB.
Can one of you experts in here tell me if my assumption is true or if there are other ways to open (and work on) an image file which is not in a mainstream format?
Thanks
Michael
|
|
|
|
|
Michael Schäuble wrote: GDI+ would only support several standard formats (like JPG, BMP etc.). Still being a newbie I assume now that all of the useful image classes obviously don't work with a dpx-file...
True! You have to either find a library that does support the format, or create your own.
Michael Schäuble wrote: and I'm close to giving up the idea of direct pixel access through VB.
Yep! No direct pixel access is possible, with any speed anyway, because VB.NET still doesn't support pointers. You can use C# to create a library that does this for your VB.NET app though.
modified on Monday, September 29, 2008 8:10 PM
|
|
|
|
|
Too sad, but thanks for making it clear. Unfortunately I'm not experienced enough to write my own libraries and not a professional programmer, anyway.
What do you think about involving third party solutions like GraphicsMagick (open source) for the graphics part? Like generating command-line strings and calling gm for the transformation? Or would that be too clumsy....
|
|
|
|
|
Using command line utilities will be very clumsy. Find a library that does this natively, either COM or .NET-based.
|
|
|
|
|
Is possible to create an XmlDataSource that has 50 columns merge an sql database with 14 columns into and force the other 36 columns except and false or any value I want with vb.net
Learning to Code
|
|
|
|
|
Mo John wrote: Is possible to create an XmlDataSource that has 50 columns
Sure. Why would you want to? XML is NOT a database despite every newbie's attempt at making it behave like one.
Mo John wrote: merge an sql database with 14 columns into and force the other 36 columns except and false or any value I want
Uhh... what?
|
|
|
|
|
While I'm sure I could easily work out something to do this, I was wondering if there was a function that would add an array of bytes to the end of an existing byte array.
Specifically, I am working on a project where a method takes a byte array as a parameter, where the byte array contains more than just a converted string.
Original C/C++ sample code:
unsigned char buf[10];
int len = 10;
buf[0] = 9;
buf[1] = 76;
sprintf((char*)&buf[2], "%d", groupnum);
I'm sure the answer is obvious, but it's just not hitting me in the face right at the moment.
(For those interested, this is an example from Avaya's "IP Office TAPI Link Developer's Guide" to build the parameter block for the lineDevSpecific function of TAPI 2.x. I'm working on the project in VB.NET using JulMar's ATAPI.NET wrapper. I'm having another issue with the function call to use the byte array, but that's another matter entirely.)
|
|
|
|
|
I have no idea what you're getting at,but you may want to look into the System.Text.StringBuilder class.
|
|
|
|
|
Use the Array.Copy or Array.CopyTo method to copy the data from one array into another array.
Use the Encoding.GetBytes method to encode a string into a byte array. Example:
byte[] group = Encoding.UTF8.GetBytes(groupNumber.ToString());
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Array.CopyTo is exactly what I was looking for.
|
|
|
|
|
I'm running a VB6 application that queries an SQL Server 2000 database. I'm facing a weired behavior: sometimes the application get toooo slow while executing a specific query, while the same query executes very fast from SQL Query analyzer. I'm not able to catch when it's becoming too slow.
this application has tooo many users connected in the same time but not all are executing the same command at the same time. the table subject of query has many indexes. the log file of the database is small. this is weired since no one can tell when it executes normally from the application and when it becomes too slow
is there any clue where and what to look for in order to solve this?
thanks
|
|
|
|
|
i would imagine that one of the tables is getting locked (see http://www.mssqlcity.com/Articles/General/sql2000_locking.htm for locking info) If you are entering data then the SQL Server will lock the row or maybe the table to stop other people changing it will your are to keep integerity.
You can get around it for your query by using the nolock feature
SELECT * FROM TableA WITH (nolock) INNER JOIN TableB WITH (nolock) etc.
Otherwise can you provide more info on what the app does etc
Regards
AKimba
|
|
|
|
|
I think that akimba is right that a dead lock\delay lock might be occurring. I don't think changing the nolock locking hint will work though since that is the default hint for select statements.
Generally to avoid deadlocks, the tables should be used in the same order when doing updates/deletes/inserts. It's a major pain to come up with this list and stick to it, but by referencing the tables in the same order deadlocks shouldn't occur. Another option possibility might be that you have stored procedures that are using a looping structure to perform table modifications which would also cause blocking to occur).
IE, this could be happening especially if there is a large amount of users doing updates, etc.
Stored Procedure 1:
--update table 1
--update table 2
Stored procedure 2:
--update table 2
--update table 1
Might have to narrow down the places where the locking is occuring and modify just those (bandaid approach) vs. changing everywhere the updates are being used.
--Edit:
Starting recording performance data on the server(s) where the delays are occurring. Should narrow down the table(s) that are problematic. Also may need to review indexes.
Just throwing out ideas.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Hello,
is anybody can give me merge modules for crytal reports in VB.net 2005.
|
|
|
|
|
Nope. If you're entitled to have them with your licensed copy if Visual Studio, then you have them on the installation CD/DVD's. If not, you don't have them and noone here is going to risk their money and license giving you stuff you're not supposed to have.
|
|
|
|
|
Hi,
I am having awful trouble trying to use the IMAPI2. All I am trying to do is do display the media in a drive per drive letter and also trying to read an ISO. If anyone can help it would be great.
Thanks
|
|
|
|