Example #1
0
        protected void setBooks()
        {
            dsBooks dsReport = new dsBooks();

            DataSet  ds        = execRpt.GetReport(dsReport, sSQL, sTable);
            rptBooks rptViewer = new rptBooks();

            pdvInstName.Value = clsVariables.sINSTITUTION;
            pvCollection.Add(pdvInstName);
            rptViewer.DataDefinition.ParameterFields["InsitutionName"].ApplyCurrentValues(pvCollection);
            pvCollection.Clear();

            pdvInstAddress.Value = clsVariables.sADDRESSS;
            pvCollection.Add(pdvInstAddress);
            rptViewer.DataDefinition.ParameterFields["InstitutionAddress"].ApplyCurrentValues(pvCollection);
            pvCollection.Clear();

            pdvInstContacts.Value = "Phone Number: " + clsVariables.sPHONENUMBER + "  and  " + "Fax Number: " + clsVariables.sFAXNUMBER;
            pvCollection.Add(pdvInstContacts);
            rptViewer.DataDefinition.ParameterFields["ContactNumber"].ApplyCurrentValues(pvCollection);
            pvCollection.Clear();

            pdvCategory.Value = "Category: " + sCategory;
            pvCollection.Add(pdvCategory);
            rptViewer.DataDefinition.ParameterFields["CategoryName"].ApplyCurrentValues(pvCollection);
            pvCollection.Clear();

            pdvPrepared.Value = clsVariables.sLibrarianName;
            pvCollection.Add(pdvPrepared);
            rptViewer.DataDefinition.ParameterFields["Prepared"].ApplyCurrentValues(pvCollection);
            pvCollection.Clear();

            rptViewer.SetDataSource(ds);
            crviewer.ReportSource = rptViewer;
        }
Example #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptBooks rpt = new rptBooks();

            rpt.Site = this.Site;
            return(rpt);
        }