Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            ReportServer.ReportServerCall rsc = new ReportServer.ReportServerCall("/Student data/Student Route Classlist with Photos");
            rsc.AddParameter("School", "50");
            //rsc.AddParameter("Course", "14FBET-N");
            rsc.AddParameter("Route", "CPR6");
            rsc.AddParameter("Route", "PRM6");

            //for (int i = 0; i < 33; i++)
            //{
            //    rsc.AddParameter("Block", i.ToString());
            //}
            rsc.AddParameter("Route", "1");
            rsc.AddParameter("Route", "11");
            rsc.AddParameter("Route", "12");
            rsc.AddParameter("Route", "2");
            rsc.AddParameter("Route", "21");
            rsc.AddParameter("Route", "22");
            rsc.AddParameter("Route", "3");
            rsc.AddParameter("Route", "31");
            rsc.AddParameter("Route", "32");
            rsc.AddParameter("Route", "4");
            rsc.AddParameter("Route", "41");
            rsc.AddParameter("Route", "42");
            rsc.AddParameter("Route", "5");
            rsc.AddParameter("Route", "51");
            rsc.AddParameter("Route", "52");
            rsc.AddParameter("Route", "6");
            rsc.AddParameter("Route", "61");
            rsc.AddParameter("Route", "62");
            rsc.AddParameter("Route", "7");
            rsc.AddParameter("Route", "71");
            rsc.AddParameter("Route", "72");
            rsc.AddParameter("Route", "81");
            rsc.AddParameter("Route", "82");
            rsc.AddParameter("Route", "91");
            rsc.AddParameter("Route", "92");

            // rsc.AddParameter("Status", "E");

            string url = rsc.GetEncodedUrl();
            string s = ReportServer.getSqlReport(url);
        }
Exemple #2
0
        private string getMarksUrl()
        {
            string reportsource = "http://gloucesterroad/ReportServer?%2fStudent+Data%2fStudent+Programmes+from+ID&rs%3aCommand=Render&rs%3aFormat=XML&StuID=" + baseId;
            string xml = ReportServer.getSqlReport(reportsource);
            if (xml == "")
                return "";
            xml = xml.Replace("<?xml version=\"1.0\" encoding=\"utf-8\"?>", "");

            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(new StringReader(xml));
            var detail = xmlDoc.GetElementsByTagName("Detail");

            if (detail.Count == 0)
                return "";

            var thedetail = detail[0];
            string sYear = thedetail.Attributes["sce_ayrc"].Value; // = m.Groups["Year"].ToString().Replace("/","%2f");
            string sFamily = thedetail.Attributes["sce_crsc"].Value;
            string sRoute = thedetail.Attributes["sce_rouc"].Value;
            string sBlock = thedetail.Attributes["sce_blok"].Value;
            string sOccur = thedetail.Attributes["sce_occl"].Value;
            string sId = thedetail.Attributes["sce_scjc"].Value;

            string school = "50";
            if (sRoute == "ENM6")
                school = "16";

            ReportServer.ReportServerCall rsc = new ReportServer.ReportServerCall("/Progression and Awards/SMRF and Transcript/Transcript");
            rsc.AddParameter("Year", sYear);
            rsc.AddParameter("School", school);
            rsc.AddParameter("Course", sFamily);
            rsc.AddParameter("Route", sRoute);
            rsc.AddParameter("Block", sBlock);
            rsc.AddParameter("Occurrence", sOccur);
            rsc.AddParameter("Student_ID", sId);
            string v = rsc.GetEncodedUrl();

            return v;
        }