Ejemplo n.º 1
0
        public DataSet runReportSelectLiteralDS(string query)
        {
            object results;
            var webServ = new GenWebAccess.Service();
            webServ.Url = genevaUrl;
            webServ.Timeout = 500000;
            string runrepSessionID = webServ.StartCallableRunrep(genevaPort, genevaHostName, genevaUid, genevaPassword, "-f empty");
            DataSet tempDS = new DataSet();
            try
            {

                results = webServ.RunCallableRunrepRunSelectLiteral(runrepSessionID, query, "");
                var s = new System.Xml.Serialization.XmlSerializer(typeof(object));
                var writer = new StringWriter();
                s.Serialize(writer, results);
                var reader = new StringReader(writer.ToString());
                tempDS.ReadXml(reader);
               }
            finally
            {
                int i = webServ.ShutdownCallableSession(runrepSessionID);
                webServ.Dispose();
            }
           return tempDS;
        }
Ejemplo n.º 2
0
        private DataSet RunReportLiteralDS(string ReportName, string Parameters)
        {
            DataSet tempDS = new DataSet();
            object results;
            string runrepSessionID;
            GenWebAccess.Service webServ = new GenWebAccess.Service();
            int i = 0;
            webServ.Url = genevaUrl;
            webServ.Timeout = 500000;
            runrepSessionID = webServ.StartCallableRunrep(genevaPort, genevaHostName, genevaUid, genevaPassword, "-f empty");
            try
            {
                webServ.RunCallableRunrepReadFile(runrepSessionID, ReportName);
                results = webServ.RunCallableRunrepRunReportLiteral(runrepSessionID, ReportName, Parameters);

                System.Xml.Serialization.XmlSerializer s = new System.Xml.Serialization.XmlSerializer(typeof(object));
                StringWriter writer = new StringWriter();
                s.Serialize(writer, results);
                StringReader reader = new StringReader(writer.ToString());
                //Read XML into Dataset
                tempDS.ReadXml(reader);
              

            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                i = webServ.ShutdownCallableSession(runrepSessionID);
                webServ.Dispose();
               

            }

          return tempDS;
        }