Example #1
0
 private void ShowReportTablesSchema()
 {
     reportsManager     = new ReportsManager(this);
     reportTablesSchema = reportsManager.GetTableSchema(reportTablesSchemaId);
     txtName.Text       = reportTablesSchema.Name;
     txtSqltext.Text    = reportTablesSchema.SqlText;
 }
        protected void btnSaveReportColumnsSchema_Click(object sender, EventArgs e)
        {

            var reportsManager = new ReportsManager(this);
            var reportColumnsSchema = new ReportColumnsSchema();
            ReportColumnsSchema original_reportColumnsSchema = new ReportColumnsSchema();

            if (reportTablesSchemaId > 0)
            {
                original_reportColumnsSchema = reportsManager.GetColumnSchema(reportTablesSchemaId, reportColumnsSchemaId);
                reportColumnsSchema.CopyPropertiesFrom(original_reportColumnsSchema);
            }

            reportColumnsSchema.ReportTablesSchemaId = reportTablesSchemaId;

            reportColumnsSchema.Name = txtReportColumnsSchemaName.Text;
            reportColumnsSchema.Source = txtSource.Text;
            reportColumnsSchema.ReportDataTypeId = Convert.ToInt32(cboReportDataType.SelectedValue);
            reportColumnsSchema.ForeignKey = txtForeignKey.Text;
            reportColumnsSchema.PrimaryKey = txtPrimaryKey.Text;
            reportColumnsSchema.PrimaryTable = txtPrimaryTable.Text;
            reportColumnsSchema.PrimaryLabelColumn = txtPrimaryLabelColumn.Text;

            if (reportColumnsSchemaId > 0)
                reportsManager.Update(original_reportColumnsSchema, reportColumnsSchema);
            else
                reportsManager.Insert(reportColumnsSchema);

            Response.Redirect("DynamicReportFields.aspx?ReportTablesSchemaId=" + Request["ReportTablesSchemaId"]);

        }
Example #3
0
 public FullCommand(string fileExtention, List <string> command, List <Transaction> transactions, ReportsManager reportsManager)
 {
     _fileExtention  = fileExtention;
     _command        = command;
     _transactions   = transactions;
     _reportsManager = reportsManager;
 }
    void PersistColumnsSelected()
    {
        ReportsManager manager = new ReportsManager(null);

        if (!String.IsNullOrEmpty(Request["OrderedColumnsHidden"]))
        {
            Page.Settings.Columns.Clear();
            string[] values = Request["OrderedColumnsHidden"].Trim(',').Split(',');
            foreach (string value in values)
            {
                if (!String.IsNullOrEmpty(value))
                {
                    
                    ReportColumnsSchema columnSchema = manager.GetColumnSchema(Page.Settings.Report.ReportTablesSchemaId.Value, Convert.ToInt32(value));

                    ReportColumn column = new ReportColumn();
                    column.ReportColumnsSchemaId = columnSchema.ReportColumnsSchemaId;
                    column.ReportTablesSchemaId = columnSchema.ReportTablesSchemaId;
                    column.ReportDataTypeId = columnSchema.ReportDataTypeId;
                    column.Name = columnSchema.Name;
                    Page.Settings.Columns.Add(column);
                }
            }
        }
    }
Example #5
0
    private static void SendAllReportsInMailForThread(Therapist therapist)
    {
        try
        {
            MailMessage mail = new MailMessage();

            mail.From = new MailAddress(SystemEmail);
            mail.To.Add(therapist.Email);
            mail.Subject = therapist.FirstName + " " + therapist.LastName + ": All Patients Reports";
            mail.Body    = "All patients reports are attached as requested.\nIf the file is not displaying correctly, please open it via Google Docs or Notpad.";

            string[] patientsFiles = Directory.GetFiles(PinchConstants.PatientsDirectoryPath);

            foreach (string file in patientsFiles)
            {
                Patient patient = QuestFileManager.GetPatientFromFile(file);

                Attachment attachment = new Attachment(ReportsManager.GetPatientReport(patient), patient.Id + ReportExtention);
                mail.Attachments.Add(attachment);
            }

            SmtpServer.Send(mail);
        }
        catch (Exception e)
        {
            PrintToLog(e.ToString(), LogType.Error);
        }
    }
