|
hello dear all the best programmer,
this is my first posting or maybe a question but hopely although i am the beginner and newbie in vb .net you would like to help for solving my problem.
i get some problem when i was making a report application with crystal report in vb.net using sql server database. i make simple application that consist one button "show report" and one crystal report viwer. i put code to the button "show report" :
<pre lang="vb">Imports CrystalDecisions.CrystalReports.Engine
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim cryRpt As New ReportDocument
cryRpt.Load("Data Source=(localdb)\Projects;Initial Catalog=crystaldb;Integrated Security=True")
CrystalReportViewer1.ReportSource = cryRpt
CrystalReportViewer1.Refresh()
End Sub
End Class</pre>
and when i run the program, actually there is no problem but why i must first ly to do an action login. the action login consist of some field , they are server name, databse , id and pasword. the server name was automatically filled and the database field was empty and but i can't fill in it. and for id and password that were empty to and i must and able to fill that.
for the id and pasword field, i don't know what thing i must to fill in that field. hopely anybody can understand my question and problem clearly and as soon as possible would like to help me.
thanks and best regards,
toni firnandes.
|
|
|
|
|
Edit your post and move the PRE tags so they only surround your code block, NOT your text. Right now, your post text is so wide that nobody can read it without copying the entire post into notepad.
|
|
|
|
|
Hi!
I have this Visual Basic project with textboxes. I don't want users to be able to type in the textboxes, but only use the USB-barcodescanner instead.
I've tried several keypress/keydown options, but every time the keyboard is blocked, there's also no input possible with the scanner...
Any pointers? Anyone?
Thanks!
Martijn
|
|
|
|
|
Sounds like the scanner is using "keyboard wedge" data transfer where it places the data in the same buffer as the keyboard, hence if the keyboard is blocked, then the scanner will be blocked.
What you really need is the scanner to send it's data to something like the serial port or USB port.
Your program would make all of the input text boxes read-only and you would monitor the port for incoming data and populate the necessary text boxes.
Basically you want to get away from keyboard wedge and see if the scanner vendor provides a library to access the device via some USB port.
Good luck.
|
|
|
|
|
Thanks for your quick reply!
Wow, that's way to complicated for me!
I'm just a beginner and I actually also found messages similar to your answer by using Google.
I was hoping there was an easier way to accomplish this...
Thanks anyway! I'll just have to tell my users to just stay away from the keyboard
|
|
|
|
|
And if the scanner fails, what can the user do then? The keyboard is a good back-up solution for such cases.
|
|
|
|
|
I was actually going to create a button to activate manual input.
I will look in to your solution, but later...
First i need to get everything working, so we can start using the scanner. I'll fine-tune later.
Thanks for your help!
Greetz
|
|
|
|
|
Hi all. Im having a problem with losing data in a class but im unsure as to exactly how its happening. I post here an example of the parts of the code i am using that are causing a problem with an explanation of where i am seeing the problem(s) and hopefully someone will be able to point out what i am doing wrong.
line 1 public ndlist as list (of data)
line 2 public dylist as list (of days)
line 3
line 4
line 5 public sub main_routine()
line 6
line 7 ndlist = new list (of data)
line 8 dylist = new list (of days)
line 9
line 10 for a = 1 to something
line 11 do
line 12
line 13 ndlist.add(new data("blahblah"))
line 14
line 15
line 16 loop until something
line 17
line 18 dylist.add(new days(a,b,ndlist))
line 19 ndlist.clear
line 20
line 21 next a
line 22
line 23 for each dy as days in dylist
line 24
line 25 next
line 26
line 27 end sub
line 28
line 29
line 30
line 31
line 32
line 33 public class days
line 34
line 35 public day_data as list(of data)
line 36
line 37 public sub new(byval a as integer, byval b as integer,byval ddata as list(of data))
line 38
line 39 day_data = ddata
line 40
line 41 end sub
line 42
line 43 end class
line 44
line 45 public class data
line 46
line 47 public rwdata(1500)
line 48 public id as string
line 49
line 50 public sub new(byval str as string)
line 51
line 52 id = str
line 53
line 54 end sub
line 55
line 56 end class
So you can see basically i have a list of days containing a list of data for each day. I use the data class in lists elsewhere in the project and thought it would be easier to re-use it for the day class. What i am seeing is between lines 10 and 21 the program operates normally. If i insert a breakpoint in vs2010 on line 18 i can watch the dylist add items to its collection and when i drill down the elements of the collections i can see the data where i expect it to be. For reference the data is at
dylist.item(x).day_data.item(y).rwdata(z)
The problem comes when i exit the for/next loop for further processing. When i get to line 23 and i access
dy.item(x).day_data.item(y).rwdata(z)
it contains nothing as do all the the other elements in the dylist collection and i have no idea why?
The code runs all at once and there is no background threads or anything else happening in the background when i run the code. I am firing it off a button just now for testing.
Any ideas?
btw - great website! i use this all the time for little snippets of info for my coding but have never had to resort to posting here yet. Thanks for all the help ive utilised from your site so far
modified 12-Mar-13 9:09am.
|
|
|
|
|
What do you reckon might be happening here with ndlist ?
line 18 dylist.add(new days(a,b,ndlist))
line 19 ndlist.clear
Try this:
dylist = new list (of days)
for a = 1 to something
ndlist = new list (of data)
do
ndlist.add(new data("blahblah"))
' do something to ndlist
loop until something
dylist.add(new days(a,b,ndlist))
next a
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
modified 12-Mar-13 9:09am.
|
|
|
|
|
I figured it out just now. Seems im actually passing the reference of ndlist to the class contructor so (as you pointed out) when i clear the list i also clear all of the data in all of the instances of the dylist class members. Very confusing
What i actually want to do is initialise the list type for the instance of the class within its contructor and then recursivley add the list members to each class instance separately. Using a "work" list and passing it as a parameter doesnt work
My thinking was that a list would be passed the same way as the values in an array are passed, so you could modify the source list afterwards without affecting your previous destination lists.
Im going to blame monday for this one...
|
|
|
|
|
I looking into doing the following....
Create CSV files via VB.Net and then add these files to 7 zip manager. I want to do this automatically rather than getting the users to manually add these files to 7 zip manager. Before I start doing this....
1. Can this be done
2. If so how and is there any good examples I could use?
Thanks in advance.
|
|
|
|
|
|
Thanks for getting back and providing me with the information. As below, this should be enough for me to work something out.
|
|
|
|
|
|
Thanks for getting back and providing me with the information. This should be enough for me to work something out.
|
|
|
|
|
I want a simple program using "File Mapping" for communication betrween two processes.............the commncation can be either using dialouge or console communications ............Thank you please help me out its urgent.Am writing code in VB 6.0
|
|
|
|
|
This forum will not supply you with a fully functioning solution.
You must make an attempt to solve your problem, then post a question where you are stuck.
This sounds like a homework assignment, so you need to make an effort towards a solution.
Start building your program, then come back with specific questions.
|
|
|
|
|
- Your subject is non-descriptive, not helpful at all.
- It's not urgent, we're volunteers.
- VB6 is deprecated, it's dead. No new software is written in it, it's no longer sold, it's not supported.
- We don't supply programs/complete source code. It's a forum for developers, doing development.
FWIW; there's a FileSystemWatcher in .NET that easy to use, and VB.NET is free to download and use. If one app is launched from the other, I'd suggest using stdio, reading and writing to the console-window. If they're on separate computers, look into WCF.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have four textboxes. Each one is filled by selecting a date from the monthcalendar (VS win form). While I handled most of the problems, such as a dbnull, I discovered this little "oops". I use the same type of handle for each daterangeevetargs:
Private Sub MonthCalendarPO_DateSelected(sender As Object, e As DateRangeEventArgs) Handles MonthCalendarPO.DateSelected
JobPOdateTextBox.Text = e.Start.ToShortDateString
MonthCalendarPO.Visible = False
End Sub
A click of a picture box to hide and show the calendar:
Private Sub PictureBoxPO_Click(sender As Object, e As EventArgs) Handles PictureBoxPO.Click
If MonthCalendarPO.Visible = False Then
MonthCalendarPO.Visible = True
Else
MonthCalendarPO.Visible = False
End If
End Sub
I removed the custom validation too. So, I will not post. The problem exists even without checking the date format.
Each date is filled and visible in a textbox. Yet, when clicking the "save" button, only one date will remain in a textbox and save on submit changes (dates are bound to a bindingsource). As I have read and and read some more, I feel it must be the daterangeeventargs.
Worth noting, if you manually enter the date into the textboxes, all four dates will save on submit changes. For now, I have resolved to a submit changes to the database after each date selection. This is certainly not ideal or a good practice.
Bindingsource is filled as system.linq.iqueryable(of namespace.tablename). Data class is Linq2SQL.
Any ideas on why this type of behavior is experienced?
|
|
|
|
|
The handler is overwriting the data in the textbox when it is called. Change it to a concatenation;
Private Sub MonthCalendarPO_DateSelected(sender As Object, e As DateRangeEventArgs) Handles MonthCalendarPO.DateSelected
JobPOdateTextBox.Text += e.Start.ToShortDateString
MonthCalendarPO.Visible = False
End Sub
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks again. What would I do without your brain. I was not even looking at the string development in any manner. I should have known that. My languages are a little mixed up some days. Dumb newbie thing ... LOL
|
|
|
|
|
In VB6.0 Do you know the name of the control cell grid in the image above there are two lines in the header and the grid can color, see attached image. we can see in the figure, in the title (framed blue rectangle) is the 3rd day 9 was split into two lines and grid can be colored as: red, blue, ... the name of a grid control on the name?
http://www.crocko.com/E4517D1F93C34B85AC5820941DAE1FFC/chamcong.jpg[^]
|
|
|
|
|
Your question doesn't make any sense and I'm not installing a downloader from that site to see your image.
Post your image on a site like Flickr and rewrite your post so it makes sense and you might get somewhere.
Oh, and you might want to drop all VB6 development and move up to something that hasn't been dead for over 7 years now, like .NET.
|
|
|
|
|
I am trying to develop an application like TeamViewer but I don't how it would be. If anyone knows about this Please tell me.
|
|
|
|
|