Crystal Report Viewer With Custom Papersize

skype

New member
Joined
Nov 11, 2010
Messages
1
Programming Experience
Beginner
Hi Guys,

Having a problem with crystal report.

I am developing an application using vb 2005 and builtin crystal report together with the crystal report viewer to view the report in run time. I have set the paper size in my printer properties with size 8.5 x 5.5 and in the crystal report in printer setup i have set the papersize to the one that i created in device and printer setting, and its works, i am able to view with the custom paper size in my computer.

However when i installed in my client computer, the paper size turn out to be letter, even i have create new custom paper in my client computer, it still turn out to be letter size.

Any ideas what i am doing wrong??

Here is my little codes

VB.NET:
Dim myreport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
                Dim mydata As New DataSet
                Dim cmd As New MySql.Data.MySqlClient.MySqlCommand
                Dim myadapter As New MySql.Data.MySqlClient.MySqlDataAdapter
                opencon()
                If frmPaySlipChooseHWG.cboDept.Text = "All" Then
                    cmd.CommandText = "SELECT * FROM tblTrans WHERE periode='" & frmPaySlipChoose.cboPeriode.Text & "' ORDER BY id ASC"
                Else
                    cmd.CommandText = "SELECT * FROM tblTrans WHERE periode='" & frmPaySlipChoose.cboPeriode.Text & "' AND dept='" & frmPaySlipChoose.cboDept.Text & "' ORDER BY id ASC"
                End If
                cmd.Connection = con
                cmd.CommandType = CommandType.Text

                myadapter.SelectCommand = cmd
                myadapter.Fill(mydata)

                myreport.Load("C:\Report File\rptPaySlip.rpt")
                myreport.Refresh()
                myreport.SetDataSource(mydata)
                crV.ReportSource = myreport
 
Back
Top