Example #6
0
        protected void btnSaveReportColumnsSchema_Click(object sender, EventArgs e)
        {
            var reportsManager      = new ReportsManager(this);
            var reportColumnsSchema = new ReportColumnsSchema();
            ReportColumnsSchema original_reportColumnsSchema = new ReportColumnsSchema();

            if (reportTablesSchemaId > 0)
            {
                original_reportColumnsSchema = reportsManager.GetColumnSchema(reportTablesSchemaId, reportColumnsSchemaId);
                reportColumnsSchema.CopyPropertiesFrom(original_reportColumnsSchema);
            }

            reportColumnsSchema.ReportTablesSchemaId = reportTablesSchemaId;

            reportColumnsSchema.Name               = txtReportColumnsSchemaName.Text;
            reportColumnsSchema.Source             = txtSource.Text;
            reportColumnsSchema.ReportDataTypeId   = Convert.ToInt32(cboReportDataType.SelectedValue);
            reportColumnsSchema.ForeignKey         = txtForeignKey.Text;
            reportColumnsSchema.PrimaryKey         = txtPrimaryKey.Text;
            reportColumnsSchema.PrimaryTable       = txtPrimaryTable.Text;
            reportColumnsSchema.PrimaryLabelColumn = txtPrimaryLabelColumn.Text;

            if (reportColumnsSchemaId > 0)
            {
                reportsManager.Update(original_reportColumnsSchema, reportColumnsSchema);
            }
            else
            {
                reportsManager.Insert(reportColumnsSchema);
            }

            Response.Redirect("DynamicReportFields.aspx?ReportTablesSchemaId=" + Request["ReportTablesSchemaId"]);
        }
 private void ShowReportTablesSchema()
 {
     reportsManager = new ReportsManager(this);
     reportTablesSchema = reportsManager.GetTableSchema(reportTablesSchemaId);
     txtName.Text = reportTablesSchema.Name;
     txtSqltext.Text = reportTablesSchema.SqlText;
 }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            ReportTablesSchema original_reportTablesSchema = new ReportTablesSchema();
            reportsManager = new ReportsManager(this);
            reportTablesSchema = new ReportTablesSchema();

            if (reportTablesSchemaId != 0)
            {
                original_reportTablesSchema = reportsManager.GetTableSchema(reportTablesSchemaId);
                reportTablesSchema.CopyPropertiesFrom(original_reportTablesSchema);

            }

            reportTablesSchema.Name = txtName.Text;
            reportTablesSchema.SqlText = txtSqltext.Text;

            if (reportTablesSchemaId != 0)
                reportsManager.Update(original_reportTablesSchema, reportTablesSchema);
            else
            {
                reportsManager.Insert(reportTablesSchema);
                Response.Redirect("DynamicReport.aspx?ReportTablesSchemaId=" + reportTablesSchema.ReportTablesSchemaId);
            }


            // Server.Transfer("dynamicReports.aspx");
            // Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "location='Customer.aspx?CustomerId=" + customer.CustomerId + "';", true);

        }
