|
This bit of code seemed to work for me. (I use a PrintDialog control to allow the user to select which printer they want. And again, I am assuming you use Visual Studio 2005.)
Select Case PrintDialog1.ShowDialog
Case Windows.Forms.DialogResult.OK
ProductionWorksheet1.PrintOptions.PrinterName = PrintDialog1.PrinterSettings.PrinterName
ProductionWorksheet1.PrintToPrinter(1, False, 1, 1)
End Select
-- modified at 9:05 Thursday 8th June, 2006
ProductionWorksheet1 is the name of my ReportDocument object which is found in the toolbox under the Crystal Reports section.
|
|
|
|
|
Hi
you can use the printOut command of the report.
i.e.
on the click event of the print button....
CrystalReport1.printOut false
the parameter false is used to diable user prompt. the other parameters are self explaining.
(Note: I am using crsytal reports 9 and VB.6)
Bye
|
|
|
|
|
VB.net / sql
myrow = DS.Tables("psrec").Rows(0) '1 record - 24 fields
Dim myIntArray(24) As Integer
For i = 0 To 23
myIntArray(i) = myrow(i)
Next
Array.Sort(myIntArray)
maxunits = myIntArray(24)
wat leaves me stumped is that since the array starts from 0, it should end at 23. However, the maxvalue can be found at myIntArray(24). when i print the array using the code,
For i = 0 To 23
Console.WriteLine(myIntArray(i))
Next
I always get 0 for myIntArray(0) for every record and the actual values are displayed from myIntArray(1). Therefore, one value is missed since the array prints till myIntArray(23). The last value is at myIntArray(24).
Can you explain this to me...
With Best Regards,
Mayur
|
|
|
|
|
Since you have
Dim myIntArray(24) As Integer<br />
For i = 0 To 23<br />
myIntArray(i) = myrow(i)<br />
Next
you never set the last value in the array, value myIntArray(24)
That is the value which is missed?
However, I would think the array should end at myIntArray(23)
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
mayhem_rules wrote: Dim myIntArray(24) As Integer
This is an array of 25 items. To declare an array of 24 items you use:
Dim myIntArray(23) As Integer
The number you supply when declaring an array is not the number of items, but the highest index to be used.
I think that there are quite some VB programmers out there who constantly declares arrays that contain one too many items and never realise it, becase it seldom causes any errors.
---
b { font-weight: normal; }
|
|
|
|
|
Thnk u very much...
With Best Regards,
Mayur
|
|
|
|
|
Hi 2 all
Please tell me the complete procedure to create a report using Crystal Reports in VB.NET.
Thanx in advance for helping me out...
Regards,
Arfan Qadir
|
|
|
|
|
try this: http://msdn2.microsoft.com/en-us/library/ms227594.aspx
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|
|
It's in C# but the idea is the same.
ReportDocument doc = (ReportDocument)crystalReportViewer.ReportSource;
doc.PrintOptions.PrinterName = "Your Printer Name";
doc.PrintToPrinter(1, false, 0, 0);
|
|
|
|
|
I want to use unicode in my application. I am using Microsoft Forms 2.0 controls. With the help of that I am able to display the unicode in textbox control but typing is shows all "?".
Can anybody help me in that?
Padma Gahlot
|
|
|
|
|
hi all,
I was trying to implment this new thing but got stuck.
I have a nested grid and within the child grid , i have to get the date from the user.
I tried using a popup calendar control on the click of a button next to the textbox and it works fine, i.e it shows the calendar on a new form.
But the problem is , i am not able to get the control id of the button that fired the popup so that i could display the date within the selected textbox.
Can some one help me by sending the code.
Thanks
|
|
|
|
|
how can i get the windows directory path path using vbscript. Is it possible to so it without using API calls.
|
|
|
|
|
|
how to rename a txt file
i am able to file, Create, Delete ,,
but how to rename a txt file
VB.NET
|
|
|
|
|
File.Move("C:\Dir1\SomeFile.txt", "C:\Dir1\RenamedFileName.txt")
|
|
|
|
|
Thanks for ur responce
I am vc++ programmer new to .net
i did the same but
I am getting exception
The process cannot access the file because it is being used by another process...
this is the code
oFile1.Delete("C:\WINDOWS\Doctors.txt")
System.IO.File.Move("C:\Windows\tempdoc.txt", "C:\Windows\Doctors1.txt")
'oFile1.Move("c:\Windows\tempdoc.txt", "C:\Windows\Doctors1.txt")
even the both r giving the samte error
Can you Please Advice me
|
|
|
|
|
If you have a reference to the file, you will have to call Dispose on it before you can rename/overwrite it.
Also, please avoid using SMS Speak in the forums.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
can u pls give me some example ,
delete file "a.txt"
i need to rename a file rename "b.txt" as "a.txt",
or
overwite "a.txt" with "a.txt"
oFile1.Delete("C:\WINDOWS\Doctors.txt")
System.IO.File.Move("C:\Windows\tempdoc.txt", "C:\Windows\Doctors.txt")
oFile1.Move
-- modified at 5:52 Wednesday 7th June, 2006
|
|
|
|
|
ptr_Electron wrote: can u pls
Can you please use full sentences in the forum, in oppose to SMS Speak.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
This code works fine for me..
System.IO.File.Move("C:\Windows\tempdoc.txt", "C:\Windows\Doctors1.txt")
'The process cannot access the file because it is being used by another process' can be caused either
a. tempdoc.txt is opened by some other application.
b. tempdoc.txt is still open by your application and failed to close.
|
|
|
|
|
Thanks u My dear Friend
it my mistake!,
I had not closed the file in overlook, and breaking my head from few hours
Thanks a Lot
Have a Nice day!
Bye
Understanding comes form failures
Sucesses comes form Understanding failures
-- modified at 5:59 Wednesday 7th June, 2006
|
|
|
|
|
I need to find out which day does a date belong to,
in
VB. Is there anyway where I could input a date and know the which day it
is or could I know which date is the next Monday from today
bharath.s
|
|
|
|
|
To find day of the week, you may use
WeekdayName(Weekday(Now))
|
|
|
|
|
Hello friends ,
i am creating a file file and adding a structure in that
code--> '''setting_rec_ip==> structure name
Open fileName& ".Tpl" For Random As #1 Len = Len(setting_rec_ip)
Put #1, 1, setting_rec_ip
Close #1
-->
the file has extension .Tpl.
And while openning the file-->
Open fileName For Random As #1 Len = Len(setting_rec_op)
Get #1, 1, setting_rec_op
Close #1
--- the problem is that if any body created a .Tpl file from textpad, that file is also get opened and and cause error!!!!
I want to create a file which has unique Header information.
plz tell me how to create such a file
hoppin best from u!
Thanks in advance!!!
Rahul here
|
|
|
|
|
Hi, I have design my own database application in Ms access with my computer screen resolution of 800 * 600. But when i change my screen resolution to 1024 * 768, I found that my database application control (button, list box...) seem too small and the form border do not fit with the screen anymore. Now I try to find the code to change the form size and control size to fit the screen resolution when I change it. Does anyone has any comment, resource or a sample code?
|
|
|
|