Print Page | Close Window

create ticket with dimensions 21.5 x 14

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17616
Printed Date: 19 Apr 2025 at 12:55pm


Topic: create ticket with dimensions 21.5 x 14
Posted By: cifuentesval
Subject: create ticket with dimensions 21.5 x 14
Date Posted: 24 Sep 2012 at 9:27am
VB2008 use more crystal report

leave my code

Private Sub frm_boletaIMp_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim rel As New rptBoletaImp
Dim formulaField As CrystalDecisions.CrystalReports.Engine.FormulaFiel dDefinition
Dim Formulafieldname As String
Dim logOnInfo As New CrystalDecisions.Shared.TableLogOnInfo()
Dim i As Integer
For i = 0 To rel.Database.Tables.Count - 1
logOnInfo.ConnectionInfo.ServerName = "SERVIDOR"
logOnInfo.ConnectionInfo.DatabaseName = "farmaciaccm"
logOnInfo.ConnectionInfo.UserID = "sa"
logOnInfo.ConnectionInfo.Password = "farmacia"
rel.Database.Tables.Item(i).ApplyLogOnInfo(logOnIn fo)
Next i
Formulafieldname = "IdBoleta"
formulaField = rel.DataDefinition.FormulaFields.Item(Formulafield name)
formulaField.Text = lblNumeroBoleta.Text
Formulafieldname = "TipoPago"
formulaField = rel.DataDefinition.FormulaFields.Item(Formulafield name)
formulaField.Text = "'" & lblTipoPago.Text & "'"
Formulafieldname = "Responsable"
formulaField = rel.DataDefinition.FormulaFields.Item(Formulafield name)
formulaField.Text = "'" & lbvendedor.Text & "'"
'configuracion de impresion
rel.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperEnvelope10
rel.PrintOptions.PrinterName = "Okidata ML 320 Turbo/D (IBM)"
' Con esta linea el printer toma el tipo de papel seteado en el Crystal Report
'rel.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait 'Landscape '.Portrait
'imprime reporte directamente a la impresora
rel.PrintToPrinter(1, False, 0, 0)
crviewBoleta.ReportSource = rel
crviewBoleta.Visible = True
End Sub




Replies:
Posted By: lockwelle
Date Posted: 27 Sep 2012 at 5:09am
2 questions
1) what's not working
2) are the dimension in inches



Print Page | Close Window