|
sir,
thanks for your quick respose.
first of all, sorry for my incomplete information. I have a table in database(MySQL) which contains the longitude and latitude of different point. so i want to search in database for all point which is within 1000 yard from given location(mean longitude and latitude).
i can not prepare my mind that how can i add value(like 1000 yard) in any point location.
sir, can you suggest me that how can i add some value like 1000 yard in longitude(say -117.02413764) and latitude(33.03579077).
|
|
|
|
|
For the latitude it's simple to convert between degrees and distance. One degree is 110.9 kilometers.
The the longitude the distance or a degree varies with the latitude. You can read about it here: Wikipedia: Expressing latitude and longitude as linear units[^]
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Colin Angus Mackay wrote: That would be an infinite set
Surely there is a finite number of GPS positions? After all there is a finite amount of surface area on the Earth.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Steven J Jowett wrote: there is a finite amount of surface area on the Earth
Which can be continually subdivided in to smaller and smaller parcels.
Steven J Jowett wrote: Surely there is a finite number of GPS positions?
You could create a finite set if you were to place a limit on the precision. For example, if you set the precision to one degree your set would have 64,800 elements. Setting the precision to a tenth of a degree would mean 6,480,000 elements.
|
|
|
|
|
Just when you think you've out-smarted the smug git in the corner, he turns round a kicks you squarely in the balls, just to prove you wrong.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Steven J Jowett wrote: kicks you squarely in the balls, just to prove you wrong
Well, if that's what you think there isn't much I can do about it. I was merely correcting a misconception. While the surface of the earth is a finite area, that does not translate into there being a finite number of coordinate positions.
|
|
|
|
|
Hi,
I just wanted to know that can VB.Net make make a 32 bit console-based command line executable for Windows. Thanks in advance.
|
|
|
|
|
arslanjatt wrote: I just wanted to know that can VB.Net make make a 32 bit console-based command line executable for Windows. Thanks in advance
Yes.
|
|
|
|
|
|
No.
I are troll
|
|
|
|
|
Hello Friends,
I have a requirement of my application to know whenever a user select a value on crystal report & getting the selected value from crystal report view to my .net application and using that value set datasource to sub report.
Kindly help me how can I get the selected value from crystal report view to my application.
Thanks in advance
Regards
|
|
|
|
|
Do NOT cross post please.
Doing so will not lead to faster answers or better ones, it will only lead to the people here refusing to answer because of it.
As to your question, I don't think you can get the selected text out of crystal reports.
You might try (don't know how you can do it or if its even possible) to write some code in your report that save's the selected text to a parameter, and then get that parameter out of the report.
|
|
|
|
|
You might be able to invoke a webservice using a Hyperlink in your Crystal report that would pass the appropriate value to the webservice. Sounds a bit complicated, but it might work.
Rather than use your original approach, why does your application need to set the datasource for the sub-report ? I've created Crystal reports that have drill down capabilities where links would initiate a sub-report.
You may want to reconsider how your are proposing to implement your solution; there may be an easier way.
|
|
|
|
|
Hi David,
Thanks for your reply. Your second suggestion sounds better and I worked on it i.e On-demand subreport. The problems which I am facing in using on-demand sub report are following :
1) On which event should I set datasource for on-demands sub report.
2) How can I get the value from main report against which I filter datasource for on-demand subreport.
As you said that you've worked on such report might be you give me a solution for my problems.
Regards
Ali Raza
|
|
|
|
|
My reports were easier to create because I made a direct ODBC connection to the database with Crystal. I'm not sure how you would do it with datasets.
|
|
|
|
|
I m setting dataset to main report using PUSH methods. Same way I want to set datasource to on-demand sub report at runtime on the basis of value from main report
Regards
|
|
|
|
|
Dear all,
I'm new to this VB.NET,my platform using now to do the development is Visual Studio 2008 using the VB.NET 2008 Window Form to create a lorry transportation management system.
I'm facing problem with the combobox textchange event now. I'm using MySQL 5.0 with SQLYog v5.29 to develop this system.
The following is a form code for the user to insert the Delivery Order document:
Imports MySql.Data.MySqlClient
Public Class InputDO
Public Shared MyConnString As String = "Server=;Database=logistic_sysdb;Uid=root;Pwd=;"
Public Shared ObjMyConn As New MySqlConnection
Public Shared ObjComm As New MySqlCommand
Public Shared ObjRead As MySqlDataReader
Public Shared SQL As String
Dim ObjAdapter As MySqlDataAdapter
Dim ds As DataSet
Dim dt As DataTable
Dim dt1 As DataTable
Private Sub InputDO_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
ObjMyConn = New MySqlConnection(MyConnString)
'Load the information into Lorry Number Combobox
Try
SQL = "SELECT * FROM lorry_detail"
ds = New DataSet
ObjAdapter = New MySqlDataAdapter(SQL, ObjMyConn)
ObjAdapter.Fill(ds, "Lorry_Number")
dt = ds.Tables("Lorry_Number")
For i = 0 To dt.Rows.Count - 1
ComboBox1.Items.Add(dt.Rows(i).Item(0))
Next
Catch ex As Exception
MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OkOnly, "Connection Error !!")
End Try
Try
SQL = "SELECT * FROM company_detail"
ds = New DataSet
ObjAdapter = New MySqlDataAdapter(SQL, ObjMyConn)
ObjAdapter.Fill(ds, "Client_Company")
dt1 = ds.Tables("Client_Company")
Catch ex As Exception
MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OkOnly, "Connection Error !!")
End Try
End Sub
Private Sub ComboBox2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox2.TextChanged
Dim x As String ' x = The Client Company name that stored at dt1
Dim i As Integer
x = ComboBox2.Text
For i = 0 To dt1.Rows.Count - 1
If x = dt1.Rows(i).Item(1) Then
ComboBox2.Items.Add(dt1.Rows(i).Item(1))
End If
Next
End Sub
End Class
I would like to show the similar Client company dropdown at the combobox while the user is typing the name of the company. I have select all the client company into dt1 from the database,and now how could I check if the user is typing each character into combobox2 will display the similar company name on the combobox?
Beside that,should I used a textbox or combobox for this event is better or any other ideas?
Hope someone can give me some help on this.
Thank you all for reading.
Regards
Drex
|
|
|
|
|
drexler_kk wrote: I have select all the client company into dt1 from the database,and now how could I check if the user is typing each character into combobox2 will display the similar company name on the combobox?
I am not sure if I understand your question
Do you want to auto search (Auto Complete) the results from the combobox? Meaning when you press 'A', it will fetch all the combo items starting with 'A' and so on.
Mubashir
Senior Engineer
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
Yes,thats what I wish the combobox can auto showout all the stuff that match the user type drop down inside the combobox. Do you have any sample how should I do it?
Thanks for replying.
|
|
|
|
|
I have a datagrid view with two columns.There is a context menu which should be disabled when i click on any cell in the second column and also selection should be disabled.
I tried to do this by setting context menu properties for each column accordingly but the menu still appears.
And how to disable select for the the same column?
|
|
|
|
|
On MouseDown, check the column where mouse is clicked. This can be done using HitTest method.
To disable selection of cells in a particular column, you will need to override SetSelectedColumnCore method.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
I tried the code below,but the result isnt as expected.
Dim hti As DataGridView.HitTestInfo = DataGridView1.HitTest(e.X, e.Y)
column1 = hti.ColumnIndex
If e.Button = Windows.Forms.MouseButtons.Right Then
If hti.ColumnIndex = 1 Then
DataGridView1.ContextMenuStrip = ContextMenuStrip1
DataGridView1.ContextMenuStrip.Enabled = False
DataGridView1.ContextMenuStrip.Visible = False
Else
DataGridView1.ContextMenuStrip = ContextMenuStrip1
End If
End If
When I click on the second column the menu strip still appears but it appears disable.So the enabled=false is fine but why isn't the visible= false working?
|
|
|
|
|
Instead of taking this much pain, just reinitialize the contextmenustrip for the second column. Change the following C# code to VB.
this.dataGridView1.ContextMenuStrip = oContextMnuStrip;
this.dataGridView1.Columns[1].ContextMenuStrip = new ContextMenuStrip();
You will not need any extra code then.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
Ok..thanks alot.Regarding disabling the column selection where is SetSelectedColumnCore method found in vb.net?
|
|
|
|
|
It is there in the DataGridView class. Since it is protected virtual method, you will need to inherit the DataGridView class in order to override.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|