Example #9
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        reportsManager = new ReportsManager(this);
        Report original_report, report;

        original_report = new Report();
        report          = new Report();

        if (Page.ViewState["ReportId"] != null)
        {
            original_report = reportsManager.GetReport((Int32)Page.ViewState["ReportId"]);
            report.CopyPropertiesFrom(original_report);
        }

        report.Name      = txtName.Text;
        report.ReportUrl = txtReportUrl.Text;
        if (!String.IsNullOrEmpty(cboReportTablesSchemaId.SelectedValue))
        {
            report.ReportTablesSchemaId = Convert.ToInt32(cboReportTablesSchemaId.SelectedValue);
        }

        if (original_report.ReportId != 0)
        {
            reportsManager.UpdateReport(original_report, report);
        }
        else
        {
            reportsManager.InsertReport(report);
        }

        Server.Transfer("reports.aspx");
    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        reportsManager = new ReportsManager(this);
        Report original_report, report;
        original_report = new Report();
        report = new Report();

        if (Page.ViewState["ReportId"] != null)
        {
            original_report = reportsManager.GetReport((Int32)Page.ViewState["ReportId"]);
            report.CopyPropertiesFrom(original_report);
        }

        report.Name = txtName.Text;
        report.ReportUrl = txtReportUrl.Text;
        if (!String.IsNullOrEmpty(cboReportTablesSchemaId.SelectedValue))
            report.ReportTablesSchemaId = Convert.ToInt32(cboReportTablesSchemaId.SelectedValue);

        if (original_report.ReportId != 0)
            reportsManager.UpdateReport(original_report, report);
        else
            reportsManager.InsertReport(report);

        Server.Transfer("reports.aspx");


    }
Example #11
0
 public DailyCommand(string path, List <string> command, List <Transaction> transactions, ReportsManager reportsManager)
 {
     _path           = path;
     _command        = command;
     _transactions   = transactions;
     _reportsManager = reportsManager;
 }
Example #12
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            ReportTablesSchema original_reportTablesSchema = new ReportTablesSchema();

            reportsManager     = new ReportsManager(this);
            reportTablesSchema = new ReportTablesSchema();

            if (reportTablesSchemaId != 0)
            {
                original_reportTablesSchema = reportsManager.GetTableSchema(reportTablesSchemaId);
                reportTablesSchema.CopyPropertiesFrom(original_reportTablesSchema);
            }

            reportTablesSchema.Name    = txtName.Text;
            reportTablesSchema.SqlText = txtSqltext.Text;

            if (reportTablesSchemaId != 0)
            {
                reportsManager.Update(original_reportTablesSchema, reportTablesSchema);
            }
            else
            {
                reportsManager.Insert(reportTablesSchema);
                Response.Redirect("DynamicReport.aspx?ReportTablesSchemaId=" + reportTablesSchema.ReportTablesSchemaId);
            }


            // Server.Transfer("dynamicReports.aspx");
            // Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "location='Customer.aspx?CustomerId=" + customer.CustomerId + "';", true);
        }
Example #13
0
 public ClientResponse FindReport(string prefixText, int count)
 {
     return(new ClientResponse(() =>
     {
         using (var reportsManager = new ReportsManager(null))
             return reportsManager.SearchReportAsArray(prefixText, count);
     }));
 }
Example #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Context.Items["ReportId"] != null)
     {
         Page.ViewState["ReportId"] = Context.Items["ReportId"];
         reportsManager             = new ReportsManager(this);
         showReport(reportsManager.GetReport((Int32)Page.ViewState["ReportId"]));
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Context.Items["ReportId"] != null)
        {
            Page.ViewState["ReportId"] = Context.Items["ReportId"];
            reportsManager = new ReportsManager(this);
            showReport(reportsManager.GetReport((Int32)Page.ViewState["ReportId"]));
        }

    }
Example #16
0
        public ActionResult DwhLoad(int id)
        {
            HeaderRep headerRep = db.HeaderReps.Find(id);

            ReportsManager repManager = new ReportsManager(db);

            string message = repManager.LoadDwhOperations(headerRep);

            TempData["Flash"] = message;

            return(RedirectToAction("LoadFromDwhList"));
        }
