using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FEQ0000
{
    public partial class rpt_equipmentSum : Form
    {
        string pdateB = string.Empty;
        string pdateF = string.Empty;
        string pdateM = string.Empty;
        string pdateO = string.Empty;


        public rpt_equipmentSum(string datestrF,string datestrB, string datestrME, string dateOther)
        {
            //SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory);
            InitializeComponent();
            pdateB = datestrB;
            pdateF = datestrF;
            pdateM = datestrME;
            pdateO = dateOther;
        }

        private void rpt_equipment_Load(object sender, EventArgs e)
        {
            this.Text = string.Format("Report summary");
            this.Show();
            Application.DoEvents();

            this.rpv1.PageCountMode = Microsoft.Reporting.WinForms.PageCountMode.Actual;
            this.rpv1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth;

            //Set DataSource
            Microsoft.Reporting.WinForms.ReportDataSource DsEQ = new Microsoft.Reporting.WinForms.ReportDataSource();
            DsEQ.Name = "DataSet1";

            this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportO.rdlc";
            taSum.Fill(this.dsEQ.vEquStockSummary, pdateB,pdateF,pdateM,pdateO);
            DsEQ.Value = this.dsEQ.vEquStockSummary;

            this.rpv1.LocalReport.DataSources.Add(DsEQ);
            this.rpv1.RefreshReport();
        }
    }
}
