|
Hi,
I need to print Receipt(Bill) in VB.Net application. I created that Receipt using crystal report wizard and I put report name as myBill.rpt. My application has "Print" button. I need to print that receipt directly after clicking that "Print" button without using Crystal Report Viewer tool.
Is it possible? What are the coding I'll add to that "Print" button. Any one can help me, pls send me some sample code ?
Regards
Kusal
|
|
|
|
|
Kusal wrote: Is it possible? What are the coding I'll add to that "Print" button. Any one can help me, pls send me some sample code ?
Off course ,possible..
try this code in Print button's Click event
Dim myRpt as myBill<br />
myRpt .Refresh()<br />
myRpt .PrintOptions.PrinterName = "Path of the printer"<br />
myRpt .PrintOptions.PaperSource = "Printer tray"<br />
myRpt .PrintToPrinter(1, False, 1, 1)
hope it will work
Tirtha
Miles to go before I sleep
|
|
|
|
|
Dear Tirtha
Many Thanks
Regards
Kusal
|
|
|
|
|
can some one help me with a problem Im having with generating soudn frequencies?
|
|
|
|
|
Do you want to describe the problem or should we just guess?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I use vb.net to create project new website and it run completely in my client browser but when I move that project to my server and run in intranet the error is "Unrecognized configuration section 'connectionStrings'" in web.config (Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300 ) I don't know how to correct it. May I must install the other version of .NET Framework or not?
Thank you for your suggestion.
Kitty
|
|
|
|
|
If your website is in .net 2.0 you need to have the 2.0 .net framework loaded and you need to set the properties of the site to be the .net 2.0 framework. Right click the web site select properties then go to the asp.net tab and make sure the 2.0 framework is selected.
Hope that helps.
Ben
|
|
|
|
|
No.You must create your ConnectionString on the server
|
|
|
|
|
I've tried to create website on server,but it still error. Yesterday I installed dot net framework version 2 on my server and restart the server but I observe that in the footnote of the error page it still show "Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300 " not show version 2 (version 2 is already show in admin page in control panel) Is it the cause of this errors?
Kitty
|
|
|
|
|
Now. I can manage my old trouble, the error of connecttionstring is passed and the footer show ->--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 .....ready but the next problem is <authentication mode="Windows"> I don,t know how to correct it.
Kitty
|
|
|
|
|
Heya, looking for some help with a tic tac toe program.
easy stuff for someone that knows how to program.
If u beeleive u can help me, reply and i will add you to my msn for details thanks.
|
|
|
|
|
I recommend doing your own homework. It tends to make it easier for you to do future homework, if you've built the foundation that your teacher intended.
If you do need to ask for homework help, try to make if of the sort where you ask a specific question and post code, not of the sort where you describe your homework broadly and show no sign of having given it any thought yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
i m using multiple group boxes n multiple check boxes within them..
i hav made columns in data grid acc. to the name of group boxes,
can anybody please tell me how can i show the text that i checked in the group box in the data grid with comma's b\w them
please help
|
|
|
|
|
When I open the web page "http://finance.yahoo.com/q/os?s=qqqq&m=2007-04" and view the source in
Internet Explorer with Notepad, the text I am looking for looks like
class="yfnc_h" align="right"><b><span id="yfs_l10_qavdf.x">11.67<
but when I use
RichTextBox1.Text = Inet1.OpenURL("http://finance.yahoo.com/q/os?s=qqqq&m=2007-04")
it looks like
class="yfnc_h" align="right"><b>11.67<
in the RichTextBox.
What happened to the
<span id="yfs_l10_qavdf.x"
Thanks in advance
HHP
|
|
|
|
|
consider there r two group boxes n five check boxes within them.
how to do coding for it???
n also keep in mind that i hav to display the result in data grid
|
|
|
|
|
abbss.gaurav wrote: consider there r two group boxes n five check boxes within them.
how to do coding for it???
Coding for what? You haven't metioned what you want this code to do.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hello,
VS 2005
Strange problem with my visual studio.
I have typed datasets in the designer. I have table adapters that i have dragged from the server explorer. I have used these for the last couple of month. I have added queries, stored procedures, added and deleted fields in the table adapters.
Now, I added an extra column to one of my tables in sql server 2005. I right clicked the relevant table adapter and clicked configure, and included the extra column.
I build the program, but the changes to the table adapter does not reflect in the code. When I do the following: tableAdapter.insert() the extra column has not been included.
I tried this with another table adapter in the dataset designer by adding a new field. The same problem.
I used rebuild, i have deleted the table adapter and added a new one. I have restarted VS, and also restarted the computer. I have also opened the project on another machine. I have deleted the table adapter from the form designer and added a new one from the components tab. And still the same problem.
When I preview the data, the extra column is there. But not when I use it in code.
Can anyone please tell if they know about this problem and is there a way to solve it.
Many thanks if you can.
|
|
|
|
|
Hi Steve,
I have experienced a somewhat similar problem with datasets in VS 2003. Although I am still not sure how or why it happened, I managed to solve the problem by creating a new dataset with a another name and changing all references to the old dataset to the new one. So in your case for example you could delete the existing tableAdapter or keep it (same difference), and create a new one with the name tableAdapter1. Then just roam through your code and add a 1 where necessary.
Hope it helps,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
I've been trying to get an application that can compile code at runtime, then save it as a .exe file.
So basically what I did was go on MSDN, 'steal' some code (yeah, I know I shouldn't...) that compiled VB and try to change it so it could also save it.
Public Class Form1<br />
<br />
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
CodeEmitter.RunCode("Microsoft.VisualBasic.MsgBox(" & """" & "Hello World" & """" & ")")<br />
<br />
End Sub<br />
End Class<br />
Class CodeEmitter<br />
<br />
Shared Sub RunCode(ByVal code As String)<br />
<br />
Dim cmplrParms As New CodeDom.Compiler.CompilerParameters<br />
<br />
cmplrParms.GenerateExecutable = True<br />
<br />
cmplrParms.OutputAssembly = "C:/VBCompile.exe"<br />
<br />
cmplrParms.TreatWarningsAsErrors = False<br />
<br />
cmplrParms.WarningLevel = 4<br />
<br />
cmplrParms.ReferencedAssemblies.AddRange(New String() {"System.dll", "Microsoft.VisualBasic.dll"})<br />
<br />
code = String.Format("Public NotInheritable Class EmittedClass{0}Public Shared Sub DoWork{0}{1}{0}End Sub{0}End Class", Environment.NewLine, code)<br />
Dim pvdr As New VBCodeProvider<br />
<br />
Dim rslts As CodeDom.Compiler.CompilerResults = pvdr.CompileAssemblyFromSource(cmplrParms, code)<br />
<br />
MsgBox("Path: " & rslts.PathToAssembly)<br />
<br />
Dim assmbly As Reflection.Assembly = rslts.CompiledAssembly<br />
<br />
Dim t As Type = assmbly.GetType("EmittedClass")<br />
<br />
t.InvokeMember("DoWork", Reflection.BindingFlags.InvokeMethod Or Reflection.BindingFlags.Public Or Reflection.BindingFlags.Static, _<br />
Nothing, Nothing, Nothing)<br />
<br />
End Sub<br />
<br />
End Class
The original code worked until I changed
cmplrParms.GenerateInMemory = True
to
cmplrParms.GenerateExecutable = True<br />
<br />
cmplrParms.OutputAssembly = "C:/VBCompile.exe"
Now I get an error FileNotFoundException at
Dim assmbly As Reflection.Assembly = rslts.CompiledAssembly because it turns out that nothing was ever compiled to C:\ in the first place!
Thanks in advance for any help!
|
|
|
|
|
I thought Windows used baclward slashes to separate directories.
ROFLOLMFAO
|
|
|
|
|
Tried that
Doesn't work
EDIT: I found a fix for it. Thanks for trying to help!
-- modified at 7:19 Monday 2nd April, 2007
|
|
|
|
|
Sir/madam.
I am facing a problem i button text.
The problem is i am passing a button control as an argument
like following is my form
i have a function there and in the function signatures i am passing a button control as a argument.
The problem is i am not getting the text of the button in the myclass class.
the object b shows t.text is blank("")
class form1
private sub fun()
dim obj as new myclass
obj.funct(Button1)
'Button1 is name of the button in the form.
end sub
end class
class myclass
public sub funct(byval b as button)
messagebox.show(b.text)
end sub
end class
Please help.
I am using vb.net 2003 Window Application.
Thanks and regards
Pankaj
|
|
|
|
|
Myclass is a reserved word.
Private Sub fun()
Dim obj As New class1
obj.funct(Button1)
'Button1 is name of the button in the form.
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
fun()
End Sub
End Class
Class class1
Public Sub funct(ByVal b As Button)
MessageBox.Show(b.Text)
End Sub
End Class
|
|
|
|
|
could anyone help me please?
I wanna make 3D graphic with VB.NET.
I wanna rotate 360 degree that 3D graphic images.
phowarso
|
|
|
|