Example #17
0
    /// <summary>
    /// Get the Report Definition been Dynamic or Static
    /// </summary>
    /// <returns></returns>
    private void ProcessReportSettings(out DataTable table, out Report report)
    {
        //
        // Dynamic
        //
        //if (Page.PreviousPage is ReportGeneratorPage)
        //{
        InfoControl.Web.Reporting.DataClasses.ReportSettings settings = Session["ReportSettings"] as InfoControl.Web.Reporting.DataClasses.ReportSettings;

        //
        // Create Report Generator
        //
        ReportDefinitionBuilder generator = new ReportDefinitionBuilder(settings);



        //
        // Create Table
        //
        if (settings.MatrixRows.Count > 0)
        {
            MatrixBuilder matrixBuilder = new MatrixBuilder(settings);
            matrixBuilder.RowsStyle   = rowsStyle;
            matrixBuilder.HeaderStyle = headerStyle;
            generator.ReportItems.Add(matrixBuilder.ToMatrix());
        }
        else
        {
            TableBuilder tableBuilder = new TableBuilder(settings);
            tableBuilder.RowsStyle   = rowsStyle;
            tableBuilder.HeaderStyle = headerStyle;
            generator.ReportItems.Add(tableBuilder.ToTable());
        }


        //
        // Create the dataTable
        //
        table = new ReportsManager(this).ExecuteReport(settings);


        report = generator.Report;
        //}
        //else
        //{
        //    table = new DataTable();
        //    string fileName = Server.MapPath("../Static/") + Request["r"];
        //    report = System.IO.File.ReadAllText(fileName).DeserializeFromXml<Report>();
        //}
    }
Example #18
0
 public void Start()
 {
     _logger()?.Information("Manager Start Called");
     _logger()?.Information("Starting Collector...");
     CollectorManager.Start();
     _logger()?.Information("Collector Starting Completed");
     _logger()?.Information("Starting Rules...");
     RulesManager.StartAsync().Wait();
     _logger()?.Information("Rules Starting Completed");
     _logger()?.Information("Starting Reports...");
     ReportsManager.Start();
     _logger()?.Information("Rules Starting Completed");
     _logger()?.Information("Manager Start Completed");
 }
Example #19
0
 // ctor
 public ReportsViewModel(IFrameNavigationService frameNavigationService)
 {
     _frameNavigationService = frameNavigationService;
     _reportsManager         = new ReportsManager();
     LogoutCommand           = new RelayCommand(() =>
     {
         ViewModelLocator.UnRegisterReportsViewModel();
         _frameNavigationService.NavigateTo("Login");
     });
     GeneratePaymentsCommand = new RelayCommand(() =>
     {
         _reportsManager.GeneratePayments();
     });
     GetReports();
 }
Example #20
0
        private void runReport()
        {
            //DateTime localDate = new DateTime();
            //XmlDocument ReportADX;
            //ReportADX=xld.ToString();
            string  connectionString = Entity.GetConnString();
            Entity  en  = new Entity();
            DataRow fDr = null;

            {
                fDr = (DataRow)en.ReturnObject(connectionString, ClsUtility.theParams
                                               , "SELECT TOP 1 ConnString, DBase,MFLCode,DHISPortal FROM aa_Database"
                                               , ClsUtility.ObjectEnum.DataRow, "mssql");
                DHIS2URL = fDr[3].ToString();
                MFLCode  = fDr[2].ToString();
            }

            SetControlPropertyThreadSafe(fMain.picProgress, "Image", Properties.Resources.progressWheel5);
            SetControlPropertyThreadSafe(fMain.lblNotify, "Text", "Generating Report....");
            SetControlPropertyThreadSafe(this.btnGenerateReport, "Enabled", false);
            try
            {
                Hashtable      rh = setParameters();
                ReportsManager RM = new ReportsManager();
                RM.runReport(rh, satellites, bySatellite, linelists, SendtoDHIS2);

                if (SendtoDHIS2 == true)
                {
                    //adx.Checked = false;
                    //frmDHISPassword DHIS2PW = new frmDHISPassword();
                    //DialogResult dr = DHIS2PW.ShowDialog();

                    SendtoIL();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, Assets.Messages.ErrorHeader);
            }
            finally
            {
                SetControlPropertyThreadSafe(fMain.picProgress, "Image", null);
                SetControlPropertyThreadSafe(fMain.lblNotify, "Text", "");
                SetControlPropertyThreadSafe(this.btnGenerateReport, "Enabled", true);
                //dhis.Checked = false;
                saveReportLog(MFLCode.ToString(), dh.dtpFromDate.Value, DHISReport, xld, DateTime.Now.Date);
            }
        }
