|
Hi,
I am using VB.Net and Crystal Report 8, The problem is that I want to display a large string loaded from database in Crystal report. I set the field's Text interpretation property to "RTF Text". But it is not showing the whole string. Please help me.
|
|
|
|
|
how to delete from datagrid? and also i want to display the value of a row in txtbox by double clicking on the row or single click.all this in vb.net.
Mohinder Singh
|
|
|
|
|
As far as deleting from a data grid it depends on how you are populating the data grid and how you normally delete rows from you database. I usually use straight SQL statements with a OleDbCommand, so it that case you would execute the command and then refresh the datagrid to redisplay your results. I'm just guessing but it sounds like you might be trying to delete the row in the data grid that user selected?
You can get the selected value of a column in a row based on a double click like this:
dgResults.Item(dgResults.CurrentRowIndex, 4)
I do this on a double click, and this should give you the selected value you need.
Good Luck,
Curtis
|
|
|
|
|
what is dgresults in this
dgResults.Item(dgResults.CurrentRowIndex, 4). can u explain this a lillte bit...
Mohinder Singh
|
|
|
|
|
vengaqua wrote: what is dgresults in this
dgResults.Item(dgResults.CurrentRowIndex, 4). can u explain this a lillte bit...
Sorry, I should have mentioned that. dgresults is the name of the datagrid. The item will return a datagrid item which requires you to pass it a rowindex and a column index. So I used the currentrowindex of my datagrid and then passed it the column I wanted in this case it was column index of 4.
You can also see an example here on MSDN:
http://msdn2.microsoft.com/en-us/library/wdze7s55.aspx
|
|
|
|
|
|
and i want the value to be displayed in txtbox....
Mohinder Singh
|
|
|
|
|
Hi,
The problem is that when I open the crystal report file (rpt) in VS.NET(VB.NET), an error message appears with following text "Invalid Key". Can someone help me? I will be very thankful for this.
|
|
|
|
|
|
Thanks for your kind consideration. But the problem is that this error occures when I open the file in VS.Net2003 design mode. I not going to deploy the application, I am developing the application at this time. Please help me.
|
|
|
|
|
I am writing an application which should have a whole bunch of classes. Depending upon the choices of the user, some of the classes will be actually used and others will not be used. Now I'm worried about garbage collection, since Visual Basic isn't Java.
Is my code below mistaken in that I need to call delete?
<br />
Private Sub Test1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Test1.Click<br />
Dim myScope As ScopeClass = New ScopeClass<br />
Dim stat As Integer<br />
stat = myScope.Init(Me)<br />
stat = myScope.PerformScan(1)<br />
myScope.Close()<br />
End Sub<br />
If I do call a series of classes and I go from one class to another, is there an easy way to have a pointer to the last class I used so that I don't have to know specifically what it was at the point when I want to delete it?
If I can do this, please suggest a code snippet with the proper syntax to do it.
Thanks,
Ilan
|
|
|
|
|
IlanTal wrote: Now I'm worried about garbage collection, since Visual Basic isn't Java.
The .NET framework has automatic garbage collection and memory management. You can also use the Dispose() and Finalize() methods of classes.
Suggestion for your code - declare your class and counter variables at modular level and instantiate the class when your chosen event is fired e.g.
Option Strict On
....
'module level class declaration
Dim myScope as ScopeClass
'module level counter variable
Dim stat as integer
Private Sub Test1_Click(....) Handles Test1.Click
myScope = New ScopeClass
stat +=1
....
End Sub
Remember to decrement your counter variable if/when you dispose the class (stat -=1 ).
|
|
|
|
|
Thanks for your suggestions.
Question: My Test1_Click is a button, so every time I press the button I get a new instance of the class? (According to the code it should be so.)
When it goes out of scope does the instance hang around in memory?
It seems your use of stat is a counter, but I'm only incrementing it each time I click the button. Should I use Dispose() at the end of the button routine? Is this something I need to consider, or can I just forget it like in Java?
|
|
|
|
|
IlanTal wrote: When it goes out of scope does the instance hang around in memory?
No, if it goes out of scope the instance is no more and the memory is reclaimed.
IlanTal wrote: Should I use Dispose() at the end of the button routine?
You can call the Dispose() method when you no longer need your class. If you call it at the end of your button routine you'll throw a null reference exception if you try to make use of the class later in another sub as you cannot access a disposed object. A basic use of the Dispose() method in your click event would be something like
Option Strict On
Public Class Form1
Dim myScope as ScopeClass 'declare the class
Private Sub Test_Click(...)
'create new ScopeClass instance
myScope = New ScopeClass
'do whatever the ScopeClass needs to do
'call other methods/functions etc
......
'ScopeClass is no longer needed,
'all processing that needed to be done is complete
myScope.Dispose()
End Sub
End Class
Because of the automatic garbage collection of the .NET framework you don't HAVE to call Dispose() but it can be used to manually reclaim memory.
|
|
|
|
|
IlanTal wrote: what it was at the point when I want to delete it?
Delete it?? You don't have to delete it. If the instance goes out of scope and there are no references to it, it gets killed automatically.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All!
My windows application uses 3 Access databases, any one of which I update by editing data directly in the DB.
daCgy.Fill(dsCgy, "Accounts")
With 2 databases I have no problem updating single or multiple columns. One DB will update the first 2 columns but no more.
Columns are added to ONLY this DB on the fly, using a number for the header. (1, 2,3, , , ,) The columns are populated with Zeros. The zeros are changed programaticaly to 1.
The Code I use for adding columns is:-
C = "ALTER TABLE Category ADD COLUMN " & t1 & " Short "
After the columns have been created their format shows up in Access as follows:-
Field Size -Long Integer
Decimal Places -Auto
Default Value -0
Required -No
Indexed -No
Can someone please suggest a remedy? (apart from suicide!)
|
|
|
|
|
Hi all
I am new to this and found it by accident but was hoping that someone might be able to help me.
I am currently putting together a web page for a driving school that I am setting up. I want to include a page that has a calendar function very similar to that of microsoft outlook in the sence that the NEW customer would be able to click on a date and then a time and a new page opens allowing them to put in their details, credit card, address, name etc, thus booking the lesson.
In order to achieve all this I need the basic code which people keep telling me is simple but doesn't know where to get it from.
Is there a calendar that is available that I can customise, my skills are very basic so it would have to be very close. I have been told that I can get the source for MS outlook calendar but I cant find it anywhere.
Hope someone can help
Paul
Good Instructors Lead You To Where You Are Too Afraid To Go Alone
|
|
|
|
|
ASP.NET has a calendar control, all it does is create a table with links for days, etc.
Paul Ferris wrote: I have been told that I can get the source for MS outlook calendar
Definately not true.
Is your site already data driven ( that is, are you already using a database ) ? A database is obviously required to store and retrieve calendar details. I'm not sure you want a full calendar, you probably want just to show the dates/times that are available for booking ? You don't want new customers to see who else is getting lessons at what time.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Christian,
Yes I obviously will need database capabilities which a mate of mine is dealing with.
You are absolutely right...all I need is for customers to see what is available and then book online. I definately dont want them to see other details for other bookings, however, there must be a process in place for me to view all details of all booking.
Any ideas?
Paul
A Good Instructor Will Lead You Where You Are Too Afraid To Go Alone
|
|
|
|
|
You'll use a data bound control like a datagrid, and you'll tie it to the results of a database call. So, without a data layer, there's not much you can do.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi.
I have an application developed using VB. The application is installed on the server and until recently I was updating it when needed without problems.
Yesterday I had to make new updated to the app. After I completed my updated and release both application and the set up project I removed previous version from the server and ran my new set up. When the set up was complete in the installed projects (Control Panel) I saw my application being installed (takes about 32 mg) but folder in the wwwroot was empty and of course the application didn't work because default and all other files (dlls too) are missing.
Did anyone have such a problem? I think there's something wrong with the permission (IIS) when I install the application. The installer works on my machine and all other machines as well.
There was something installed on the server recently and I think it did something that causes this to happen.
Thanks Alex.
|
|
|
|
|
Hello
Can someone direct me to a resource where I can find the codes for the greek alphabet?
I know from experience that the alphabet for greeks comes in more than one flavor. I only have one set of codes in a macro I have written for Word but I know that 2 more exist. The database I am working with will not accept greek characters so I must convert them to the english spelling before I import them. Currently, my macro will not catch greek characters from certain sources because I do not have an exhaustive list of greek codes. Below I have a find and replace for finding betas----ChrW(61538). That code won't find all symbols that look like the beta symbol since some sources have it encoded differently. I have searched in more references than I care to admit. Can anyone help. I just need a reference. Thanks
Selection.HomeKey Unit:=wdStory
With Selection.Find
.Text = ChrW(61538)
.Replacement.Text = ".beta."
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.WholeStory
Selection.Font.Name = "Times New Roman"
-- modified at 16:08 Wednesday 9th August, 2006
|
|
|
|
|
Can someone please help me.
If I right click on a web page I can view source.
Is there a way to do this via code?
Example: FileOpen(1, WebPage, OpenMode.Input)
So basically it opens the web page as a text file. That way I can simply search through the text and pull out the information (using code).
Any help at all would be greatly appreciated. If it's not clear what I'm asking, please please tell me so I can make it a clearer
Thankyou
Grags_1977
Graham Maddocks
-- modified at 16:11 Wednesday 9th August, 2006
|
|
|
|
|
Hello,
Does anyone out there know how to update the text value of a subitem of a listview and refresh the list to show the changes?
the code I have is:
<br />
Me.listview.SelectedItems(0).SubItems.Item(1).Text = "Something"<br />
Me.listview.Invalidate()<br />
Me.listview.Refresh()<br />
Me.listview.Update()<br />
The setting of the text works, but the invalidate, refresh and update don't seem to update the text displayed to the user. THank you
eatwork
|
|
|
|
|
How do I code an emailing function in VB whereby the email is sent from a chosen/custom home address?
-- modified at 14:25 Wednesday 9th August, 2006
Nothing lasts but nothing is lost
|
|
|
|