|
Dim tReportName As String = String.Empty
Dim bCreateSchema As Boolean
Dim tSQL As String
Dim pDialog As New PrintDialog
If cboPrintTo.Text = "Printer" Then
If Not fbCrySelectPrinter(pDialog) Then
MessageBox.Show("Print Report Cancelled.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit Sub
End If
End If
Dim objReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
objReport = objcryCLTherapyPrescriptionReferralForms
tReportName = "Therapy Prescription Referral Form"
' set any passed variables
Dim iII As Integer = 0
For iII = 0 To objReport.DataDefinition.FormulaFields.Count - 1 Step 1
Select Case objReport.DataDefinition.FormulaFields(iII).Name
Case "Ref"
If optReferral.Checked Then
objReport.DataDefinition.FormulaFields(iII).Text = "'X'"
Else
objReport.DataDefinition.FormulaFields(iII).Text = "''"
End If
Case "Treatment"
If optTreatment.Checked Then
objReport.DataDefinition.FormulaFields(iII).Text = "'X'"
Else
objReport.DataDefinition.FormulaFields(iII).Text = "''"
End If
End Select
Next iII
'
'bCreateSchema = True ' ***** TESTING ONLY
Dim bResult As Boolean = False
bResult = fbCryPrintPrinter(tSQL, objReport, tReportName, cboPrintTo, pDialog, bCreateSchema)
'
Me.Cursor = Cursors.Default
If cboPrintTo.Text = "Printer" Then
MessageBox.Show("Print " & tReportName & " Complete.", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
Public Function fbCryPrintPrinter(tSQL, objReport, tReportName, cboPrintTo, pDialog, bCreateSchema)
objReport.PrintOptions.PrinterName = pDialog.PrinterSettings.PrinterName
objReport.PrintToPrinter(pDialog.PrinterSettings.Copies, False, _
pDialog.PrinterSettings.FromPage, pDialog.PrinterSettings.ToPage)
End Function
This is short hand but this is all of the code that is really related to printing.<pre></pre>
Thank you for your response.
Humble Programmer
|
|
|
|
|
programmer_vb.net_c++ wrote: objReport.PrintToPrinter(pDialog.PrinterSettings.Copies, False, _
pDialog.PrinterSettings.FromPage, pDialog.PrinterSettings.ToPage)
you don't pass the page orientation to the report (so he normally takes the one set on the report)
What I do is I use the
system.drawing.printing.printersettings and system.drawing.printing.pagesttings classes
The printerdialog box contains both of these
and the printtoprinter methode of the report accepts these
That way you pass every option set in the dialog box to the report
Hope this helps
|
|
|
|
|
I will give this a try thanks.
Humble Programmer
|
|
|
|
|
hi all,
i want to compare each character of my string variable to all characters of UTF-8 character set(i think there are near about 65000 character). and remove any character of variable which it is not in list of UTF -8 Character set.
anybody have idea that how can i perform this operation efficiently ?
|
|
|
|
|
Your question doesn't make sense. UTF-8 is not a character set, it's an encoding. Read[^]
|
|
|
|
|
sir, whether i can check if the character of any string variable is not in UTF-8 format ?
|
|
|
|
|
OK, you're not getting it. You don't check a String to see if it's encoded using UTF-8. You can check a stream of bytes though. See GetDecoder[^] for an example.
|
|
|
|
|
Rupesh Kumar Swami wrote: i want to compare each character of my string variable to all characters of UTF-8 character set
As already have been pointed out in the thread, UTF-8 is not a character set.
Rupesh Kumar Swami wrote: UTF-8 character set(i think there are near about 65000 character)
The Unicode character set contains more than 100 000 chcaracters.
Rupesh Kumar Swami wrote: and remove any character of variable which it is not in list of UTF -8 Character set.
Here's a method that does that for you:
Public Function RemoveNonUnicodeCharacers(ByVal s As String) As String
Return s
End Function
Strings in .NET are Uncode. UTF-8 is a way to represent unicode characters as a binary stream. So, any character that you have in a string can be encoded into an UTF-8 stream.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thank sir, for your information
one more question
How can find ascii equivalent of string which is made of utf-8 encoding? Since this is 8 bit
|
|
|
|
|
Strings are not encoded at all. An array of bytes using a certain encoding represents a string of text. It's kind of like a .ZIP file. A ZIP an array of bytes that encodes a file resulting in a compressed version of the file.
What's the point of all this?? Why are you insisting on doing this?
|
|
|
|
|
I would really like to be able to write text out to a HD44780 lcd display module like this example written in c http://www.codeproject.com/KB/cs/cspplcds.aspx[^] . I not sure where to start really , if anyone has done this could you be kind and post a sample code , ect.
cheers
luke
|
|
|
|
|
What aout compiling that code into a DLL and using it in VB?
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein
I look at Microsoft, and turn to my poster on the wall saying: "Bang head here in case of stress".
|
|
|
|
|
Hi
There are 6 Link label on my form in 2 rows. Three label in each rows as following :
--------------------------------------------------------------------
CONTROL 1 CONTROL 2 CONTROL 3
CONTROL 4 CONTROL 5 CONTROL 6
---------------------------------------------------------------------
I write the procedure for Control1,Conmtrol2 and controll3 which is, if user press Down keys on this control then focus moves on related down control(Control4,Control5 and Control6). It procedure works well but there is a little issue. When i press down keys then it goes on Next control and after that it goes to down control. Mean If i press down key on CONTROL 1 then it first give to CONTROL 2(for some Milli second) and then it moves to CONTROL 4
same issue for Control4,Conmtrol5 and controll6, when i press up key
Please suggest.
Thanx
Khatri Mitesh
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|
|
You may need to change the tab order on the properties window.
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein
I look at Microsoft, and turn to my poster on the wall saying: "Bang head here in case of stress".
|
|
|
|
|
Hi
Thanx for reply
but my problem is different when i press right arrow key then second control is got focused and when i press down arrow key the control 4 is got focused.
Please suggest.
Thanx
Khatri Mitesh
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|
|
Do you mean, for example, that when you press down on control 1 it takes you to control 4, and when you press down on control 2 it also takes you to control 4?
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein
I look at Microsoft, and turn to my poster on the wall saying: "Bang head here in case of stress".
|
|
|
|
|
No I want when i am on control 1 and press down arrow key then it goes to control 4 and press right arrow key it goes to control2.
means movement according to my key.
Thanx
Khatri Mitesh
~Khatri Mitesh
khatrimitesh@hotmail.com
Bikaner (Rajasthan)
INDIA
|
|
|
|
|
Surely all you need is this bit of code in the control 1 key down event:
If Keys.Down Then<br />
Control4.Select()<br />
End If
And in the control 4 key down event:
If Keys.Down Then
Control2.Select()
End If
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein
I look at Microsoft, and turn to my poster on the wall saying: "Bang head here in case of stress".
|
|
|
|
|
Hello,
Is it possible to use control of another exe.and How can it possible.
Please help.
I want to delete the process from taskmanager.So how can i access the
control of Taskmanager
Thanks
<httf>mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Im not going to say anything.
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein
I look at Microsoft, and turn to my poster on the wall saying: "Bang head here in case of stress".
|
|
|
|
|
You don't use Task Manager to do this. You use the Process class. I suggest reading up on that class and its Kill method.
|
|
|
|
|
My purpose is not killing the process. I want to hide the process from task manager.
Thanks
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
|
There are many softwares(Like : Keylogger,Virus,Antivirus,Windows Processes,etc) which are not shows in task manager.
mailto:anubhava.prodata@gmail.com
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
Anu..... S/W Developer wrote: There are many softwares(Like : Keylogger,Virus,Antivirus,Windows Processes,etc) which are not shows in task manager.
Actually, they do show in the Task Manager. You just have to know where, and how, to look. Remember seeing a bunch of svchost.exe processes?? Guess where all those missing processes are being hosted...
|
|
|
|