|
Hi,
Thanks for the Reply...
I have this line of code in my page footer: =ReportItems!Dealer1.value
My report is in a matrix, and when produced it may produce 30 lines. 20 Lines are on page 1 and 10 lines on page 2. When I do a print preview, I only see the line =ReportItems!Dealer1.value on the very last page.
How can I see that line on all pages?
Thanks,
Rashar
|
|
|
|
|
Hello!
okay... can u plz tell me where u have placed that text box on ur report. Secondly can u plz tell that where r u assigning the value to text box in ur code(in which procedure).
Thanks,
Noshaba
|
|
|
|
|
I actually figured it out.
I created a group field textBox1 in my matrix. Then in the footer, I created a textbox and assigned the expression ReportItems!textbox1.value to the new textbox in the footer.
Thanks,
Rashar
|
|
|
|
|
hi;
i wish to give me right way in how to use print fucntion and preview print fucntion,... also how to use scan function...
i read ebbok but i didnot get my goal ..
or to use this fucntion..
please..
mohammad bassam yahya
|
|
|
|
|
use window.print() in javascript
Divya Rathi
|
|
|
|
|
Hi. How can I set my application to create a folder using the administrator account (username, password). Note that the hard disk can be accessed only with an administrator account. I want that the administrator enter its username and account, then save it, and my application will be run with windows startup and access the hard disk.
my application will be run on windows 2003 server and I should not force the administrator to login every restart... I want that my application internally use the account...
I'm using vb2005 express...
OmarMallat
-- modified at 15:04 Monday 27th February, 2006
|
|
|
|
|
2 Questins
How do I update my access table with changes from 1 field only?
Is there an easy way to post the whole datagrid to an access table or do I need to loop through every row in the datagrid table.
|
|
|
|
|
to update ur table with one field u can do as follows:
dim con as new adodb.connection
dim rs as new adodb.recordset
con.open connection_string
rs.open "Select * from table1 where field1 = '100'" , con
if rs.eof = false then
rs.movefirst
rs.fields("field1") = txt1.text
rs.update
else
msgbox "record not found"
end if
|
|
|
|
|
I have a multithreaded program that draws stock market charts on as many as eight instances of a form.
When I create instances of this form by clicking a menu item, they come up and are responsive to the user and the other threads. If I create a new instance from a thread other than the UI the form comes up but is not responsive to the user or the other threads.
How does one do this?
RCarey
|
|
|
|
|
The form won't work becuase it's not on the same thread as the application's message pump. Keystrokes and mouse clicks comming into the application have no way of getting to the form because they can't cros thread boundries.
You have to modify your code so the form is created by the UI thread. You can still update the form from a background thread if you call BeginInvoke on the methods to need to call on the form.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That's where I am now. The arrival of a packet sets the text of a menu item on the main form to the stock's symbol and beeps. I have to click the menu item to create a new form. this works but when events are fast this is too slow.
I tried changing the text of a label on the main form which throws an event. An event handles creates the form but it is still not responsive to the user.
RCarey
|
|
|
|
|
RJGCarey wrote: tried changing the text of a label on the main form which throws an event
Throws a what?? Are you saying it throws an Exception? You can't modify a control from anything other that the thread it was created on. Outside of that, you have to use BeginInvoke.
RJGCarey wrote: An event handles creates the form but it is still not responsive to the user.
Make absolutely SURE the correct thread is executing the code to create the new Form instance. You'll probably have to put together a method to create the Form instance and use BeginInvoke to call it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm just starting to get into the 2005 version of Visual Studio. I'm writing an application that will open Excel and pull in a CSV file for formatting.
I'm just having trouble opening it. In 2003, I would use the reference for Excel 11.0 Object Library and use the following code
Dim xlApp As Excel.Application<br />
Dim xlBook As Excel.Workbook<br />
Dim xlSheet As Excel.Worksheet
Now in 2005 I think I'm supposed to use the reference for Microsoft.Office.Tools.Excel. When I use the code above, it doesn't recognize Application?
Confused? Can someone point me in the right direction?
Lost in the vast sea of .NET
|
|
|
|
|
I'm attempting to convert a .zip file to a string in order to pass as a parameter to a network service (see below code). The streamreader works except that it seems to ignore "non-text" characters and therefore the .zip file is then corrupt/invalid once received by the service.
Dim outstring As String = ""
Try
Dim sr As StreamReader = New StreamReader(INPATH, True)
outstring = sr.ReadToEnd()
sr.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Application.Exit()
End Try
return outstring
Should I be using a different method to convert the source to a string?
|
|
|
|
|
You are instructing the stream reader to detect the encoding of the file, but as the file is not a text file, there is no encoding. It will probably revert to ASCII encoding, resulting in ignoring all non-ASCII values, e.g. every byte with a value higher than 127.
Read the file as a binary file, returning the result as an array of bytes.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks - I can't see a way to read the file into an array using the binary reader though (see below snippet). Any assistance you could provide (code snippets) would be greatly appreciated.
thanks again.
fs = New FileStream(inputfilename, _
FileMode.Open, FileAccess.Read)
Dim r As New BinaryReader(fs)
For i = 0 To r.BaseStream.Length
'outstring = outstring + r.ReadString()
Next i
-- modified at 12:03 Monday 27th February, 2006
|
|
|
|
|
Just read the bytes from the BinaryReader:
byte[] byffer = r.ReadBytes(int.MaxValue);
---
b { font-weight: normal; }
|
|
|
|
|
again , thanks for the assistance. Please excuse my lack of understanding here, but I am a novice with vb.net. I still don't know how to convert this array into a data string (to send as a parameter). I would need to send the string as it appears when you open it with notepad.exe.
Thanks again.
|
|
|
|
|
That depends on how you are sending the data.
If you want to convert the data into a string, you will have to know how the string is converted when it's sent. You will have to use the same encoding to convert the data into a string, as the encoding that is used when the string is converted to bytes when sending it.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks a million! FYI, the encoding of a PKZIP file is apparently UTF8
Here's my code:
Dim ra As Array
fs = New FileStream(inputfilename, FileMode.Open, FileAccess.Read)
Dim r As New System.IO.BinaryReader(fs, Encoding.ASCII)
ra = r.ReadBytes(r.BaseStream.Length)
Dim [ASCII] As Encoding = Encoding.ASCII
Dim [UTF8] As Encoding = Encoding.UTF8
Dim asciiBytes As Byte() = Encoding.Convert([ASCII], [UTF8], ra)
Dim asciiChars(ascii.GetCharCount(asciiBytes, 0, asciiBytes.Length)) As Char
ascii.GetChars(asciiBytes, 0, asciiBytes.Length, asciiChars, 0)
Dim asciiString As New String(asciiChars)
Return asciistring
|
|
|
|
|
pbaggett wrote: FYI, the encoding of a PKZIP file is apparently UTF8
No, it's definitely not. The PKZIP format is a binary format, not a text format, so it doesn't have any encoding. Also, the PKZIP format (1989) predates the Uncode standard (1991).
What you have done is to interpret the binary data as ASCII (which it isn't) and converted it to Unicode. The ASCII encoding only support character codes 0-127, so if you successfully decoded the file, you were just lucky to have a file where all the bytes happened to be in that range. You must have used a very small file, for this is not normal for compressed files.
The bytes that you handled as ASCII and converted to Unicode is in the asciiBytes array (so it's not at all ASCII bytes, but Unicode bytes). Then you decode the Uncode data as if it was ASCII and place it in the asciiChars array. The only reason this doesn't turn the data into total garbage, is that you were lucky again, and none of the "characters" did become a multi-byte code in Unicode.
Sorry to say it, but your code does at best virtually nothing at all. When used with most compressed files it will totally mangle the data, though.
Back to the drawing board. You still have to find out how the string that you send will be decoded.
---
b { font-weight: normal; }
|
|
|
|
|
I have now tested this code with 30 different zip files ranging in size from 1kb to 1gb and containing 1 to 100 compressed files. Each test run produced successful results for what I am attempting to accomplish - which is to convert the zip file contents into a single text string to be passed as a parameter to another process. I don't think this can be attributed to "luck".
That being said, this process is only designed to handle zip files with simple compressed ascii text files. Perhaps this is why the code does not produce total garbage.
Again, I appreciate your assistance.
|
|
|
|
|
I tested your method with one zip file, and it fails.
I examined the data in asciiBytes, and all character values above 127 turns into question marks.
Are you sure that you really use the code that you showed? Have you verified that the zip files are intact after you sent them?
I reduced the code substantially by skipping the BinaryReader and the double conversion. Closing the file might be a good idea, also. It's in C#, but I think you can see the changes:
FileStream fs = File.OpenRead(filename);<br />
byte[] ra = new byte[fs.Length];<br />
fs.Read(ra, 0, ra.Length);<br />
fs.Close();<br />
string asciiString = new string(Encoding.ASCII.GetChars(ra, 0, ra.Length));
Still doesn't work, though.
---
b { font-weight: normal; }
|
|
|
|
|
It still works for me however, none of the files I am testing would ever contain ascii char values above 127. I think my code was just dumb luck. That being said, I ended up modifying the external service to handle the files in their unzipped/uncompressed state so this is no longer necessary.
Thanks again for the help. I'm still learning vb.net so I hope my questions don't seem (too) ignorant.
|
|
|
|
|
Hi All,
I want to add a text box in my windows form at run time..
and also want to get the values of these text boxes in array.........
like i have already one text box in my vb form and
in run time if i need 5 text boxes they will add and i will put data in them
and when i press the button to save the data the data will transfer in to array or directoly into the data base one by one..
Thanks in Advance..
Muhammad Nadeem.
|
|
|
|