Example #21
0
        private void ShowReportColumnsSchema()
        {
            if (reportColumnsSchemaId > 0)
            {
                var reportsManager      = new ReportsManager(this);
                var reportColumnsSchema = reportsManager.GetColumnSchema(reportTablesSchemaId, reportColumnsSchemaId);

                txtReportColumnsSchemaName.Text = reportColumnsSchema.Name;
                txtSource.Text             = reportColumnsSchema.Source;
                txtForeignKey.Text         = reportColumnsSchema.ForeignKey;
                txtPrimaryKey.Text         = reportColumnsSchema.PrimaryKey;
                txtPrimaryTable.Text       = reportColumnsSchema.PrimaryTable;
                txtPrimaryLabelColumn.Text = reportColumnsSchema.PrimaryLabelColumn;
                cboReportDataType.DataBind();
                cboReportDataType.SelectedValue = reportColumnsSchema.ReportDataTypeId.ToString();
            }
        }
        private void ShowReportColumnsSchema()
        {
            if (reportColumnsSchemaId > 0)
            {
                var reportsManager = new ReportsManager(this);
                var reportColumnsSchema = reportsManager.GetColumnSchema(reportTablesSchemaId, reportColumnsSchemaId);

                txtReportColumnsSchemaName.Text = reportColumnsSchema.Name;
                txtSource.Text = reportColumnsSchema.Source;
                txtForeignKey.Text = reportColumnsSchema.ForeignKey;
                txtPrimaryKey.Text = reportColumnsSchema.PrimaryKey;
                txtPrimaryTable.Text = reportColumnsSchema.PrimaryTable;
                txtPrimaryLabelColumn.Text = reportColumnsSchema.PrimaryLabelColumn;
                cboReportDataType.DataBind();
                cboReportDataType.SelectedValue = reportColumnsSchema.ReportDataTypeId.ToString();
            }
        }
Example #23
0
        public static List <BenchmarkPropertyTotal> Search(string classType, string pFilter, string pOrderBy, bool IsDescending, int pageNumber, int pageSize, ref int pTotalRows)
        {
            //probably should validate valid order by - or do in proc
            if (string.IsNullOrWhiteSpace(pOrderBy))
            {
                //not handling desc yet
                //parms.IsDescending = true;
                pOrderBy = "Id";
            }
            else
            {
                if (pOrderBy == "Order")
                {
                    pOrderBy = "Id";
                }
                else if (pOrderBy == "Title")
                {
                    pOrderBy = "Label";
                }
                else if (pOrderBy == "CodeTitle")
                {
                    pOrderBy = "Policy";
                }
                else if (pOrderBy == "Group")
                {
                    pOrderBy = "PropertyGroup";
                }
                else if (pOrderBy == "Totals")
                {
                    pOrderBy = "Total";
                }

                if ("id label policy propertygroup total".IndexOf(pOrderBy.ToLower()) == -1)
                {
                    pOrderBy = "Id";
                }
            }
            if (IsDescending)
            {
                pOrderBy += " DESC";
            }

            var list = ReportsManager.Search(classType, pFilter, pOrderBy, pageNumber, pageSize, ref pTotalRows);

            return(list);
        }
