private void RecuperarArquivoRelatorioPorGUID(string guidRelatorio)
        {
            string strDecompressedString;
            RGSws.RGSWsSoapClient _wsRGS = new RGSws.RGSWsSoapClient();

            Report report;

            strDecompressedString = GZipHelper.Decompress(_wsRGS.GetReportFileByGUID(guidRelatorio, false));

            Feedback _feed = JsonHelper.ConvertToObject<Feedback>(strDecompressedString);

            if (_feed.Status == Feedback.TypeFeedback.Success)
            {
                txtResultado.Text = strDecompressedString;

                if (_feed.Output != null)
                {
                    report = JsonHelper.ConvertToObject<Report>(_feed.Output.ToString());

                    if (report.ReportGenerationStatus)
                        GeraArquivo(report.ReportFile, true);
                    else
                        txtResultado.Text = report.ReportErrorDescription;
                }
            }
            else
                txtResultado.Text = _feed.Message[0];
        }
        private void RenderizarRelatorios()
        {
            string serializedObject;
            string strDecompressedString;
            RGSws.RGSWsSoapClient _wsRGS = new RGSws.RGSWsSoapClient();
            ReportsContainer reportContainer = new ReportsContainer();

            //reportContainer.CredentialType = CredentialType.NetworkCredential;
            //reportContainer.ReportServiceUrl = "http://wibr001505/ReportServer/ReportService2005.asmx";
            //reportContainer.ReportExecutionUrl = "http://wibr001505/ReportServer/ReportExecution2005.asmx";

            //ReportContainer///////////////////////////////////////////////////////////////////////////////
            reportContainer.CredentialType = CredentialType.CustomCredential;
            reportContainer.ReportUserLogin = "******";
            reportContainer.ReportUserPassword = "******";
            reportContainer.NetworkDomain = "ReportServiceNetworkDomain";
            reportContainer.ReportServiceUrl = "http://192.168.0.120/ReportServer/ReportService2005.asmx";
            reportContainer.ReportExecutionUrl = "http://192.168.0.120/ReportServer/ReportExecution2005.asmx";
            reportContainer.LogReports = true;
            ////////////////////////////////////////////////////////////////////////////////////////////////

            //Report////////////////////////////////////////////////////////////////////////////////////////
            Report report = new Report();
            report.ReportName = "REPORTS/TESTS/MyReport";
            report.ReportFormat = ReportFormat.EXCEL;

            report.Parameters.Add("Param1", "2012-01-01");
            report.Parameters.Add("Param2", "value");

            report.StoreReportInDB = true;
            ////////////////////////////////////////////////////////////////////////////////////////////////

            reportContainer.Reports.Add(report);

            serializedObject = JsonHelper.ConvertToJSON(reportContainer);

            strDecompressedString = GZipHelper.Decompress(_wsRGS.RenderReports(serializedObject));

            Feedback _feed = JsonHelper.ConvertToObject<Feedback>(strDecompressedString);

            if (_feed.Status == Feedback.TypeFeedback.Success)
            {
                txtResultado.Text = strDecompressedString;
                reportContainer = JsonHelper.ConvertToObject<ReportsContainer>(_feed.Output.ToString());

                if (reportContainer.Reports[0].ReportGenerationStatus)
                    GeraArquivo(reportContainer.Reports[0].ReportFile, true);
                else
                    txtResultado.Text = reportContainer.Reports[0].ReportErrorDescription;
            }
            else
                txtResultado.Text = _feed.Message[0];
        }