Crystal ReportsGeneral discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
hi ashu this is the answer to export file from crystal report to text file
Dim crpt As New query1
Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
Dim myLogin As CrystalDecisions.Shared.TableLogOnInfo
' Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
' Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
Dim fname As String
Dim crExportOptions As ExportOptions
CrystalReportViewer1.Visible = True
'
For Each myTable In crpt.Database.Tables
myLogin = myTable.LogOnInfo
myLogin.ConnectionInfo.Password = "sa"
myLogin.ConnectionInfo.UserID = "sa"
myTable.ApplyLogOnInfo(myLogin)
Next
Dim YEARID = 9
'**********************
'
Dim Parameters As New ParameterFields
Dim ParamValue As New ParameterDiscreteValue
'
Dim Parameter As New ParameterField
Parameter.ParameterFieldName = "YEARID"
ParamValue.Value = YEARID
Parameter.CurrentValues.Add(ParamValue)
Parameters.Add(Parameter)
Parameters.Add(Parameter)
CrystalReportViewer1.ParameterFieldInfo = Parameters
CrystalReportViewer1.ReportSource = crpt
CrystalReportViewer1.DataBind()
CrystalReportViewer1.RefreshReport()
'
' CrystalReportViewer1.ParameterFieldInfo = Parameters
' CrystalReportViewer1.ReportSource = crpt
' crpt.PrintOptions.PrinterName = "Epson LQ-400"
'CrystalReportViewer1.DataBind()
'crpt.PrintToPrinter(1, False, 0, 0)
' CrystalReportViewer1.RefreshReport()
'**********************
'Dim Parameters As New ParameterFields
Dim ParamValue3 As New CrystalDecisions.Shared.ParameterValues
Dim ParamValue4 As New ParameterDiscreteValue
' Dim Parameter As New ParameterField
' Parameter.ParameterFieldName = "@YEARID"
'ParamValue1.Value = YEAR_ID
'Parameter.CurrentValues.Add(ParamValue)
' Parameters.Add(Parameter)
' Dim field As New CrystalDecisions.Shared.ParameterValues
'Dim value As New CrystalDecisions.Shared.ParameterDiscreteValue
' ParamValue1.Value = YEAR_ID
' value.Value = 1
' field.Add(value)
'ParamValue.Add(ParamValue1)
' Parameter.CurrentValues.Add(ParamValue1)
' Parameters.Add(Parameter)
'*******************************************
' Dim Parameters As New ParameterFields
Dim ParamValue1 As New CrystalDecisions.Shared.ParameterValues
Parameter.ParameterFieldName = "YEARID"
ParamValue4.Value = YEARID
'Parameter.CurrentValues.Add(ParamValue)
' Parameters.Add(Parameter)
' Dim field As New CrystalDecisions.Shared.ParameterValues
'Dim value As New CrystalDecisions.Shared.ParameterDiscreteValue
ParamValue4.Value = YEARID
' value.Value = 1
' field.Add(value)
ParamValue3.Add(ParamValue4)
Parameter.CurrentValues.Add(ParamValue4)
' crpt.PrintOptions.PrinterName = "Epson LQ-400"
' Print the report. Set the startPageN and endPageN
'parameters to 0 to print all pages.
' crpt.PrintToPrinter(1, False, 0, 0)
End Sub
hi ashu,
have u got the result for the above coding,
i need help from u,i want coding for dotmatrix printer driver.
if u r having send me the coding,this is manual coding written for the driver of dot matrix printer.
urgent
hi Andrew Hargreaves,
have u got the result for the above coding,
i need help from u,i want coding for dotmatrix printer driver.
if u r having send me the coding,this is manual coding written for the driver of dot matrix printer.
urgent
hi friends,
have u got the result for the above coding,
i need help from u,i want coding for dotmatrix printer driver.
if u r having send me the coding,this is manual coding written for the driver of dot matrix printer.
urgent
hi guys ,
i have a doubt in validation,
how to validate checkboxlist in asp.net
if any one knows the answer for this reply me
it is urgent.
help me guys
Hai prasadgvl ,I am Ashok From India,
I got the code for printing the file through the dot matrix printer, but i is there any popssible way to print the contents of a flex grid directly to a dotmatrix printer which is connected in the LPT1 port, Please sent replay to me ...
Sir,
I want to Print and view Crystal report at Text format at dot matrix for bank purpuse.
I implement Export to txt method.output txt file some data is missing.
how solve this and how to implement print method.
Please help me
biplob
Hi ashu,
i am also having the same problem in my VB project.. the paper was ejected after printing, but i have to print 2 bill in the single a4 sheet..
plz help me to solve this problem..
if u have any code for this solution plz sent it to me..