Example #24
0
        private ICommand GetCommand(string[] args, ReportsManager reportsManager, List <Transaction> transactions)
        {
            List <string> commands = args[commandInt].Split(' ').ToList();

            switch (commands[0].ToLower())
            {
            case timeCommand:
                return(new TimeCommand(args[fileToWriteInt], commands, transactions, reportsManager));

            case cityCommand:
                return(new CityCommand(args[fileToWriteInt], commands, transactions, reportsManager));

            case dailyCommand:
                return(new DailyCommand(args[fileToWriteInt], commands, transactions, reportsManager));

            case fullCommand:
                return(new FullCommand(fileExtention, commands, transactions, reportsManager));
            }

            return(default);
Example #25
0
    private static void SendPatientReportInMailForThread(Therapist therapist, Patient patient)
    {
        try
        {
            MailMessage mail = new MailMessage();

            mail.From = new MailAddress(SystemEmail);
            mail.To.Add(therapist.Email);
            mail.Subject = therapist.FirstName + " " + therapist.LastName + ": Patient Report";
            mail.Body    = "Report of patient: " + patient.FullName + ", id: " + patient.Id + ", is attached as requested.\nIf the file is not displaying correctly, please open it via Google Docs or Notpad.";

            Attachment attachment = new Attachment(ReportsManager.GetPatientReport(patient), patient.Id + ReportExtention);
            mail.Attachments.Add(attachment);

            SmtpServer.Send(mail);
        }
        catch (Exception e)
        {
            PrintToLog(e.ToString(), LogType.Error);
        }
    }
Example #26
0
 private void runReport()
 {
     SetControlPropertyThreadSafe(fMain.picProgress, "Image", Properties.Resources.progressWheel5);
     SetControlPropertyThreadSafe(fMain.lblNotify, "Text", "Generating Report....");
     SetControlPropertyThreadSafe(this.btnGenerateReport, "Enabled", false);
     try
     {
         Hashtable      rh = setParameters();
         ReportsManager RM = new ReportsManager();
         RM.runReport(rh, satellites, bySatellite, linelists);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, Assets.Messages.ErrorHeader);
     }
     finally
     {
         SetControlPropertyThreadSafe(fMain.picProgress, "Image", null);
         SetControlPropertyThreadSafe(fMain.lblNotify, "Text", "");
         SetControlPropertyThreadSafe(this.btnGenerateReport, "Enabled", true);
     }
 }
Example #27
0
        private void ultraButton1_Click(object sender, System.EventArgs e)
        {
            DateTime fechaDesde = DateTime.MinValue;
            DateTime fechaHasta = DateTime.MinValue;

            if (!(udteDesde.Value == null))
            {
                fechaDesde = (DateTime)udteDesde.Value;
            }
            if (!(udteHasta.Value == null))
            {
                fechaHasta = (DateTime)udteHasta.Value;
            }
            ArrayList impuestos = new ArrayList();

            if (cbIVA.Checked)
            {
                impuestos.Add("IVA");
            }
            if (cbIVADIF.Checked)
            {
                impuestos.Add("IVADIF");
            }

            if (cbIB.Checked)
            {
                impuestos.Add(Variables.GetValueString("Impuestos.IB"));
            }

            //German 20110602 - Tarea 0000149

            if (cbImpInt.Checked)
            {
                impuestos.Add(Variables.GetValueString("Impuestos.II") + "," + mz.erp.businessrules.tsy_Impuestos.GetListImpuestosInternosString());
            }
            //Fin German 20110602 - Tarea 0000149
            ReportsManager.PrintReportImpuestos(fechaDesde, fechaHasta, impuestos, this.MdiParent);
        }
Example #28
0
        protected void Evaluate()
        {
            bool hasErrors = false;

            foreach (System.Data.DataTable table in _data.Tables)
            {
                foreach (System.Data.DataRow row in table.Rows)
                {
                    if (row.HasErrors)
                    {
                        hasErrors = true;
                        /*20110328 - Tarea 0000057*/ FrmShowErrors _form = new /*20110328 - Tarea 0000057*/ FrmShowErrors(row);
                        _form.Show();
                    }
                }
            }
            if (!hasErrors)
            {
                MessageBox.Show("La acción se ha ejecutado con éxito");
                System.Data.DataSet data = mz.erp.businessrules.reportes.tfi_ReporteCierreCaja.GetCierreCaja(IdInstanciaCaja);
                ReportsManager.PrintReportCierreCaja(IdInstanciaCaja, this.MdiParent);
                Close();
            }
        }
    public override void OnActionExecuting(ActionExecutingContext filterContext)
    {
        var  reportID = Convert.ToInt32(filterContext.ActionParameters["id"]);
        var  report   = ReportsManager.GetByID(reportID);
        int  userID   = 0;
        bool hasID    = int.TryParse(filterContext.HttpContext.Session["CurrentUserID"].ToString(), out userID);

        if (!hasID)
        {
            filterContext.Controller.TempData["FlashMessage"] = "Please select a valid User to access their reports.";
            //Change the Result to point back to Home/Index
            filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { controller = "Home", action = "Index" }));
        }
        else     //We have selected a valid user
        {
            if (report.UserID != userID)
            {
                filterContext.Controller.TempData["FlashMessage"] = "You cannot view Reports you have not created.";
                //Change the Result to point back to Home/Index
                filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary(new { controller = "Home", action = "Index" }));
            }
        }
        base.OnActionExecuting(filterContext);
    }
