Exemple #1
0
        private static Print_List GetData(string p_id)
        {
            Outward outward = COutward_exten.PKId(p_id);

            Print_List list = new Print_List();

            Print_QuotationRow row = new Print_QuotationRow();

            Company obj = CCompany_exten.PKId(Current.Company_id);

            row.COMPANY_NAME  = obj.Display_name.ToUpper();
            row.ADDRESS1      = obj.Street1 + " , " + obj.Street2;
            row.ADDRESS2      = obj.City_id + " - " + obj.Pincode_id + " , " + obj.State_id + ". Code -33,    Email : " + obj.Email;
            row.COMPANY_GSTIN = " GSTIN : " + obj.Gstin + "";// ,    Cell :    " + obj.Cell1 + " ";

            row.OUTWARD_ID   = p_id;
            row.OUTWARD_NO   = "NO    : " + outward.Outward_no.ToString();
            row.OUTWARD_DATE = "DATE  : " + ConvertTO.Date2S(outward.Outward_date);



            Party _party_list = CParty_exten.PKId(outward.Party_id, new DAL());

            row.PARTY_NAME = _party_list.Party_name;

            if (_party_list.Party_name != null)
            {
                row.STREET1 = _party_list.Street_1 + ", " + _party_list.Street_2;
                row.STREET2 = "";
                row.CITY    = _party_list.City_id + " - " + _party_list.Pincode_id + " ,";
                //row.STATE = _party_list.State_id + " - " + CState_exten.GetStateCode(_party_list.State_id);
                row.COUNTRY = _party_list.Country_id;
                row.PINCODE = "";

                if (_party_list.Gstin.Trim().Length != 0)
                {
                    row.GSTIN += "GSTIN No : " + _party_list.Gstin;
                }
            }

            row.TOTAL_QTY       = ConvertTO.DecimalToS(outward.Total_qty.ToString());
            row.TOTAL_BUNDLE    = outward.Total_bundel;
            row.DELIVREDTHROUGH = outward.Delivredthrough;

            list.Add(row);

            return(list);
        }
Exemple #2
0
        public static void Print(ReportViewer pRptViewer, string pP_id)
        {
            vPId = pP_id;
            Print_List data = GetData(pP_id);

            LocalReport localReport = pRptViewer.LocalReport;


            localReport.ReportPath  = Application.StartupPath + @"\PRINTS\P_Outward.rdlc"; //(1)//
            localReport.DisplayName = "outward";


            localReport.DataSources.Add(new ReportDataSource("MyDataSource", data)); //(2)//

            localReport.SubreportProcessing += localReport_SubreportProcessing;



            PrinterSettings v_PrinterSettings = GetPrinterSettings();

            pRptViewer.PrinterSettings = v_PrinterSettings;
            pRptViewer.SetPageSettings(v_PrinterSettings.DefaultPageSettings);
            pRptViewer.RefreshReport();
        }