Пример #1
0
 public override CrystalDecisions.CrystalReports.Engine.ReportClass GenerateReport()
 {
     String SQL = String.Format("SELECT R.OutputID, R.Title, R.AuthorID, R.Subject,"+
                              " R.Author2, R.Author3, R.Author4, R.AdditionalInfo, R.PageBegin, R.PageEnd, R.TypeNo, J.ISSN, "+
                              "J.Title, J.Volume, J.Number, J.Publisher,  J.SCI, J.SSCI, J.AHI, J.IBSS, J.SAJ, J.PublicationDate," +
                              "U.Name, U.Title, U.SName, U.ContactNum FROM ResearchOutput AS R INNER JOIN JournalArticle AS JA ON JA.OutputID = R.OutputID "+
                              "INNER JOIN Journal AS J ON J.ISSN = JA.JournalISSN INNER JOIN RegisteredUser AS U ON R.AuthorID = U.SysID WHERE R.OutputID = {0}", outputID);
     ReportingTool RT;
     try
     {
         RT = new ReportingTool(typeNumber);
         RT.setSingleDataRow(SQL);
     }
     catch (Exception e)
     {
         throw new MsgBoxException(e.Message);
     }
     return RT.GenerateReport();
 }
Пример #2
0
        //public override static void loadDataSet(RegisteredUser User)
        //{


        //    String SQL = "SELECT * FROM ResearchOutput AS R INNER JOIN ConferencePaper AS C ON R.OutputID = C.OutputID  WHERE ActiveStatus = 'True';";
        //    if (User != null)
        //        if ((User is SystemAdministrator) || (User is AdministrativeAssistant))
        //        {
        //            SQL = "SELECT * FROM ResearchOutput AS R INNER JOIN ConferencePaper AS C ON R.OutputID = C.OutputID;";
        //        }
        //    loadDataset(SQL);

        //}
        //public override static void loadDataSet(List<String> Filters, List<String> Criterion, RegisteredUser User)
        //{
        //    if ((Filters == null) || (Criterion == null) || (Filters.Count != Criterion.Count))
        //        loadDataSet(User);


        //    String SQL = String.Format("SELECT * FROM ResearchOutput AS R INNER JOIN ConferencePaper AS C ON R.OutputID = C.OutputID WHERE");
        //    for (int x = 0; x < Filters.Count; x++)
        //        if (!Filters[x].TrimEnd().Equals(""))
        //            SQL += String.Format("({1} LIKE '%{0}%') AND", Criterion[x], Filters[x]);

        //    int length = SQL.Length;
        //    SQL = SQL.Substring(0, length - 3);

        //    if (User != null)
        //    {
        //        if (!(User is SystemAdministrator) && !(User is AdministrativeAssistant))
        //            SQL += " AND (ActiveStatus = 'True');";
        //        else SQL += ";";
        //    }
        //    else SQL += ";";
        //    loadDataset(SQL);
        //}
        //public override static void loadStrictDataSet(List<String> Filters, List<String> Criterion, RegisteredUser User)
        //{
        //    if ((Filters == null) || (Criterion == null) || (Filters.Count != Criterion.Count))
        //        loadDataSet(User);

        //    String SQL = String.Format("SELECT * FROM ResearchOutput AS R INNER JOIN ConferencePaper AS C ON R.OutputID = C.OutputID WHERE");
        //    for (int x = 0; x < Filters.Count; x++)
        //        if (!Filters[x].TrimEnd().Equals(""))
        //            SQL += String.Format("({1} = '{0}') AND", Criterion[x], Filters[x]);

        //    int length = SQL.Length;
        //    SQL = SQL.Substring(0, length - 3);

        //    if (User != null)
        //    {
        //        if (!(User is SystemAdministrator) && !(User is AdministrativeAssistant))
        //            SQL += " AND (ActiveStatus = 'True');";
        //        else SQL += ";";
        //    }
        //    else SQL += ";";
        //    loadDataset(SQL);
        //}

        public override CrystalDecisions.CrystalReports.Engine.ReportClass GenerateReport()
        {
            String SQL = String.Format("SELECT Title From ResearchOutput  WHERE OutputID = {0}", outputID);
            ReportingTool RT;
            try
            {
                RT = new ReportingTool(typeNumber);
                RT.setSingleDataRow(SQL);
            }
            catch (Exception e)
            {
                throw new MsgBoxException(e.Message);
            }
            return RT.GenerateReport();
        }