Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.CrystalReports.ViewerObjectModel
Imports CrystalDecisions.ReportSource
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Windows.Forms
Public Class ctrPrint1
Private Sub ctrPrint1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim pcod As New ParameterValues()
Dim custname As New ParameterValues()
Dim pnam As New ParameterValues()
Dim longe As New ParameterValues()
Dim width As New ParameterValues()
Dim height As New ParameterValues()
Dim sheetw As New ParameterValues()
Dim sheetl As New ParameterValues()
Dim width0 As New ParameterValues()
Dim long0 As New ParameterValues()
Dim width1 As New ParameterValues()
Dim width2 As New ParameterValues()
Dim width3 As New ParameterValues()
Dim width4 As New ParameterValues()
Dim width5 As New ParameterValues()
Dim long1 As New ParameterValues()
Dim long2 As New ParameterValues()
Dim long3 As New ParameterValues()
Dim long4 As New ParameterValues()
Dim long5 As New ParameterValues()
Dim paper As New ParameterValues()
Dim flute As New ParameterValues()
Dim type As New ParameterValues()
Dim connectt As New ParameterValues()
Dim maxx As New ParameterValues()
Dim bundle As New ParameterValues()
Dim color1 As New ParameterValues()
Dim color2 As New ParameterValues()
Dim color3 As New ParameterValues()
Dim color4 As New ParameterValues()
Dim process1 As New ParameterValues()
Dim process2 As New ParameterValues()
Dim process3 As New ParameterValues()
Dim process4 As New ParameterValues()
Dim nlast As New ParameterValues()
Dim processlast As New ParameterValues()
Dim plate As New ParameterValues()
Dim x As New ParameterValues()
Dim platea As New ParameterValues()
Dim plateb As New ParameterValues()
Dim c1 As New ParameterValues()
Dim c2 As New ParameterValues()
Dim c4 As New ParameterValues()
Dim pic As New ParameterValues()
Dim mskpcod As New ParameterDiscreteValue()
Dim lstcustname As New ParameterDiscreteValue()
Dim txtpnam As New ParameterDiscreteValue()
Dim txtlong As New ParameterDiscreteValue()
Dim txtwidth As New ParameterDiscreteValue()
Dim txtheight As New ParameterDiscreteValue()
Dim txtshtwid As New ParameterDiscreteValue()
Dim txtshtlen As New ParameterDiscreteValue()
Dim txtwst0 As New ParameterDiscreteValue()
Dim txtlst0 As New ParameterDiscreteValue()
Dim txtwst1 As New ParameterDiscreteValue()
Dim txtwst2 As New ParameterDiscreteValue()
Dim txtwst3 As New ParameterDiscreteValue()
Dim txtwst4 As New ParameterDiscreteValue()
Dim txtwst5 As New ParameterDiscreteValue()
Dim txtlst1 As New ParameterDiscreteValue()
Dim txtlst2 As New ParameterDiscreteValue()
Dim txtlst3 As New ParameterDiscreteValue()
Dim txtlst4 As New ParameterDiscreteValue()
Dim txtlst5 As New ParameterDiscreteValue()
Dim mskpaper As New ParameterDiscreteValue()
Dim cboflute As New ParameterDiscreteValue()
Dim txttype As New ParameterDiscreteValue()
Dim cboconnect As New ParameterDiscreteValue()
Dim txtmax As New ParameterDiscreteValue()
Dim txtbundle As New ParameterDiscreteValue()
Dim txtcol1 As New ParameterDiscreteValue()
Dim txtcol2 As New ParameterDiscreteValue()
Dim txtcol3 As New ParameterDiscreteValue()
Dim txtcol4 As New ParameterDiscreteValue()
Dim cboproc1 As New ParameterDiscreteValue()
Dim cboproc2 As New ParameterDiscreteValue()
Dim cboproc3 As New ParameterDiscreteValue()
Dim cboproc4 As New ParameterDiscreteValue()
Dim chkprocl As New ParameterDiscreteValue()
Dim txtprocl As New ParameterDiscreteValue()
Dim lblplate As New ParameterDiscreteValue()
Dim lblx As New ParameterDiscreteValue()
Dim txtplta As New ParameterDiscreteValue()
Dim txtpltb As New ParameterDiscreteValue()
Dim txtc1 As New ParameterDiscreteValue()
Dim txtc2 As New ParameterDiscreteValue()
Dim txtc4 As New ParameterDiscreteValue()
Dim picbox As New ParameterDiscreteValue()
mskpcod.Value = frmRsc.mskPcod.Text
lstcustname.Value = frmRsc.txtCustName.Text
txtpnam.Value = frmRsc.txtPnam.Text
txtlong.Value = frmRsc.txtLong.Text
txtwidth.Value = frmRsc.txtWidth.Text
txtheight.Value = frmRsc.txtHeight.Text
txtshtwid.Value = frmRsc.txtShtWid.Text
txtshtlen.Value = frmRsc.txtShtlen.Text
txtwst0.Value = frmRsc.txtWst0.Text
txtlst0.Value = frmRsc.txtLst0.Text
txtwst1.Value = frmRsc.txtWst1.Text
txtwst2.Value = frmRsc.txtWst2.Text
txtwst3.Value = frmRsc.txtWst3.Text
txtwst4.Value = frmRsc.txtWst4.Text
txtwst5.Value = frmRsc.txtWst5.Text
txtlst1.Value = frmRsc.txtLst1.Text
txtlst2.Value = frmRsc.txtLst2.Text
txtlst3.Value = frmRsc.txtLst3.Text
txtlst4.Value = frmRsc.txtLst4.Text
txtlst5.Value = frmRsc.txtLst5.Text
mskpaper.Value = frmRsc.mskPaper.Text
cboflute.Value = frmRsc.cboFlute.Text
txttype.Value = frmRsc.txtType.Text
cboconnect.Value = frmRsc.cboConnect.Text
txtmax.Value = frmRsc.txtNumOfMax.Text
txtbundle.Value = frmRsc.txtNumPerBundle.Text
txtcol1.Value = frmRsc.txtColor1.Text
txtcol2.Value = frmRsc.txtColor2.Text
txtcol3.Value = frmRsc.txtColor3.Text
txtcol4.Value = frmRsc.txtColor4.Text
cboproc1.Value = frmRsc.TextBox1.Text
cboproc2.Value = frmRsc.TextBox2.Text
cboproc3.Value = frmRsc.TextBox3.Text
cboproc4.Value = frmRsc.TextBox4.Text
chkprocl.value = frmRsc.TextBox5.Text
txtprocl.Value = frmRsc.txtProcessLast.Text
lblplate.Value = frmRsc.lblPlate.Text
lblx.Value = frmRsc.lblX.Text
txtplta.Value = frmRsc.txtPlateA.Text
txtpltb.Value = frmRsc.txtPlateB.Text
txtc1.Value = frmCheck.TextBox1.Text
txtc2.Value = frmCheck.TextBox2.Text
txtc4.Value = frmCheck.TextBox4.Text
picbox.Value = frmRsc.PTBOX.Text
pcod.Add(mskpcod)
custname.Add(lstcustname)
pnam.Add(txtpnam)
longe.Add(txtlong)
width.Add(txtwidth)
height.Add(txtheight)
sheetw.Add(txtshtwid)
sheetl.Add(txtshtlen)
width0.Add(txtwst0)
long0.Add(txtlst0)
width1.Add(txtwst1)
width2.Add(txtwst2)
width3.Add(txtwst3)
width4.Add(txtwst4)
width5.Add(txtwst5)
long1.Add(txtlst1)
long2.Add(txtlst2)
long3.Add(txtlst3)
long4.Add(txtlst4)
long5.Add(txtlst5)
paper.Add(mskpaper)
flute.Add(cboflute)
type.Add(txttype)
connectt.Add(cboconnect)
maxx.Add(txtmax)
bundle.Add(txtbundle)
color1.Add(txtcol1)
color2.Add(txtcol2)
color3.Add(txtcol3)
color4.Add(txtcol4)
process1.Add(cboproc1)
process2.Add(cboproc2)
process3.Add(cboproc3)
process4.Add(cboproc4)
nlast.add(chkprocl)
processlast.Add(txtprocl)
plate.Add(lblplate)
x.Add(lblx)
platea.Add(txtplta)
plateb.Add(txtpltb)
c1.Add(txtc1)
c2.Add(txtc2)
c4.Add(txtc4)
pic.Add(picbox)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Pcod").ApplyCurrentValues(pcod)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("CustName").ApplyCurrentValues(custname)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Pnam").ApplyCurrentValues(pnam)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Long").ApplyCurrentValues(longe)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Width").ApplyCurrentValues(width)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Height").ApplyCurrentValues(height)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("ShtWid").ApplyCurrentValues(sheetw)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("ShtLen").ApplyCurrentValues(sheetl)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Wst0").ApplyCurrentValues(width0)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Lst0").ApplyCurrentValues(long0)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Wst1").ApplyCurrentValues(width1)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Wst2").ApplyCurrentValues(width2)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Wst3").ApplyCurrentValues(width3)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Wst4").ApplyCurrentValues(width4)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Wst5").ApplyCurrentValues(width5)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Lst1").ApplyCurrentValues(long1)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Lst2").ApplyCurrentValues(long2)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Lst3").ApplyCurrentValues(long3)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Lst4").ApplyCurrentValues(long4)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Lst5").ApplyCurrentValues(long5)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Paper").ApplyCurrentValues(paper)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Flute").ApplyCurrentValues(flute)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Type").ApplyCurrentValues(type)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Connect").ApplyCurrentValues(connectt)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("NumOfMax").ApplyCurrentValues(maxx)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("NumPerBundle").ApplyCurrentValues(bundle)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Color1").ApplyCurrentValues(color1)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Color2").ApplyCurrentValues(color2)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Color3").ApplyCurrentValues(color3)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Color4").ApplyCurrentValues(color4)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Process1").ApplyCurrentValues(process1)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Process2").ApplyCurrentValues(process2)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Process3").ApplyCurrentValues(process3)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Process4").ApplyCurrentValues(process4)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("NumLast").ApplyCurrentValues(nlast)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("ProcessLast").ApplyCurrentValues(processlast)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("Plate").ApplyCurrentValues(plate)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("X").ApplyCurrentValues(x)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("PlateA").ApplyCurrentValues(platea)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("PlateB").ApplyCurrentValues(plateb)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("check1").ApplyCurrentValues(c1)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("check2").ApplyCurrentValues(c2)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("check4").ApplyCurrentValues(c4)
CrystalReportViewer1.ReportSource.DataDefinition.ParameterFields("picture").ApplyCurrentValues(pic)
End Sub
End Class
Tag : .NET, Ms Access, Crystal Report, VS 2010 (.NET 4.x)