Esempio n. 1
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            string Parametro = Request["Parametro"];

            //string Parametro =	"3513;1031;4;4;01/01/2004;01/04/2004;99004;M";
            //string Parametros =	"3513;1031;;;;;99004;M";


            string [] split = null;
            string    delim = ";";

            char [] del = delim.ToCharArray();

            int x = 8;

            split = Parametro.Split(del, x);

            string CodRegiao      = split[0];
            string CodCoop        = split[1];
            string DataInicio     = split[4];
            string DataFim        = split[5];
            string CodProdutor    = split[2];
            string CodPontoColeta = split[3];

            if (DataInicio == "")
            {
                DataInicio = "01/01/1900";
            }

            if (DataFim == "")
            {
                DataFim = "31/12/2100";
            }

            if (CodProdutor == "")
            {
                CodProdutor = "0";
            }

            if (CodPontoColeta == "")
            {
                CodPontoColeta = "0";
            }


            string [] Fields = { "@DatInicio", "@DatFim", "@CodProdutor", "@CodRegiao", "@CodCoop", "@CodPontoColeta" };
            //string [] Param = {ddlRegiao.SelectedValue.ToString(),ddlLinhaDe.SelectedValue.ToString(), ddlLinhaAte.SelectedValue.ToString()};
            string [] Param      = { DataInicio, DataFim, CodProdutor, CodRegiao, CodCoop, CodPontoColeta };
            string    sPathLocal = HttpContext.Current.Server.MapPath("Relatorio").ToString();
            string    FilePath   = sPathLocal + "\\" + "Rel_Boletim_Captacao.pdf";

            //string FilePath = @"c:\TesteBoletimOK.pdf";

            clsCrystal.clsCrystal crt = new clsCrystal.clsCrystal();
            crt.ReportCrystal("SP_REL_BOLETIM_COLETA_LEITE", strConn, Fields, Param, FilePath);
            HttpContext.Current.Response.Redirect("http://200.187.137.92/RelCaptacao/Relatorio/Rel_Boletim_Captacao.pdf");
            //HttpContext.Current.Response.Redirect("http://cclteste/RelCaptacao/Relatorio/Rel_Boletim_Captacao.pdf");
        }
