Label Printer Always Printing portrait

Stimulsoft Ultimate discussion
Post Reply
ShakeebAhmed
Posts: 9
Joined: Wed Nov 12, 2014 2:22 pm

Label Printer Always Printing portrait

Post by ShakeebAhmed »

Dear All

I AM Using a Label Printer in order to print a Label but the report is always printing portrait no matter what i do below is the code i use

Code: Select all

            StiReport  Rep = new StiReport();
            SqlConnection connection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
            DataSet dss = new DataSet();
            SqlDataAdapter sqlAdp = new SqlDataAdapter();
            System.Data.SqlClient.SqlCommand  command = new  System.Data.SqlClient.SqlCommand();
            command.Connection = connection;
            command.CommandType = CommandType.StoredProcedure;
            command.CommandText = "SP_DosePrint";
            command.Parameters.AddWithValue("TransHdrID", Convert.ToInt32(THID));
            connection.Open();
            sqlAdp.SelectCommand = command;
            sqlAdp.Fill(dss);
            connection.Close();
            var reports = from r in hmsDB.Reports where r.EngName == "Dose Print1" select r.StiReport;
            var result = reports.SingleOrDefault().ToString();
                
            Rep.LoadFromString(result);
            StiOptions.Print.UsePrinterSettingsEntirely = true;
            string printername = System.Configuration.ConfigurationManager.AppSettings["LabelPrinter"].ToString();
            PrinterSettings PrinterSetting = new PrinterSettings();
      
            PrinterSetting.PrinterName = printername;
            Rep.RegData(dss);
            Rep.Compile();
            Rep.Render();
                       
            Rep.Print(false, PrinterSetting);
The Printer is Zebra GK420t and the report is landscape so are printing preferences

Please help
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Label Printer Always Printing portrait

Post by HighAley »

Hello, Ahmed.

Please, try to set the orientation of the page in the Printer settings.

Thank you.
ShakeebAhmed
Posts: 9
Joined: Wed Nov 12, 2014 2:22 pm

Re: Label Printer Always Printing portrait

Post by ShakeebAhmed »

Dear Aleksey

I Have Tried That and it still prints portrait Please Help
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Label Printer Always Printing portrait

Post by HighAley »

Hello.

Could you specify which version of our product do you use?
Please, send us sample of printed label and we need to know the size of the label.

Thank you.
Post Reply