Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: create ticket with dimensions 21.5 x 14 Post Reply Post New Topic
Author Message
cifuentesval
Newbie
Newbie


Joined: 24 Sep 2012
Location: Chile
Online Status: Offline
Posts: 1
Quote cifuentesval Replybullet Topic: create ticket with dimensions 21.5 x 14
    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

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 27 Sep 2012 at 5:09am
2 questions
1) what's not working
2) are the dimension in inches
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.