Click here to Skip to main content
15,904,817 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Crystal Report Direct Print Pin
thatraja22-Jan-10 2:12
professionalthatraja22-Jan-10 2:12 
GeneralRe: Crystal Report Direct Print Pin
Girish_Sharma22-Jan-10 2:27
Girish_Sharma22-Jan-10 2:27 
GeneralRe: Crystal Report Direct Print Pin
thatraja22-Jan-10 2:39
professionalthatraja22-Jan-10 2:39 
GeneralRe: Crystal Report Direct Print Pin
Girish_Sharma23-Jan-10 1:06
Girish_Sharma23-Jan-10 1:06 
GeneralRe: Crystal Report Direct Print Pin
thatraja23-Jan-10 6:43
professionalthatraja23-Jan-10 6:43 
GeneralRe: Crystal Report Direct Print Pin
Girish_Sharma24-Jan-10 17:13
Girish_Sharma24-Jan-10 17:13 
GeneralRe: Crystal Report Direct Print Pin
thatraja24-Jan-10 21:25
professionalthatraja24-Jan-10 21:25 
GeneralRe: Crystal Report Direct Print Pin
Girish_Sharma24-Jan-10 22:08
Girish_Sharma24-Jan-10 22:08 
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ocn As New System.Data.OracleClient.OracleConnection
Dim oda As New System.Data.OracleClient.OracleDataAdapter("select empno,ename from emp", ocn)
Dim ods As New System.Data.DataSet()
ocn.ConnectionString = "Data Source=orcl;User ID=scott;Password=pw;Unicode=True"
oda.Fill(ods)
Dim rptprint As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
rptprint.Load(Server.MapPath("Reports").ToString() + "\\CrystalReport.rpt")
'TextBox1.Text = ods.Tables(0).Rows(0).Item("empno") 'This is no error
rptprint.SetDataSource(ods) 'This is no error
CrystalReportViewer1.ReportSource = rptprint 'This is error of object instantiate.
'CrystalReportViewer1.DataBind()
''rptprint.PrintOptions.PrinterName = DefaultPrinterName()
''rptprint.PrintToPrinter(1, False, 0, 0)
'TextBox1.Text = DefaultPrinterName()
rptprint.Close()
rptprint.Dispose()
ocn.Close()
ocn.Dispose()
ods.Dispose()
oda.Dispose()
'Dim host As New System.Net.IPHostEntry
'host = System.Net.Dns.GetHostEntry(Context.Request.ServerVariables("REMOTE_HOST"))
'Dim strSystemName As String = host.HostName
'Dim strPrinterName As String = "Generic / Text Only"
'rptprint.PrintOptions.PrinterName = strSystemName + "\\" + strPrinterName
End Sub
Public Shared Function DefaultPrinterName() As String
Dim oPS As New System.Drawing.Printing.PrinterSettings
Try
DefaultPrinterName = oPS.PrinterName
Catch ex As System.Exception
DefaultPrinterName = ""
Finally
oPS = Nothing
End Try
End Function
End Class

This is what i have in default.aspx.vb file. I have :
1.one crystalreportviewer control
2.one button control
3.one textbox control

I have not yet used your code, because this object instance error is frustraing me.

Regards
Girish Sharma
GeneralRe: Crystal Report Direct Print Pin
thatraja25-Jan-10 8:46
professionalthatraja25-Jan-10 8:46 
GeneralRe: Crystal Report Direct Print Pin
Girish_Sharma26-Jan-10 18:50
Girish_Sharma26-Jan-10 18:50 
GeneralRe: Crystal Report Direct Print Pin
thatraja1-Feb-10 21:40
professionalthatraja1-Feb-10 21:40 
GeneralRe: Crystal Report Direct Print Pin
shrikant.kudlur6-Apr-11 19:27
shrikant.kudlur6-Apr-11 19:27 
AnswerRe: Crystal Report Direct Print Pin
thatraja6-Apr-11 22:49
professionalthatraja6-Apr-11 22:49 
GeneralRe: Crystal Report Direct Print Pin
shrikant.kudlur10-Apr-11 20:18
shrikant.kudlur10-Apr-11 20:18 
AnswerRe: Crystal Report Direct Print Pin
thatraja11-Apr-11 5:17
professionalthatraja11-Apr-11 5:17 
GeneralRe: Crystal Report Direct Print Pin
shrikant.kudlur18-Apr-11 18:57
shrikant.kudlur18-Apr-11 18:57 
GeneralRe: Crystal Report Direct Print Pin
thatraja18-Apr-11 21:39
professionalthatraja18-Apr-11 21:39 
Questionauto complete feature Pin
chakran22-Jan-10 0:36
chakran22-Jan-10 0:36 
Questionlogin Pin
arkiboys22-Jan-10 0:30
arkiboys22-Jan-10 0:30 
AnswerRe: login Pin
Prosanta Kundu online22-Jan-10 0:41
Prosanta Kundu online22-Jan-10 0:41 
Questionhow to access textboxid dynamically Pin
vbmadhavi21-Jan-10 23:14
vbmadhavi21-Jan-10 23:14 
AnswerRe: how to access textboxid dynamically Pin
Prosanta Kundu online22-Jan-10 0:37
Prosanta Kundu online22-Jan-10 0:37 
Questionweb service error Pin
iamdking21-Jan-10 22:02
iamdking21-Jan-10 22:02 
AnswerRe: web service error Pin
SeMartens21-Jan-10 22:21
SeMartens21-Jan-10 22:21 
GeneralRe: web service error Pin
iamdking21-Jan-10 22:30
iamdking21-Jan-10 22:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.