Example #30
0
    void PersistColumnsSelected()
    {
        ReportsManager manager = new ReportsManager(null);

        if (!String.IsNullOrEmpty(Request["OrderedColumnsHidden"]))
        {
            Page.Settings.Columns.Clear();
            string[] values = Request["OrderedColumnsHidden"].Trim(',').Split(',');
            foreach (string value in values)
            {
                if (!String.IsNullOrEmpty(value))
                {
                    ReportColumnsSchema columnSchema = manager.GetColumnSchema(Page.Settings.Report.ReportTablesSchemaId.Value, Convert.ToInt32(value));

                    ReportColumn column = new ReportColumn();
                    column.ReportColumnsSchemaId = columnSchema.ReportColumnsSchemaId;
                    column.ReportTablesSchemaId  = columnSchema.ReportTablesSchemaId;
                    column.ReportDataTypeId      = columnSchema.ReportDataTypeId;
                    column.Name = columnSchema.Name;
                    Page.Settings.Columns.Add(column);
                }
            }
        }
    }
 public ClientResponse FindReport(string prefixText, int count)
 {
     return new ClientResponse(() =>
     {
         using (var reportsManager = new ReportsManager(null))
             return reportsManager.SearchReportAsArray(prefixText, count);
     });
 }
Example #32
0
 public ReportsController(ILogger <ReportsController> logger)
 {
     _logger         = logger;
     _reportsManager = new ReportsManager();
 }
Example #33
0
 public ReportsTests(ITestOutputHelper output, DynamicsWebAppFixture fixture) : base(output, fixture)
 {
     reportsManager = Services.GetRequiredService <ReportsManager>();
 }
 public ReportsTests(ITestOutputHelper output, WebApplicationFactory <Startup> webApplicationFactory) : base(output, webApplicationFactory)
 {
     reportsManager = services.GetRequiredService <ReportsManager>();
 }
    /// <summary>
    /// Get the Report Definition been Dynamic or Static
    /// </summary>
    /// <returns></returns>
    private void ProcessReportSettings(out DataTable table, out Report report)
    {
        //
        // Dynamic
        //
        //if (Page.PreviousPage is ReportGeneratorPage)
        //{
        InfoControl.Web.Reporting.DataClasses.ReportSettings settings = Session["ReportSettings"] as InfoControl.Web.Reporting.DataClasses.ReportSettings;

        //
        // Create Report Generator
        //
        ReportDefinitionBuilder generator = new ReportDefinitionBuilder(settings);



        //
        // Create Table
        //
        if (settings.MatrixRows.Count > 0)
        {
            MatrixBuilder matrixBuilder = new MatrixBuilder(settings);
            matrixBuilder.RowsStyle = rowsStyle;
            matrixBuilder.HeaderStyle = headerStyle;
            generator.ReportItems.Add(matrixBuilder.ToMatrix());
        }
        else
        {
            TableBuilder tableBuilder = new TableBuilder(settings);
            tableBuilder.RowsStyle = rowsStyle;
            tableBuilder.HeaderStyle = headerStyle;
            generator.ReportItems.Add(tableBuilder.ToTable());
        }


        //
        // Create the dataTable 
        //
        table = new ReportsManager(this).ExecuteReport(settings);


        report = generator.Report;
        //}
        //else
        //{
        //    table = new DataTable();
        //    string fileName = Server.MapPath("../Static/") + Request["r"];
        //    report = System.IO.File.ReadAllText(fileName).DeserializeFromXml<Report>();
        //}
    }
Example #36
0
 private void Awake()
 {
     reportsManager = FindObjectOfType <ReportsManager>();
 }