Esempio n. 2
0
		private void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
			string Parametro = Request["Parametro"];
			//string Parametro =	"3513;1031;4;4;01/01/2004;01/04/2004;99004;M";
			//string Parametros =	"3513;1031;;;;;99004;M";


			string [] split = null;
			string delim = ";";
			
			char [] del = delim.ToCharArray();
			
			int x = 8;

			split = Parametro.Split(del,x);
           
			string CodRegiao = split[0];
            string CodCoop   = split[1];
			string DataInicio = split[4];
			string DataFim = split[5];
			string CodProdutor = split[2];
			string CodPontoColeta = split[3];
			
			if (DataInicio == "") 
			{
				DataInicio = "01/01/1900" ;
			}

			if (DataFim == "") 
			{
				DataFim = "31/12/2100" ;
			}

			if (CodProdutor == "") 
			{
				CodProdutor = "0" ;
			}

			if (CodPontoColeta == "") 
			{
				CodPontoColeta = "0" ;
			}


			string [] Fields = {"@DatInicio","@DatFim", "@CodProdutor", "@CodRegiao", "@CodCoop", "@CodPontoColeta"};
            //string [] Param = {ddlRegiao.SelectedValue.ToString(),ddlLinhaDe.SelectedValue.ToString(), ddlLinhaAte.SelectedValue.ToString()};
			string [] Param = {DataInicio, DataFim, CodProdutor,  CodRegiao, CodCoop, CodPontoColeta};
			string sPathLocal = HttpContext.Current.Server.MapPath("Relatorio").ToString();
			string FilePath = sPathLocal + "\\" + "Rel_Boletim_Captacao.pdf";
			//string FilePath = @"c:\TesteBoletimOK.pdf";
		
			clsCrystal.clsCrystal crt = new clsCrystal.clsCrystal();
			crt.ReportCrystal("SP_REL_BOLETIM_COLETA_LEITE",strConn,Fields,Param,FilePath);
			HttpContext.Current.Response.Redirect("http://200.187.137.92/RelCaptacao/Relatorio/Rel_Boletim_Captacao.pdf");
			//HttpContext.Current.Response.Redirect("http://cclteste/RelCaptacao/Relatorio/Rel_Boletim_Captacao.pdf");

		}
		private void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
			string Parametro = Request["Parametro"];
		    //string Parametro = "20/10/2004,20/10/2004,1058,3513";

			string [] split = null;
			string delim = ",";
			
			char [] del = delim.ToCharArray();
			
			int x = 8;

			split = Parametro.Split(del,x);
           
			string CodRegiao = split[3];
            string CodCoop   = split[2];
			string DataInicio = split[0];
			string DataFim = split[1];
			
						
			if (DataInicio == "") 
			{
				DataInicio = "01/01/1900" ;
			}

			if (DataFim == "") 
			{
				DataFim = "31/12/2100" ;
			}

		
			string [] Fields = {"@CodRegiao","@CodCoop", "@PeriodoDe", "@PeriodoAte"};
            //string [] Param = {ddlRegiao.SelectedValue.ToString(),ddlLinhaDe.SelectedValue.ToString(), ddlLinhaAte.SelectedValue.ToString()};
			string [] Param = {CodRegiao, CodCoop, DataInicio, DataFim};
			string sPathLocal = HttpContext.Current.Server.MapPath("Relatorio").ToString();
			string FilePath = sPathLocal + "\\" + "Rel_Coleta_Transporte.pdf";
			//string FilePath = @"c:\TestetransOK.pdf";
		
			clsCrystal.clsCrystal crt = new clsCrystal.clsCrystal();
			crt.ReportCrystal("PR_REL_COLETA_TRANSPORTE",strConn,Fields,Param,FilePath);
			HttpContext.Current.Response.Redirect("http://200.187.137.92/RelCaptacao/Relatorio/Rel_Coleta_Transporte.pdf");
			//HttpContext.Current.Response.Redirect("http://cclteste/RelCaptacao/Relatorio/Rel_Coleta_Transporte.pdf");


		}
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            string Parametro = Request["Parametro"];

            //string Parametro = "20/10/2004,20/10/2004,1058,3513";

            string [] split = null;
            string    delim = ",";

            char [] del = delim.ToCharArray();

            int x = 8;

            split = Parametro.Split(del, x);

            string CodRegiao  = split[3];
            string CodCoop    = split[2];
            string DataInicio = split[0];
            string DataFim    = split[1];


            if (DataInicio == "")
            {
                DataInicio = "01/01/1900";
            }

            if (DataFim == "")
            {
                DataFim = "31/12/2100";
            }


            string [] Fields = { "@CodRegiao", "@CodCoop", "@PeriodoDe", "@PeriodoAte" };
            //string [] Param = {ddlRegiao.SelectedValue.ToString(),ddlLinhaDe.SelectedValue.ToString(), ddlLinhaAte.SelectedValue.ToString()};
            string [] Param      = { CodRegiao, CodCoop, DataInicio, DataFim };
            string    sPathLocal = HttpContext.Current.Server.MapPath("Relatorio").ToString();
            string    FilePath   = sPathLocal + "\\" + "Rel_Coleta_Transporte.pdf";

            //string FilePath = @"c:\TestetransOK.pdf";

            clsCrystal.clsCrystal crt = new clsCrystal.clsCrystal();
            crt.ReportCrystal("PR_REL_COLETA_TRANSPORTE", strConn, Fields, Param, FilePath);
            HttpContext.Current.Response.Redirect("http://200.187.137.92/RelCaptacao/Relatorio/Rel_Coleta_Transporte.pdf");
            //HttpContext.Current.Response.Redirect("http://cclteste/RelCaptacao/Relatorio/Rel_Coleta_Transporte.pdf");
        }