|
AliAmjad wrote: But i think it's not applicable in the scenario which i am facing.
No such thing...
AliAmjad wrote: If i declare and handles this class in the startup form's class then how can other classes access the instance of this class(informationReceived.vb)
They can't. You're going about this all wrong, and the method you've come up with won't even work. Scrap this class/Module/whatever, you don't need it.
In your property getters/setters, you put Debug.Trace statements. Trace messages are caught by any of the TraceListener classes. You create this TraceListener in your main form and it'll hear all of these message no matter where they came from. Then you can Append each message in a TextBox.
|
|
|
|
|
Dave man i am really thankful to you. Just the final question because i am learning allot here. How can i append the messages to the Textbox and where to handle the class or when am i sure that i have received the message.
I've created the instance of DefaultTraceListner in the main form. And using Trace.Writeline for receiving information from other classes.
Thanks Again...
|
|
|
|
|
AliAmjad wrote: How can i append the messages to the Textbox
It's easy. I occasionally use this quick'n'dirty class to do the same thing while I'm writing an app:
Public Class TraceLogSupport
Inherits TraceListener
Private _targetTextBox As TextBox = Nothing
Public Sub New(ByVal TextBoxControl As TextBox)
Mybase.New()
If TextBoxControl IsNot Nothing Then
_targetTextBox = TextBoxControl
Else
MyBase.Dispose()
Throw New ArgumentNullException("You must specify a TextBox control to use to show log information.")
End If
End Sub
Public Overrides Sub Write(ByVal message As String)
_targetTextBox.AppendText(message)
End Sub
Public Overrides Sub WriteLine(ByVal message As String)
Me.Write(message & Environment.NewLine)
End Sub
End Class
To use it, all you do is creat an instance of it and pass it a TextBox you want it to use to log information to. I usually just use a small form with a TextBox on it and do something like this in it's Load event:
Private _tractListener As TraceLogSupport
...
Private Sub LogForm_Load(blah, blah) Handles MyBase.Load
_traceListener = New TraceLogSupport(LogTextBox)
Trace.AutoFlush = True
Trace.Listeners.Add(_traceListener)
End Sub
That's it, except for peppering the code with Trace.Write and Trace.WriteLine statements...
|
|
|
|
|
Hurrayyyyyyyyyyyyyyyyyyyyy !!!! thanksss man thank you very very much for your support this site really rocks and helped me allot. Again thanks for your support mannnn...
|
|
|
|
|
I have a windows application project that uses several Crystal Reports. When I created these reports I connected them to an access database that had the table/column structure that I wanted, but the application itself does not use this database. It creates a DataSet that matches the structure of the design database and uses the .SetDataSource to load it into the report like this:
reportDocument1.SetDataSource(dsMyDataSet)
This has worked fine in the past. Now I've added a new report and when it is run on a machine that doesn't have the design database in the same location as it was when the Crystal Report was designed and created, it will prompt asking for Database Login information.
I've seen many other posts with similar questions, but the only ones with solutions appear to still need to tie to a different database or the developer wants to learn how to pass login information in the code. I do not have a database at all to tie to. How can I sever this connection to the database and tell the report that I will be passing my data via a dataset? OR is there some other reason why this would be happening? I've tried to find differences between the report that still works and the new one but I can't see any different settings. Are there any tricky ones I may have missed?
Any help would be appreciated.
|
|
|
|
|
Kschuler wrote: when it is run on a machine that doesn't have the design database in the same location as it was when the Crystal Report was designed and created, it will prompt asking for Database Login information
Sounds like log in credentials are different. Have you tried making sure they are the same.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
I've never done anything in regards to logging in to the design database. I never setup any users or passwords nor do I require any securities since this database never holds any data. And I am not aware that it is possible to setup log in credentials on a dataset. Could you please clarify or give me an example of what you mean? I really appreciate the help.
|
|
|
|
|
I'm getting the following error and I'm pretty sure it has something to do that i moved the code to Visual Studio 2005.
Just wondering if anyone has seen it before and could help me out.
Compiler Error Message: BC32206: Indirect reference is being made to assembly ITSWeb.PageTemplates version 1.0.2827.13561, which contains 'ITSWeb.MenuControl'. This Project references a prior version of ITSWeb.PageTemplates version 1.0.2826.16005. To use 'ITSWeb.MenuControl', you must replace the reference to ITSWeb.PageTemplates with version 1.0.2827.13561 or higher.
Source Error:
Line 34: <system.runtime.compilerservices.compilerglobalscopeattribute()> _
Line 35: Public Class webusercontrols_menucontrol_ascx
Line 36: Inherits Global.ITSWeb.MenuControl
Line 37:
Line 38: Private Shared __initialized As Boolean
Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\itsweb\6130ecab\c8ceedfb\App_Web_menucontrol.ascx.8ddfe73a.iy-bw6ax.0.vb Line: 36
|
|
|
|
|
google "Compiler Error Message: BC32206" and read the first link.
I hope this helps...
You always pass failure on the way to success.
|
|
|
|
|
Thanks for the reply but i just changed the <assemby: assemblyversion("1.0*")=""> to <assemby: assemblyversion("2.0*")="">
but if anyone knows anything about what i just did and want to explain that would be nice
|
|
|
|
|
Sorry it didn't show up i changed the Assembly: Assembly Version("1.0.*") to Assembly: Assembly Version("2.0.*")
|
|
|
|
|
I just changed the Assembly Version back to 1.0 and i didn't get the error again. Anyone know what's going on?
|
|
|
|
|
Did you read the link I posted?
If you did you would have seen that the poster deleted some dll files.
So I'm guessing that something similar has happened, except in your case VS has done the work for you.
You always pass failure on the way to success.
|
|
|
|
|
Well i thought i fixed it.......so i didn't pay much attention but i read it.
Mainly because my project randomly crashed again, but i just deleted all the dll files out of the bin file.....rebuilt it then ran it and it worked.
So thanks for the post
|
|
|
|
|
You're welcome
You always pass failure on the way to success.
|
|
|
|
|
I don't know if i am at the right forum, but anyway hereis my question>
I need help by the switch /autorun in outlook and well on the syntax,
because i can not call a macro whe i use the switch, and get an error evertime i fill in a other approache.
thanks,
Peter
Peter Staal
|
|
|
|
|
You're more than likely in the wrong forum. This forum is for VB/VB.NET programming questions.
I have no idea what you're trying to say in your post. Outlook doesn't have an /autorun switch and I have no idea what you're trying to do with a macro, or how the switch relates to your macro.
|
|
|
|
|
How to Pass Value from vb.net tool or form in Crystal Report
Plz Help me
I Had complete my project in college.
My Project Title is "Transport Management System"
Include the Lorry Entry, Challan, Memo
|
|
|
|
|
|
Hello everyone,
This is my first question to codeproject members. I hope everybody will help me.
I'm doing project in VB.net 2005 in windows form.
I designed forms
created database and table in SQLServer
Now I don't know how to connect this to window form.
How to write connection string, non-execute query.
Like VB6.0 whatever type in text box, listbox it should be inserted/updated in table column field respectively.
Plzzzzzzz help me.
Thanks in advance
Ashwini
|
|
|
|
|
For using database connectivity on .Net platform, Ado.Net is used. In simple words you will need to use DataSet, DataAdapter and DataConnction objects.
However I would recommend you to Google the ‘Ado.net’ and get a complete overview before using this, because concept of Ado.Net is different from Adodc which was used with Visual Basic 6.
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Hi
If you are Comming from vb6, then its not that Bad, but the logic of ADO in vb6 is Different from ADO.net, my Suggestion is to buy a Book in Beginning VB. you can get one in www.Murach.com.To google it helps but to a certain extent. sometimes you need a book to give you more info.
Hope this helps
thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
In case if you want to see the syntax which will be used to implement database connectivity to TextBoxes, following is a small code snippet-
----------------------Code Start-----------------------------------------------
General Declaration-
Imports System.Data.OleDb
-----------------------------------------------------
Public Class Form1
Dim ds As DataSet
Dim con As New OleDbConnection("Put Connection String here")
Dim da As New OleDbDataAdapter("Select * from table1", con)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
da.Fill(ds, "Table1")
Me.TextBox1.Multiline = True
Me.TextBox1.DataBindings.Add("Text", ds, "Table1.field1")
End Sub
End Class
---------------------Code End-------------------
I hope this helps .
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
hi i want to sort my datagrid when i clcick on any one of the header column name
i wrote teh code but that is not working
can some one please help me with this
Private Sub DataGrid1_SortCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles DataGrid1.SortCommand
Label13.Text = e.SortExpression
'lblWhatClicked.Text = "You clicked: " & e.SortExpression
Dim dv As New DataView(Eventds1.Tables(0))
dv.Sort = e.SortExpression & " DESC"
DataGrid1.DataSource = dv
DataGrid1.DataBind()
End Sub
Thank u
hepsy
|
|
|
|
|
Hi
when you drop a datagrid into your Form,and bind it to a datasource, it automatically sort the results with Columns , when you Click them. So you have messed around with you Settings. right click on your Datagrid and select properties. make sure that the "Allow Sorting" is Selected as true.
Hope it helps
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|