public void Render(string header) { // Output the list Heading = header; Utility.Announce("TeamListing " + Heading); var r = new SimpleTableReport(Heading, "") { DoRowNumbers = true }; if (!string.IsNullOrEmpty(SubHeading)) { r.SubHeader = SubHeading; } var ds = LoadData(); r.AddColumn(new ReportColumn("Name", "NAME", "{0,-15}")); r.AddColumn(new ReportColumn("Sacks", "SACKS", "{0,9}")); r.AddColumn(new ReportColumn("Interceptions", "INTERCEPTS", "{0,4}")); r.AddColumn(new ReportColumn("Points", "POINTS", "{0,5}")); var dt = ds.Tables[0]; dt.DefaultView.Sort = "Points DESC"; r.LoadBody(dt); FileOut = string.Format("{0}{1}.htm", Utility.OutputDirectory(), Heading); r.RenderAsHtml(FileOut, true); }
/// <summary> /// Looks at the EP xml to dump out a report /// </summary> public void RosterExperience() { Utility.Announce("NFLRosterReport.RosterExperience - creating simple report"); CheckPreRequisites(); var str = new SimpleTableReport(string.Format("Roster Experience {0}", Utility.CurrentSeason())); str.AddStyle( "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.ColumnHeadings = true; str.DoRowNumbers = true; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Team", "TEAM", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Player", "PLAYER", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Unit", "UNIT", "{0}", typeof(String))); str.AddColumn(new ReportColumn("EP", "EP", "{0}", typeof(Int32), true)); BuildTable(str); str.SetSortOrder("EP DESC"); str.RenderAsHtml( string.Format("{0}Experience-{1}-{2}.htm", Utility.OutputDirectory(), Utility.CurrentSeason(), Utility.CurrentWeek()), true); }
public string RenderTeams(ICalculate myCalculator) { Utility.Announce("TeamListing " + Heading); var r = new SimpleTableReport(Heading, "") { DoRowNumbers = true }; var ds = LoadTeams(myCalculator); // define the output r.AddColumn(new ReportColumn("Name", "NAME", "{0,-15}")); r.AddColumn(new ReportColumn("Rating", "RATING", "{0,-10}")); r.AddColumn(new ReportColumn("F Avg", "FPAVG", "{0,5:###.0}")); r.AddColumn(new ReportColumn("F Points", "POINTS", "{0,5}")); r.AddColumn(new ReportColumn("Scores", "SCORES", "{0,9}")); r.AddColumn(new ReportColumn("Sacks", "SACKS", "{0,5}")); r.AddColumn(new ReportColumn("Ints", "INTERCEPTS", "{0,4}")); r.AddColumn(new ReportColumn("Avg YDr allwd", "YDRALLOWED", "{0,5}")); r.AddColumn(new ReportColumn("Avg YDp allwd", "YDPALLOWED", "{0,5}")); r.AddColumn(new ReportColumn("Points allwd", "ALLOWED", "{0,5}")); var dt = ds.Tables[0]; dt.DefaultView.Sort = "FPAVG DESC"; r.LoadBody(dt); FileOut = string.Format("{0}{1}.htm", Utility.OutputDirectory(), Heading); r.RenderAsHtml(FileOut, true); return(FileOut); }
public void Render() { var str = new SimpleTableReport( string.Format( "Stat Grid {0}-{1}", Season.Year, StatInFocus ) ) {ReportHeader = StatInFocus}; StyleHelper.AddStyle( str ); str.ColumnHeadings = true; str.DoRowNumbers = true; str.ShowElapsedTime = false; str.IsFooter = false; str.Totals = true; str.AddColumn( new ReportColumn( "Team", "TEAM", "{0}" ) ); str.AddColumn( new ReportColumn( "Total", "TOT", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk01", "WK01", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk02", "WK02", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk03", "WK03", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk04", "WK04", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk05", "WK05", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk06", "WK06", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk07", "WK07", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk08", "WK08", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk09", "WK09", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk10", "WK10", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk11", "WK11", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk12", "WK12", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk13", "WK13", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk14", "WK14", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk15", "WK15", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk16", "WK16", "{0}", tally: true ) ); str.AddColumn( new ReportColumn( "Wk17", "WK17", "{0}", tally: true ) ); str.LoadBody( BuildTable() ); //str.SubHeader = SubHeading(); str.RenderAsHtml( FileName(), true ); }
/// <summary> /// Creates the output. /// </summary> public void Render() { var homeRatings = Game.HomeNflTeam.Ratings; var awayRatings = Game.AwayNflTeam.Ratings; Game.LoadPrediction(); // ratings get overwritten!! Game.HomeNflTeam.Ratings = homeRatings; Game.AwayNflTeam.Ratings = awayRatings; var str = new SimpleTableReport( "GameProjection " + Game.GameName() ); str.AddDenisStyle(); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AnnounceIt = AnnounceIt; str.AddColumn( new ReportColumn( "Team", "TEAM", "{0}" ) ); str.AddColumn( new ReportColumn( "Rating", "RATING", "{0}" ) ); str.AddColumn( new ReportColumn( "Score", "SCORE", "{0}", ScoreTotalDelegate ) ); str.AddColumn( new ReportColumn( "YDp", "YDP", "{0}", true ) ); str.AddColumn( new ReportColumn( "Tdp", "TDP", "{0}", true ) ); str.AddColumn( new ReportColumn( "YDr", "YDR", "{0}", true ) ); str.AddColumn( new ReportColumn( "Tdr", "TDR", "{0}", true ) ); str.AddColumn( new ReportColumn( "TDd", "TDD", "{0}", true ) ); str.AddColumn( new ReportColumn( "TDs", "TDS", "{0}", true ) ); str.AddColumn( new ReportColumn( "FGs", "FG", "{0}", true ) ); str.LoadBody( BuildTable() ); str.SubHeader = SubHeading(); str.FootNote = Game.PlayerProjectionsHtml(); // these projections are old str.RenderAsHtml( FileName(), true ); }
/// <summary> /// Creates the output. /// </summary> public void Render() { var str = new SimpleTableReport("GameProjection " + Game.GameName()); str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.AddStyle("label { display:block; float:left; width:130px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:right; }"); str.AddStyle("value { display:block; float:left; width:100px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:left; font-weight: bold; color:blue }"); str.AddStyle("#notes { float:right; height:auto; width:308px; font-size: 88%; background-color: #ffffe1; border: 1px solid #666666; padding: 5px; margin: 0px 0px 10px 10px; color:#666666 }"); str.AddStyle("div.notes H4 { background-image: url(images/icon_info.gif); background-repeat: no-repeat; background-position: top left; padding: 3px 0px 3px 27px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #666666; color: #666666; font-size: 110%;}"); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AnnounceIt = false; str.AddColumn(new ReportColumn("Team", "TEAM", "{0}")); str.AddColumn(new ReportColumn("Rating", "RATING", "{0}")); str.AddColumn(new ReportColumn("Score", "SCORE", "{0}")); str.AddColumn(new ReportColumn("YDp", "YDP", "{0}", true)); str.AddColumn(new ReportColumn("Tdp", "TDP", "{0}", true)); str.AddColumn(new ReportColumn("YDr", "YDR", "{0}", true)); str.AddColumn(new ReportColumn("Tdr", "TDR", "{0}", true)); str.AddColumn(new ReportColumn("TDd", "TDD", "{0}", true)); str.AddColumn(new ReportColumn("TDs", "TDS", "{0}", true)); str.AddColumn(new ReportColumn("FGs", "FG", "{0}", true)); str.LoadBody(BuildTable()); str.SubHeader = SubHeading(); str.RenderAsHtml(FileName(), true); }
public string RenderData(ArrayList unitList, string sHead, NFLWeek week) { // Output the list var tu1 = (TeamUnit)unitList[0]; var r = new SimpleTableReport { ReportHeader = sHead, ReportFooter = "", DoRowNumbers = true }; var ds = LoadData(unitList, week); r.AddColumn(new ReportColumn("Name", "TEAM", "{0,-15}")); r.AddColumn(new ReportColumn("Rating", "RATING", "{0,-1}")); r.AddColumn(new ReportColumn("Total", "tot", "{0,5}")); const int startAt = Constants.K_WEEKS_IN_A_SEASON; var currentWeek = new NFLWeek(Int32.Parse(Utility.CurrentSeason()), Int32.Parse(Utility.CurrentWeek()), false); for (var w = startAt; w > 0; w--) { var header = string.Format("Week {0}", currentWeek.Week); var fieldName = string.Format(FieldFormat, currentWeek.WeekNo); r.AddColumn(new ReportColumn(header, fieldName, "{0,5}", tu1.BGPicker)); currentWeek = currentWeek.PreviousWeek(currentWeek, true, false); } var dt = ds.Tables[0]; dt.DefaultView.Sort = "tot " + tu1.SortDirection(); r.LoadBody(dt); FileOut = string.Format("{0}Units\\{1}.htm", Utility.OutputDirectory(), sHead); r.RenderAsHtml(FileOut, true); return(FileOut); }
private SimpleTableReport DefineSte() { var str = new SimpleTableReport(Heading) { ColumnHeadings = true, DoRowNumbers = true }; str.AddColumn(new ReportColumn("Team", "TEAM", "{0,-20}")); str.AddColumn(new ReportColumn("Result", "RESULT", "{0}")); str.AddColumn(new ReportColumn("Pts", "SCORE", "{0:0.0}", typeof(int), tally: true)); str.AddColumn(new ReportColumn("Total", "TOTAL", "{0:0.00}", typeof(decimal), tally: true, colourDelegateIn: TotalBgPicker)); str.AddColumn(new ReportColumn("QB", "QB", "{0:0.00}", typeof(decimal), tally: true, colourDelegateIn: QbBgPicker)); str.AddColumn(new ReportColumn("RB", "RB", "{0:0.0}", typeof(decimal), tally: true, colourDelegateIn: RbBgPicker)); str.AddColumn(new ReportColumn("WR", "WR", "{0:0.0}", typeof(decimal), tally: true, colourDelegateIn: WrBgPicker)); str.AddColumn(new ReportColumn("TE", "TE", "{0:0.0}", typeof(decimal), tally: true, colourDelegateIn: TeBgPicker)); str.AddColumn(new ReportColumn("PK", "PK", "{0:0.0}", typeof(decimal), tally: true, colourDelegateIn: PkBgPicker)); str.AddColumn(new ReportColumn("Defense", "DEF", "{0:0.0}", typeof(decimal), tally: true, colourDelegateIn: DefBgPicker)); return(str); }
/// <summary> /// Creates the output. /// </summary> public void Render() { var homeRatings = Game.HomeNflTeam.Ratings; var awayRatings = Game.AwayNflTeam.Ratings; Game.LoadPrediction(); // ratings get overwritten!! Game.HomeNflTeam.Ratings = homeRatings; Game.AwayNflTeam.Ratings = awayRatings; var str = new SimpleTableReport("GameProjection " + Game.GameName()); str.AddDenisStyle(); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AnnounceIt = AnnounceIt; str.AddColumn(new ReportColumn("Team", "TEAM", "{0}")); str.AddColumn(new ReportColumn("Rating", "RATING", "{0}")); str.AddColumn(new ReportColumn("Score", "SCORE", "{0}", ScoreTotalDelegate)); str.AddColumn(new ReportColumn("YDp", "YDP", "{0}", true)); str.AddColumn(new ReportColumn("Tdp", "TDP", "{0}", true)); str.AddColumn(new ReportColumn("YDr", "YDR", "{0}", true)); str.AddColumn(new ReportColumn("Tdr", "TDR", "{0}", true)); str.AddColumn(new ReportColumn("TDd", "TDD", "{0}", true)); str.AddColumn(new ReportColumn("TDs", "TDS", "{0}", true)); str.AddColumn(new ReportColumn("FGs", "FG", "{0}", true)); str.LoadBody(BuildTable()); str.SubHeader = SubHeading(); str.FootNote = Game.PlayerProjectionsHtml(); // these projections are old str.RenderAsHtml(FileName(), true); }
public void GameRatings(NFLWeek week, string fTeamOwner) { var when = string.Format("Week{0}-{1:0#}", week.Season, Int32.Parse(week.Week)); #if DEBUG Utility.Announce(string.Format(" GameRatings for {0} owner {1}", when, fTeamOwner)); #endif var str = new SimpleTableReport(string.Format("Game Ratings {1}: {0:0#}", when, Name)) { ColumnHeadings = true, DoRowNumbers = true }; str.AddColumn(new ReportColumn("Rating", "RATING", "{0}", typeof(Int32), true)); str.AddColumn(new ReportColumn("Day", "DAY", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Time", "HOUR", "{0}", typeof(String))); str.AddColumn(new ReportColumn("AT", "AT", "{0}", typeof(String))); str.AddColumn(new ReportColumn("HT", "HT", "{0}", typeof(String))); str.AddColumn(new ReportColumn("TV", "TV", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Fav", "FAV", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Spr", "SPREAD", "{0}", typeof(String))); str.AddColumn(new ReportColumn("myTip", "TIP", "{0}", typeof(String))); BuildRatingsTable(str, fTeamOwner, week); str.RenderAsHtml(string.Format("{0}Ratings{2}{1}.htm", Utility.OutputDirectory(), when, CompCode), true); }
/// <summary> /// This is a model SimpleTableReport, using expanded ReportColumn constructors /// </summary> public void RosterReport() { var week = Int32.Parse(Utility.CurrentWeek()); var when = string.Format("Week{0}-{1:00}", Season, week); var str = new SimpleTableReport(string.Format("GridStats Roster : {0}", when)) { ColumnHeadings = true, DoRowNumbers = true }; str.AddColumn(new ReportColumn("Team", "FTEAM", "{0,-20}")); str.AddColumn(new ReportColumn("Value", "VALUE", "{0}", true)); str.AddColumn(new ReportColumn("Size", "SIZE", "{0}", true)); str.AddColumn(new ReportColumn("Avg", "AVG", "{0:#.#}")); str.AddColumn(new ReportColumn("Starters", "STARTERS", "{0}", true)); str.AddColumn(new ReportColumn("Backups", "BACKUPS", "{0}", true)); str.AddColumn(new ReportColumn("Others", "OTHERS", "{0}", true)); str.AddColumn(new ReportColumn("Injured", "INJURIES", "{0}", true)); str.AddColumn(new ReportColumn("TeamBias", "BIAS", "{0,-10}")); str.LoadBody(BuildTable()); FileOut = string.Format("{0}{1}\\RosterSummary\\{2}\\RosterSummary-{3:00}.htm", Utility.OutputDirectory(), Season, CompCode, week); str.RenderAsHtml(FileOut, true); }
public string RenderTeamToBeat(ICalculate myCalculator) { #if DEBUG Utility.Announce("RenderTeamToBeat " + Heading); #endif var r = new SimpleTableReport(Heading, "") { DoRowNumbers = true }; // Crunch the numbers var ds = LoadTeamToBeat(myCalculator); // define the output r.AddColumn(new ReportColumn("Name", "NAME", "{0,-15}")); r.AddColumn(new ReportColumn("Off Rating", "RATING", "{0,-10}")); r.AddColumn(new ReportColumn("Opponent", "OPP", "{0,-10}")); r.AddColumn(new ReportColumn("FP allwd", "POINTS", "{0,5}")); r.AddColumn(new ReportColumn("FP Avg allwd", "FPAVG", "{0,5:###.0}")); r.AddColumn(new ReportColumn("Scores allwd", "SCORES", "{0,9}")); r.AddColumn(new ReportColumn("Sacks allwd", "SACKS", "{0,5}")); r.AddColumn(new ReportColumn("Ints allwd", "INTERCEPTS", "{0,4}")); r.AddColumn(new ReportColumn("Avg Pts Scored", "ALLOWED", "{0,5}")); var dt = ds.Tables[0]; dt.DefaultView.Sort = "FPAVG DESC"; r.LoadBody(dt); FileOut = string.Format("{0}{1}.htm", Utility.OutputDirectory(), Heading); r.RenderAsHtml(FileOut, true); return(FileOut); }
/// <summary> /// Creates the output. /// </summary> public void Render() { var str = new SimpleTableReport("Player Projection " + Player.PlayerName + "-" + Season); str.AddStyle( "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.AddStyle( "label { display:block; float:left; width:130px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:right; }"); str.AddStyle( "value { display:block; float:left; width:100px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:left; font-weight: bold; color:blue }"); str.AddStyle( "#notes { float:right; height:auto; width:308px; font-size: 88%; background-color: #ffffe1; border: 1px solid #666666; padding: 5px; margin: 0px 0px 10px 10px; color:#666666 }"); str.AddStyle( "div.notes H4 { background-image: url(images/icon_info.gif); background-repeat: no-repeat; background-position: top left; padding: 3px 0px 3px 27px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #666666; color: #666666; font-size: 110%;}"); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Week", "WEEK", "{0}")); str.AddColumn(new ReportColumn("Matchup", "MATCH", "{0}")); str.AddColumn(new ReportColumn("Score", "SCORE", "{0}")); str.AddColumn(new ReportColumn("OppUnit", "OPPRATE", "{0}")); str.AddColumn(new ReportColumn("Projection", "PROJ", "{0:0.0}", true)); str.AddColumn(new ReportColumn("Y-FP", "FP", "{0:0.0}", true)); str.AddColumn(new ReportColumn("Stats", "STATS", "{0}")); str.AddColumn(new ReportColumn("Actual", "ACTUAL", "{0:0.0}", true)); str.AddColumn(new ReportColumn("Variation", "VAR", "{0:0.0}")); str.LoadBody(BuildTable()); str.SubHeader = SubHeading(); str.RenderAsHtml(FileName(), true); }
/// <summary> /// Renders the object as a simple HTML report. /// </summary> public void Render() { MetricsBase = new MetricsBase(new PreStyleBreakdown(), Season) { DoBreakdowns = true }; MetricsBase.Load(Season, skipPostseason:true); TeamList = MetricsBase.TeamList; var str = new SimpleTableReport( string.Format( "Balance Report {0}", Season ) ); str.AddStyle( "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }" ); str.AddStyle( "#main { margin-left:1em; }" ); str.AddStyle( "#dtStamp { font-size:0.8em; }" ); str.AddStyle( ".end { clear: both; }" ); str.AddStyle( ".gponame { color:white; background:black }" ); str.ColumnHeadings = true; str.DoRowNumbers = true; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn( new ReportColumn( "Team", "TEAM", "{0}", typeof( String ) ) ); str.AddColumn( new ReportColumn( "Rating", "RATING", "{0}", typeof( String ) ) ); str.AddColumn( new ReportColumn( "Plays", "PLAYS", "{0}", typeof( Int32 ), true ) ); str.AddColumn( new ReportColumn( "Passes", "PASSES", "{0}", typeof( Int32 ), true ) ); str.AddColumn( new ReportColumn( "Runs", "RUNS", "{0}", typeof( Int32 ), true ) ); str.AddColumn( new ReportColumn( "Pass%", "PPERCENT", "{0:0.00}", typeof( decimal ), false ) ); str.AddColumn( new ReportColumn( "Run%", "RPERCENT", "{0:0.00}", typeof( decimal ), false ) ); str.AddColumn( new ReportColumn( "Tdp", "TDPASSES", "{0}", typeof( string ) ) ); str.AddColumn( new ReportColumn( "Tdr", "TDRUNS", "{0}", typeof( String ) ) ); BuildTable( str ); str.SetSortOrder( "PASSES DESC"); str.RenderAsHtml( OutputFilename(), true ); }
/// <summary> /// Renders the object as a simple HTML report. /// </summary> public void Render() { MetricsBase = new MetricsBase(new PreStyleBreakdown(), Season) { DoBreakdowns = true }; MetricsBase.Load(Season, skipPostseason: true); TeamList = MetricsBase.TeamList; var str = new SimpleTableReport(string.Format("Balance Report {0}", Season)); str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.ColumnHeadings = true; str.DoRowNumbers = true; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Team", "TEAM", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Rating", "RATING", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Plays", "PLAYS", "{0}", typeof(Int32), true)); str.AddColumn(new ReportColumn("Passes", "PASSES", "{0}", typeof(Int32), true)); str.AddColumn(new ReportColumn("Runs", "RUNS", "{0}", typeof(Int32), true)); str.AddColumn(new ReportColumn("Pass%", "PPERCENT", "{0:0.00}", typeof(decimal), false)); str.AddColumn(new ReportColumn("Run%", "RPERCENT", "{0:0.00}", typeof(decimal), false)); str.AddColumn(new ReportColumn("Tdp", "TDPASSES", "{0}", typeof(string))); str.AddColumn(new ReportColumn("Tdr", "TDRUNS", "{0}", typeof(String))); BuildTable(str); str.SetSortOrder("PASSES DESC"); str.RenderAsHtml(OutputFilename(), true); }
public ScoreCount(string season) { Season = season; _r = new SimpleTableReport(string.Format("Score Counts : {0}", Season)) {ColumnHeadings = true, Totals = false, DoRowNumbers = false}; _r.AddColumn(new ReportColumn("Score Type", "SCORE", "{0,-20}")); _r.AddColumn(new ReportColumn("Count", "VALUE", "{0}", true)); _dt = new DataTable(); var sf = new ScoreFactory(); _scoreList = sf.GetAllScoreTypes(); Load(); }
/// <summary> /// Renders the object as a simple HTML report. /// </summary> public void RenderAsHtml() { FileOut = string.Format("{2}{0}//victory//vp-{1:0#}.htm", _season, Int32.Parse(Utility.CurrentWeek()), Utility.OutputDirectory()); var str = new SimpleTableReport("Victory Points : Week " + Utility.CurrentWeek()) { ColumnHeadings = true, DoRowNumbers = true }; str.AddColumn(new ReportColumn("Team", "TEAM", "{0,-20}")); str.AddColumn(new ReportColumn("VP", "VP", "{0}")); str.LoadBody(BuildTable()); str.RenderAsHtml(FileOut, true); }
public ScoreCount(string season) { Season = season; _r = new SimpleTableReport(string.Format("Score Counts : {0}", Season)) { ColumnHeadings = true, Totals = false, DoRowNumbers = false }; _r.AddColumn(new ReportColumn("Score Type", "SCORE", "{0,-20}")); _r.AddColumn(new ReportColumn("Count", "VALUE", "{0}", true)); _dt = new DataTable(); var sf = new ScoreFactory(); _scoreList = sf.GetAllScoreTypes(); Load(); }
private static void AddWeeklyColumns(SimpleTableReport str) { for (int i = 1; i < 18; i++) { var fieldName = string.Format("Wk{0:0#}", i); str.AddColumn(new ReportColumn(fieldName, fieldName, "{0}")); } }
public override void RenderAsHtml() { Name = "Market Analysis " + Season; var dt = GetTeams(); _mTeamList = new ArrayList(); foreach (var t in from DataRow dr in dt.Rows select dr["TEAMID"].ToString() into teamCode select new NflTeam(teamCode)) { t.CountFaPoints(Season); _mTeamList.Add(t); } // Use a simple table output to show the rankings var str = new SimpleTableReport { ReportHeader = Name, ColumnHeadings = true, DoRowNumbers = true }; str.AddColumn(new ReportColumn("Team", "TEAM", "{0,-20}")); str.AddColumn(new ReportColumn("FA Points", "FA", "{0,5}")); str.AddColumn(new ReportColumn("In", "IN", "{0,5}")); str.AddColumn(new ReportColumn("Got", "GOT", "{0}")); str.AddColumn(new ReportColumn("Out", "OUT", "{0,5}")); str.AddColumn(new ReportColumn("Lost", "LOST", "{0}")); str.AddColumn(new ReportColumn("Net", "NET", "{0}")); str.LoadBody(BuildTable()); FileOut = OutputFilename(); str.RenderAsHtml( FileOut, true); }
/// <summary> /// Renders the object as a simple HTML report. /// </summary> public override void RenderAsHtml() { Name = "Strength of Schedule"; var ds = Utility.TflWs.TeamsDs(Season); var dt = ds.Tables["Team"]; _teamList = new ArrayList(); foreach (DataRow dr in dt.Rows) { var t = new NflTeam(dr["TEAMID"].ToString(), Season, Int32.Parse(dr["WINS"].ToString()), dr["TEAMNAME"].ToString()); t.StrengthOfSchedule(); _teamList.Add(t); } var str = new SimpleTableReport(Name) { ColumnHeadings = true, DoRowNumbers = true }; str.AddColumn(new ReportColumn("Team", KFieldTeam, "{0,-20}")); str.AddColumn(new ReportColumn("SoS", KFieldSos, "{0}")); str.AddColumn(new ReportColumn("Exp W", KFieldExpWins, "{0}")); str.AddColumn(new ReportColumn("Exp L", KFieldExpLosses, "{0}")); str.AddColumn(new ReportColumn("Prev W", KFieldWins, "{0}")); str.AddColumn(new ReportColumn("Prev L", KFieldLosses, "{0}")); str.AddColumn(new ReportColumn("Var", KFieldVariance, "{0}")); str.LoadBody(BuildTable()); str.RenderAsHtml(OutputFilename(), true); }
/// <summary> /// Creates the output. /// </summary> public void Render() { var str = new SimpleTableReport( "Player Profile " + Player.PlayerName ); str.AddStyle( "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }" ); str.AddStyle( "#main { margin-left:1em; }" ); str.AddStyle( "#dtStamp { font-size:0.8em; }" ); str.AddStyle( ".end { clear: both; }" ); str.AddStyle( ".gponame { color:white; background:black }" ); str.AddStyle( "label { display:block; float:left; width:130px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:right; }" ); str.AddStyle( "value { display:block; float:left; width:100px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:left; font-weight: bold; color:blue }" ); str.AddStyle( "#notes { float:right; height:auto; width:308px; font-size: 88%; background-color: #ffffe1; border: 1px solid #666666; padding: 5px; margin: 0px 0px 10px 10px; color:#666666 }" ); str.AddStyle( "div.notes H4 { background-image: url(images/icon_info.gif); background-repeat: no-repeat; background-position: top left; padding: 3px 0px 3px 27px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #666666; color: #666666; font-size: 110%;}" ); str.ColumnHeadings = true; str.DoRowNumbers = true; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn( new ReportColumn( "Week", "WEEK", "{0}" ) ); str.AddColumn( new ReportColumn( "Team", "TEAM", "{0}" ) ); str.AddColumn( new ReportColumn( "U-Res", "URES", "{0}" ) ); str.AddColumn( new ReportColumn( "EP", "EP", "{0:0.0}", true ) ); str.AddColumn( new ReportColumn( "Matchup", "MATCH", "{0}" ) ); str.AddColumn( new ReportColumn( "Stats", "STATS", "{0}" ) ); str.AddColumn( new ReportColumn( "F Pts", "FPTS", "{0}", true ) ); str.LoadBody( BuildTable() ); str.SubHeader = SubHeading(); str.RenderAsHtml( string.Format("{0}players//{1}.htm", Utility.OutputDirectory(), Player.PlayerCode), true); }
/// <summary> /// Renders the object as a simple HTML report. /// </summary> public override void RenderAsHtml() { Name = "Strength of Schedule"; var ds = Utility.TflWs.TeamsDs(Season); var dt = ds.Tables["Team"]; _teamList = new ArrayList(); foreach (DataRow dr in dt.Rows) { var t = new NflTeam(dr["TEAMID"].ToString(), Season, Int32.Parse(dr["WINS"].ToString()), dr["TEAMNAME"].ToString()); t.StrengthOfSchedule(); _teamList.Add(t); } var str = new SimpleTableReport(Name) {ColumnHeadings = true, DoRowNumbers = true}; str.AddColumn(new ReportColumn("Team", KFieldTeam, "{0,-20}")); str.AddColumn(new ReportColumn("SoS", KFieldSos, "{0}")); str.AddColumn(new ReportColumn("Exp W", KFieldExpWins, "{0}")); str.AddColumn(new ReportColumn("Exp L", KFieldExpLosses, "{0}")); str.AddColumn(new ReportColumn("Prev W", KFieldWins, "{0}")); str.AddColumn(new ReportColumn("Prev L", KFieldLosses, "{0}")); str.AddColumn(new ReportColumn("Var", KFieldVariance, "{0}")); str.LoadBody(BuildTable()); str.RenderAsHtml( OutputFilename(), true ); }
private void Render() { SimpleTableReport str = new SimpleTableReport( "Gordan Rankings : Week " + Utility.CurrentWeek() ); str.ColumnHeadings = true; str.DoRowNumbers = true; str.AddColumn( new ReportColumn( "Team", "TEAM", "{0,-20}" ) ); str.AddColumn( new ReportColumn( "Rating", "RANK", "{0}" ) ); for ( int i = Int32.Parse( Utility.CurrentWeek() ); i > -1; i-- ) { string colName = string.Format( "Week{0:0#}", i ); str.AddColumn( new ReportColumn( colName, colName, "{0}" ) ); } str.LoadBody( dt ); str.RenderAsHtml( string.Format("{0}Gordan{1}{2}.htm", Utility.OutputDirectory(), s.Year, Utility.CurrentWeek()), true ); }
private SimpleTableReport DefineSte() { var str = new SimpleTableReport(Heading) { ColumnHeadings = true, DoRowNumbers = true }; str.AddColumn(new ReportColumn("Team", "TEAM", "{0,-20}")); str.AddColumn( new ReportColumn( "Total", "TOTAL", "{0:0.00}", typeof(decimal), tally: true, colourDelegateIn: PickTotalColourDelegate("TOT"))); str.AddColumn( new ReportColumn( "QB", "QB", "{0:0.00}", typeof(decimal), tally: true, colourDelegateIn: Simple32BgPicker)); str.AddColumn( new ReportColumn( "RB", "RB", "{0:0.00}", typeof(decimal), tally: true, colourDelegateIn: Simple32BgPicker)); str.AddColumn( new ReportColumn( "WR", "WR", "{0:0.00}", typeof(decimal), tally: true, colourDelegateIn: Simple32BgPicker)); str.AddColumn( new ReportColumn( "TE", "TE", "{0:0.00}", typeof(decimal), tally: true, colourDelegateIn: Simple32BgPicker)); str.AddColumn( new ReportColumn( "PK", "PK", "{0:0.00}", typeof(decimal), tally: true, colourDelegateIn: Simple32BgPicker)); return(str); }
public void Render() { LoadTeams(); var heading = Week == null ? "GL Scores Season " + Season : "Scores : Week " + Week; var str = new SimpleTableReport(heading); str.ColumnHeadings = true; str.DoRowNumbers = true; str.AddColumn(new ReportColumn("Team", "TEAM", "{0,-20}")); str.AddColumn(new ReportColumn("Total", "TOTAL", "{0}")); AddWeeklyColumns(str); str.LoadBody(BuildTable()); FileOut = Week == null?string.Format("{0}{1}//Scores//GLScores.htm", Utility.OutputDirectory(), Season) : string.Format("{0}{1}//Scores//GLScores-{2}.htm", Utility.OutputDirectory(), Season, Week); str.RenderAsHtml(FileOut, true); }
private void Render() { SimpleTableReport str = new SimpleTableReport("Gordan Rankings : Week " + Utility.CurrentWeek()); str.ColumnHeadings = true; str.DoRowNumbers = true; str.AddColumn(new ReportColumn("Team", "TEAM", "{0,-20}")); str.AddColumn(new ReportColumn("Rating", "RANK", "{0}")); for (int i = Int32.Parse(Utility.CurrentWeek()); i > -1; i--) { string colName = string.Format("Week{0:0#}", i); str.AddColumn(new ReportColumn(colName, colName, "{0}")); } str.LoadBody(dt); str.RenderAsHtml( string.Format("{0}Gordan{1}{2}.htm", Utility.OutputDirectory(), s.Year, Utility.CurrentWeek()), true); }
public void RenderAsHtml(string fileName, string season) { var st = new SimpleTableReport("Frequency Table " + name, StdFooter()) { ColumnHeadings = true }; st.AddColumn(new ReportColumn("Occurence", "Occurence", "{0:##0}")); st.AddColumn(new ReportColumn("Freq.", "Frequency", "{0}")); st.AddColumn(new ReportColumn("Cum. Freq.", "Cumulative", "{0}")); st.AddColumn(new ReportColumn("Percent ", "Percent", "{0:##0.0}")); st.AddColumn(new ReportColumn("Cum. %", "TotPercent", "{0:##0.0}")); st.LoadBody(dt); st.DoRowNumbers = false; st.ShowElapsedTime = false; FileName = string.Format("{0}{2}\\Frequency\\{1}.htm", Utility.OutputDirectory(), name, season); st.RenderAsHtml(FileName, true); }
public override void RenderAsHtml() { var str = new SimpleTableReport("Run Report"); str.AddDenisStyle(); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = true; str.IsFooter = false; str.AddColumn( new ReportColumn( "Machine", "MACHINE", "{0}", typeof( String ) ) ); str.AddColumn( new ReportColumn( "Report", "REPORT", "{0}", typeof( String ) ) ); str.AddColumn( new ReportColumn( "Finished", "FINISHED", "{0}", typeof( String ) ) ); str.AddColumn( new ReportColumn( "At", "FINISHAT", "{0}", typeof( String ) ) ); str.AddColumn( new ReportColumn( "Elapsed", "ELAPSED", "{0}", typeof( string ) ) ); BuildTable( str ); //str.SetSortOrder( "FINISHED DESC" ); str.RenderAsHtml( OutputFilename(), true ); Finish(); }
public override void RenderAsHtml() { var str = new SimpleTableReport("Run Report"); str.AddDenisStyle(); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = true; str.IsFooter = false; str.AddColumn(new ReportColumn("Machine", "MACHINE", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Report", "REPORT", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Finished", "FINISHED", "{0}", typeof(String))); str.AddColumn(new ReportColumn("At", "FINISHAT", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Elapsed", "ELAPSED", "{0}", typeof(string))); BuildTable(str); //str.SetSortOrder( "FINISHED DESC" ); str.RenderAsHtml(OutputFilename(), true); Finish(); }
public void Render() { //RosterLib.Utility.Announce( "TeamListing " + Heading ); var r = new SimpleTableReport(Heading, "") { DoRowNumbers = true }; var ds = LoadData(); r.AddColumn(new ReportColumn("Name", "NAME", "{0,-15}")); r.AddColumn(new ReportColumn("Scores", "SCORES", "{0,9}")); r.AddColumn(new ReportColumn("Sacks", "SACKS", "{0,9}")); r.AddColumn(new ReportColumn("Interceptions", "INTERCEPTS", "{0,4}")); r.AddColumn(new ReportColumn("Points", "POINTS", "{0,5}")); var dt = ds.Tables[0]; dt.DefaultView.Sort = "Points DESC"; r.LoadBody(dt); FileOut = string.Format("{0}{1}.htm", Utility.OutputDirectory(), Heading); r.RenderAsHtml(FileOut, true); }
/// <summary> /// Creates the output. /// </summary> public void Render() { SimpleTableReport str = new SimpleTableReport( string.Format( "{0}-{1}", StatCode, Team.TeamCode ) ); str.AddStyle( "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }" ); str.AddStyle( "#main { margin-left:1em; }" ); str.AddStyle( "#dtStamp { font-size:0.8em; }" ); str.AddStyle( ".end { clear: both; }" ); str.AddStyle( ".gponame { color:white; background:black }" ); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn( new ReportColumn( "Week", "WEEK", "{0}", typeof( String ) ) ); str.AddColumn( new ReportColumn( "Opp", "OPP", "{0}", typeof( String ) ) ); str.AddColumn( new ReportColumn( "Count", "COUNT", "{0}", typeof( String ), true ) ); str.AddColumn( new ReportColumn( "Who", "WHO", "{0}", typeof( String ) ) ); BuildTable( str ); //str.SubHeader = SubHeading(); str.RenderAsHtml(string.Format("{0}{1}-{2}.htm", Utility.OutputDirectory(), Team.TeamCode, StatCode), true); }
public void Render() { var str = new SimpleTableReport( string.Format( "Tipping Comp - {0:d}", DateTime.Now ) ); str.AddStyle( "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 761px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }" ); str.AddStyle( "#main { margin-left:1em; }" ); str.AddStyle( "#dtStamp { font-size:0.8em; }" ); str.AddStyle( ".end { clear: both; }" ); str.AddStyle( ".gponame { color:white; background:black }" ); str.ColumnHeadings = true; str.DoRowNumbers = true; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn( new ReportColumn( "Method", "METHOD", "{0}", typeof( String ), false ) ); str.AddColumn( new ReportColumn( "Wins", "WINS", "{0}", typeof( Int32 ), tally: true ) ); str.AddColumn( new ReportColumn( "Losses", "LOSSES", "{0}", typeof( Int32 ), tally:true ) ); str.AddColumn( new ReportColumn( "Ties", "TIES", "{0}", typeof( Int32 ), tally: true ) ); str.AddColumn( new ReportColumn( "Clip", "CLIP", "{0:#.##0}", typeof( Decimal ), false ) ); BuildTable( str ); str.SetSortOrder( "Clip DESC" ); str.RenderAsHtml( OutputFilename, true ); }
public void Render() { var str = new SimpleTableReport("Tipping Report " + m_Season); str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.AddStyle("label { display:block; float:left; width:130px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:right; }"); str.AddStyle("value { display:block; float:left; width:100px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:left; font-weight: bold; color:blue }"); str.AddStyle("#notes { float:right; height:auto; width:308px; font-size: 88%; background-color: #ffffe1; border: 1px solid #666666; padding: 5px; margin: 0px 0px 10px 10px; color:#666666 }"); str.AddStyle("div.notes H4 { background-image: url(images/icon_info.gif); background-repeat: no-repeat; background-position: top left; padding: 3px 0px 3px 27px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #666666; color: #666666; font-size: 110%;}"); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Wk", "WEEK", "{0}", typeof(String))); str.AddColumn(new ReportColumn("G", "GAMES", "{0}", typeof(Int32), true)); str.AddColumn(new ReportColumn("Spr", "SPREAD", "{0}", typeof(Int32), true)); str.AddColumn(new ReportColumn("MyT", "MYTIPS", "{0}", typeof(Int32), true)); str.AddColumn(new ReportColumn("ATS", "ATS", "{0}", typeof(Int32), true)); str.AddColumn(new ReportColumn("H", "HOME", "{0}", typeof(Int32), true)); BuildTable(str); str.RenderAsHtml(string.Format("{0}//tipping{1}.htm", Utility.OutputDirectory(), m_Season), true); }
/// <summary> /// Creates the output. /// </summary> public void Render() { var str = new SimpleTableReport("Player Profile " + Player.PlayerName); str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.AddStyle("label { display:block; float:left; width:130px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:right; }"); str.AddStyle("value { display:block; float:left; width:100px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:left; font-weight: bold; color:blue }"); str.AddStyle("#notes { float:right; height:auto; width:308px; font-size: 88%; background-color: #ffffe1; border: 1px solid #666666; padding: 5px; margin: 0px 0px 10px 10px; color:#666666 }"); str.AddStyle("div.notes H4 { background-image: url(images/icon_info.gif); background-repeat: no-repeat; background-position: top left; padding: 3px 0px 3px 27px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #666666; color: #666666; font-size: 110%;}"); str.ColumnHeadings = true; str.DoRowNumbers = true; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Week", "WEEK", "{0}")); str.AddColumn(new ReportColumn("Team", "TEAM", "{0}")); str.AddColumn(new ReportColumn("U-Res", "URES", "{0}")); str.AddColumn(new ReportColumn("EP", "EP", "{0:0.0}", true)); str.AddColumn(new ReportColumn("Matchup", "MATCH", "{0}")); str.AddColumn(new ReportColumn("Stats", "STATS", "{0}")); str.LoadBody(BuildTable()); str.SubHeader = SubHeading(); str.RenderAsHtml(string.Format("{0}players//{1}.htm", Utility.OutputDirectory(), Player.PlayerCode), true); }
public void Render() { SimpleTableReport str = new SimpleTableReport( "Volume Report " + m_Season ); str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.AddStyle("label { display:block; float:left; width:130px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:right; }"); str.AddStyle("value { display:block; float:left; width:100px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:left; font-weight: bold; color:blue }"); str.AddStyle("#notes { float:right; height:auto; width:308px; font-size: 88%; background-color: #ffffe1; border: 1px solid #666666; padding: 5px; margin: 0px 0px 10px 10px; color:#666666 }"); str.AddStyle("div.notes H4 { background-image: url(images/icon_info.gif); background-repeat: no-repeat; background-position: top left; padding: 3px 0px 3px 27px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #666666; color: #666666; font-size: 110%;}"); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Wk", "WEEK", "{0}", typeof(String) )); str.AddColumn(new ReportColumn("G", "GAMES", "{0}", typeof(Int32), true )); str.AddColumn(new ReportColumn("Spr", "SPREAD", "{0}", typeof(Int32), true )); str.AddColumn(new ReportColumn("MyT", "MYTIPS", "{0}", typeof(Int32), true )); str.AddColumn(new ReportColumn("ATS", "ATS", "{0}", typeof(Int32), true)); str.AddColumn(new ReportColumn("H", "HOME", "{0}", typeof(Int32), true)); BuildTable(str); str.RenderAsHtml(string.Format("{0}//tipping{1}.htm", Utility.OutputDirectory(), m_Season), true); }
public void Render() { LoadTeams(); // By each Team var heading = Week == null ? "GL Scores Season " + Season : "Scores : Week " + Week; var str = new SimpleTableReport(heading) { ColumnHeadings = true, DoRowNumbers = true }; str.AddColumn(new ReportColumn("Team", "TEAM", "{0,-20}")); str.AddColumn(new ReportColumn("Total", "TOTAL", "{0}")); AddWeeklyColumns(str); str.LoadBody(BuildAndLoadDataTable()); FileOut = Week == null ? $"{Utility.OutputDirectory()}{Season}//Scores//GLScores.htm" : $"{Utility.OutputDirectory()}{Season}//Scores//GLScores-{Week}.htm"; str.RenderAsHtml(FileOut, persist: true); }
/// <summary> /// Creates the output. /// </summary> public void Render() { SimpleTableReport str = new SimpleTableReport(string.Format("{0}-{1}", StatCode, Team.TeamCode)); str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Week", "WEEK", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Opp", "OPP", "{0}", typeof(String))); str.AddColumn(new ReportColumn("Count", "COUNT", "{0}", typeof(String), true)); str.AddColumn(new ReportColumn("Who", "WHO", "{0}", typeof(String))); BuildTable(str); //str.SubHeader = SubHeading(); str.RenderAsHtml(string.Format("{0}{1}-{2}.htm", Utility.OutputDirectory(), Team.TeamCode, StatCode), true); }
public void Render() { var str = new SimpleTableReport(string.Format("Tipping Comp - {0:d}", DateTime.Now)); str.AddStyle("#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 761px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.ColumnHeadings = true; str.DoRowNumbers = true; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Method", "METHOD", "{0}", typeof(String), false)); str.AddColumn(new ReportColumn("Wins", "WINS", "{0}", typeof(Int32), tally: true)); str.AddColumn(new ReportColumn("Losses", "LOSSES", "{0}", typeof(Int32), tally: true)); str.AddColumn(new ReportColumn("Ties", "TIES", "{0}", typeof(Int32), tally: true)); str.AddColumn(new ReportColumn("Clip", "CLIP", "{0:#.##0}", typeof(Decimal), false)); BuildTable(str); str.SetSortOrder("Clip DESC"); str.RenderAsHtml(OutputFilename, true); }
public void GameRatings( NFLWeek week, string fTeamOwner ) { var when = string.Format( "Week{0}-{1:0#}", week.Season, Int32.Parse( week.Week ) ); #if DEBUG Utility.Announce( string.Format( " GameRatings for {0} owner {1}", when, fTeamOwner ) ); #endif var str = new SimpleTableReport( string.Format( "Game Ratings {1}: {0:0#}", when, Name ) ) {ColumnHeadings = true, DoRowNumbers = true}; str.AddColumn( new ReportColumn( "Rating", "RATING", "{0}", typeof( Int32 ), true ) ); str.AddColumn( new ReportColumn( "Day", "DAY", "{0}", typeof( String) ) ); str.AddColumn( new ReportColumn( "Time", "HOUR", "{0}", typeof( String) ) ); str.AddColumn( new ReportColumn( "AT", "AT", "{0}", typeof( String) ) ); str.AddColumn( new ReportColumn( "HT", "HT", "{0}", typeof( String) ) ); str.AddColumn( new ReportColumn( "TV", "TV", "{0}", typeof( String) ) ); str.AddColumn( new ReportColumn( "Fav", "FAV", "{0}", typeof( String) ) ); str.AddColumn( new ReportColumn( "Spr", "SPREAD", "{0}", typeof( String) ) ); str.AddColumn( new ReportColumn( "myTip", "TIP", "{0}", typeof( String) ) ); BuildRatingsTable( str, fTeamOwner, week ); str.RenderAsHtml(string.Format("{0}Ratings{2}{1}.htm", Utility.OutputDirectory(), when, CompCode), true); }
private static void AddWeeklyColumns( SimpleTableReport str) { for (int i = 1; i < 18; i++) { var fieldName = $"Wk{i:0#}"; str.AddColumn( new ReportColumn( header: fieldName, source: fieldName, format: "{0}")); } }
public void Render(string header) { // Output the list Heading = header; Utility.Announce("TeamListing " + Heading); var r = new SimpleTableReport(Heading, "") {DoRowNumbers = true}; if (!string.IsNullOrEmpty(SubHeading)) r.SubHeader = SubHeading; var ds = LoadData(); r.AddColumn(new ReportColumn("Name", "NAME", "{0,-15}")); r.AddColumn(new ReportColumn("Sacks", "SACKS", "{0,9}")); r.AddColumn(new ReportColumn("Interceptions", "INTERCEPTS", "{0,4}")); r.AddColumn(new ReportColumn("Points", "POINTS", "{0,5}")); var dt = ds.Tables[0]; dt.DefaultView.Sort = "Points DESC"; r.LoadBody(dt); FileOut = string.Format("{0}{1}.htm", Utility.OutputDirectory(), Heading); r.RenderAsHtml( FileOut, true ); }
public string RenderBets(ArrayList betList, bool showResults, bool persist) { RosterLib.Utility.Announce("Producing Best Bets"); string resultsSuffix = String.Empty; if (theWeek.HasPassed()) { resultsSuffix = "-results"; } DataTable dt = LoadBets(betList); SimpleTableReport st = new SimpleTableReport("Best Bets Week " + Week + ":" + Season, Footer(showResults)); st.ColumnHeadings = true; st.AddColumn(new ReportColumn("Team", "TEAM", "{0,-20}")); st.AddColumn(new ReportColumn("H/A", "TURF", "{0}")); st.AddColumn(new ReportColumn("Opp", "OPPONENT", "{0,-20}")); st.AddColumn(new ReportColumn("Spread", "SPREAD", "{0}")); st.AddColumn(new ReportColumn("Date (au)", "DATE", "{0}")); st.AddColumn(new ReportColumn("Time (au)", "TIME", "{0}")); st.AddColumn(new ReportColumn("Reason(s)", "REASONS", "{0}")); st.AddColumn(new ReportColumn("Amount", "AMOUNT", "{0}")); st.AddColumn(new ReportColumn("Result", "RESULT", "{0}")); st.AddColumn(new ReportColumn("Return", "WINNINGS", "{0}")); dt.DefaultView.Sort = "GAMECODE ASC"; st.LoadBody(dt); st.CarryRow = false; st.ShowElapsedTime = false; string betHTML = st.RenderAsHtml( string.Format("{0}bets//BestBets Week {1:0#} {2}{3}.htm", Utility.OutputDirectory(), Int32.Parse(Week), Utility.CurrentSeason(), resultsSuffix), persist); return(betHTML); }
/// <summary> /// This is a model SimpleTableReport, using expanded ReportColumn constructors /// </summary> public void RosterReport() { string when = string.Format("Week{0}-{1:00}", Season, Int32.Parse(Utility.CurrentWeek())); SimpleTableReport str = new SimpleTableReport(string.Format("ESPN Roster : {0}", when)); str.ColumnHeadings = true; str.DoRowNumbers = true; str.AddColumn(new ReportColumn("Team", "FTEAM", "{0,-20}")); str.AddColumn(new ReportColumn("Value", "VALUE", "{0}", true)); str.AddColumn(new ReportColumn("Size", "SIZE", "{0}", true)); str.AddColumn(new ReportColumn("Avg", "AVG", "{0:#.#}")); str.AddColumn(new ReportColumn("Starters", "STARTERS", "{0}", true)); str.AddColumn(new ReportColumn("Backups", "BACKUPS", "{0}", true)); str.AddColumn(new ReportColumn("Others", "OTHERS", "{0}", true)); str.AddColumn(new ReportColumn("Injured", "INJURIES", "{0}", true)); str.AddColumn(new ReportColumn("TeamBias", "BIAS", "{0,-10}")); str.LoadBody(BuildTable()); str.RenderAsHtml(string.Format("{0}rosters\\Roster{2}{1}.htm", Utility.OutputDirectory(), when, CompCode), true); }
public void Render() { LoadTeams(); var heading = Week == null ? "Scores Season " + Season : "Scores : Week " + Week; var str = new SimpleTableReport( heading ); str.ColumnHeadings = true; str.DoRowNumbers = true; str.AddColumn( new ReportColumn( "Team", "TEAM", "{0,-20}" ) ); str.AddColumn( new ReportColumn( "Total", "TOTAL", "{0}" ) ); str.AddColumn( new ReportColumn( "Passes", "TDp", "{0}" ) ); str.AddColumn( new ReportColumn( "Runs", "TDr", "{0}" ) ); str.AddColumn( new ReportColumn( "Punt returns", "TDt", "{0}" ) ); str.AddColumn( new ReportColumn( "KO returns", "TDk", "{0}" ) ); str.AddColumn( new ReportColumn( "Int returns", "TDi", "{0}" ) ); str.AddColumn( new ReportColumn( "Fumble returns", "TDf", "{0}" ) ); str.LoadBody( BuildTable() ); FileOut = Week == null ? string.Format( "{0}//Scores/{1}//Scores.htm", Utility.OutputDirectory(), Season ) : string.Format( "{0}//Scores/{1}//Scores-{2}.htm",Utility.OutputDirectory(), Season, Week ); str.RenderAsHtml( FileOut, true ); }
public string RenderData(ArrayList playerList, string sHead, NFLWeek week) { // Output the list var r = new SimpleTableReport {ReportHeader = sHead, ReportFooter = "", DoRowNumbers = true}; var ds = LoadData(playerList, week); r.AddColumn(new ReportColumn("Name", "NAME", "{0,-15}")); r.AddColumn(new ReportColumn("Team", "CURRTEAM", "{0,2}")); r.AddColumn(new ReportColumn("Role", "ROLE", "{0,1}")); r.AddColumn(new ReportColumn("Owner", "FT", "{0,2}")); r.AddColumn(new ReportColumn("Total", "tot", "{0,5}")); var startAt = FullStart ? Constants.K_WEEKS_IN_A_SEASON : Constants.K_WEEKS_IN_REGULAR_SEASON; for (var w = startAt; w > 0; w--) { var header = string.Format("Week {0}", w); var fieldName = string.Format(FieldFormat, w); if ( IsGridStatsQBReport( sHead ) ) r.AddColumn( new ReportColumn(header, fieldName, "{0,5}", QbBgPicker) ); if ( IsYahooQbReport( sHead) ) r.AddColumn(new ReportColumn(header, fieldName, "{0,5}", EspnQbBgPicker)); if ( IsYahooRbReport( sHead ) ) r.AddColumn( new ReportColumn(header, fieldName, "{0,5}", EspnRbBgPicker)); if ( IsYahooWrReport( sHead ) ) r.AddColumn(new ReportColumn(header, fieldName, "{0,5}", EspnWrBgPicker)); if ( IsYahooTeReport( sHead ) ) r.AddColumn(new ReportColumn(header, fieldName, "{0,5}", EspnTeBgPicker)); if ( IsYahooPkReport( sHead ) ) r.AddColumn( new ReportColumn( header, fieldName, "{0,5}", EspnPkBgPicker ) ); } var dt = ds.Tables[0]; dt.DefaultView.Sort = "tot DESC"; r.LoadBody(dt); FileOut = sHead; r.RenderAsHtml( FileOut, true); return FileOut; }
public void DumpProjections() { Utility.Announce("Dumping Projections"); if (ProjectionList == null) return; // for each projection in the report foreach (var pl in ProjectionList) { var metricName = (String) pl; // load the totals into a simple report var dt = new DataTable(); var cols = dt.Columns; cols.Add("TEAM", typeof (String)); cols.Add("STARTER", typeof (String)); cols.Add("TOTAL", typeof (Decimal)); cols.Add("GS", typeof (String)); cols.Add("G2", typeof (String)); foreach (NFLDivision d in Afc.DivList) { foreach (NflTeam t in d.TeamList) { foreach (NFLOutputMetric m in t.ProjectionList) { if (m.Name == metricName) { AddRow(dt, m.Total, t, metricName); break; } } } } foreach (NFLDivision d in Nfc.DivList) { foreach (NflTeam t in d.TeamList) { foreach (NFLOutputMetric m in t.ProjectionList) { if (m.Name == metricName) { AddRow(dt, m.Total, t, metricName); break; } } } } var st = new SimpleTableReport {ReportHeader = "Projected " + metricName, ColumnHeadings = true}; st.AddColumn(new ReportColumn("Team", "TEAM", "{0,-20}")); st.AddColumn(new ReportColumn("Starter", "STARTER", "{0,-20}")); st.AddColumn(new ReportColumn("Total", "TOTAL", "{0:##0}", true)); st.AddColumn(new ReportColumn("GS11", "GS", "{0,-10}")); st.AddColumn(new ReportColumn("GS3", "G2", "{0,-10}")); dt.DefaultView.Sort = "TOTAL DESC"; st.LoadBody(dt); st.ShowElapsedTime = false; st.RenderAsHtml( string.Format("{0}{2}\\Projections\\Projected-{1}.htm", Utility.OutputDirectory(), metricName, Utility.CurrentSeason()), true); } }
/// <summary> /// Creates the output. /// </summary> public void Render() { var str = new SimpleTableReport("Player Projection " + Player.PlayerName + "-" + Season); str.AddStyle( "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.AddStyle( "label { display:block; float:left; width:130px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:right; }"); str.AddStyle( "value { display:block; float:left; width:100px; padding: 3px 5px; margin: 0px 0px 5px 0px; text-align:left; font-weight: bold; color:blue }"); str.AddStyle( "#notes { float:right; height:auto; width:308px; font-size: 88%; background-color: #ffffe1; border: 1px solid #666666; padding: 5px; margin: 0px 0px 10px 10px; color:#666666 }"); str.AddStyle( "div.notes H4 { background-image: url(images/icon_info.gif); background-repeat: no-repeat; background-position: top left; padding: 3px 0px 3px 27px; border-width: 0px 0px 1px 0px; border-style: solid; border-color: #666666; color: #666666; font-size: 110%;}"); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Week", "WEEK", "{0}")); str.AddColumn(new ReportColumn("Matchup", "MATCH", "{0}")); str.AddColumn(new ReportColumn("Score", "SCORE", "{0}")); str.AddColumn(new ReportColumn("OppUnit", "OPPRATE", "{0}")); str.AddColumn(new ReportColumn("Proj", "PROJ", "{0:0.0}", true)); str.AddColumn(new ReportColumn("Y-FP", "FP", "{0:0.0}", true)); str.AddColumn(new ReportColumn("Stats", "STATS", "{0}")); str.AddColumn(new ReportColumn("Actual", "ACTUAL", "{0:0.0}", true)); str.AddColumn(new ReportColumn("ActStats", "ACTUALSTAT", "{0:0.0}")); str.AddColumn(new ReportColumn("Variation", "VAR", "{0:0.0}", tally:true)); str.LoadBody(BuildTable()); str.SubHeader = SubHeading(); str.RenderAsHtml(FileName(), true); }
private static void Render( string season, string week, DataTable dt ) { var str = new SimpleTableReport { ReportHeader = "Gordan Line : Week " + week, ColumnHeadings = true, DoRowNumbers = true }; str.AddColumn( new ReportColumn( "Away Team", "AWAY", "{0,-20}" ) ); str.AddColumn( new ReportColumn( "ALR", "AWAYLETTER", "{0,-2}" ) ); str.AddColumn( new ReportColumn( "Home Team", "HOME", "{0,-20}" ) ); str.AddColumn( new ReportColumn( "HLR", "HOMELETTER", "{0,-2}" ) ); str.AddColumn( new ReportColumn( "Spread", "SPREAD", "{0:#0.0}" ) ); str.AddColumn( new ReportColumn( "GordLine", "GLINE", "{0:#0.0}" ) ); str.AddColumn(new ReportColumn("MyTip", "MYTIP", "{0:#0.0}")); str.AddColumn(new ReportColumn("Diff", "DIFF", "{0:#0.0}")); str.AddColumn( new ReportColumn( "AwSR", "ASR", "{0}" ) ); str.AddColumn( new ReportColumn( "HmSR", "HSR", "{0}" ) ); str.AddColumn( new ReportColumn( "Bet", "BET", "{0,-20}" ) ); str.AddColumn( new ReportColumn( "Away", "AWAYSCORE", "{0}" ) ); str.AddColumn( new ReportColumn( "Home", "HOMESCORE", "{0}" ) ); str.AddColumn( new ReportColumn( "Result", "RESULT", "{0}" ) ); str.AddColumn( new ReportColumn( "Adjustment", "ADJUST", "{0}" ) ); str.LoadBody( dt ); str.RenderAsHtml( string.Format("{0}GordanLine{1}{2}.htm", Utility.OutputDirectory(), season, week), true ); }
public void RenderAsHtml( string fileName, string season ) { var st = new SimpleTableReport( "Frequency Table " + name, StdFooter()) {ColumnHeadings = true}; st.AddColumn( new ReportColumn( "Occurence", "Occurence", "{0:##0}" ) ); st.AddColumn( new ReportColumn( "Freq.", "Frequency", "{0}" ) ); st.AddColumn( new ReportColumn( "Cum. Freq.", "Cumulative", "{0}" ) ); st.AddColumn( new ReportColumn( "Percent ", "Percent", "{0:##0.0}" ) ); st.AddColumn( new ReportColumn( "Cum. %", "TotPercent", "{0:##0.0}" ) ); st.LoadBody( dt ); st.DoRowNumbers = false; st.ShowElapsedTime = false; FileName = string.Format("{0}{2}\\Frequency\\{1}.htm", Utility.OutputDirectory(), name, season); st.RenderAsHtml( FileName, true); }
public void Render() { NflSeason = new NflSeason( Year, loadGames: false, loadDivisions: false); NflSeason.LoadRegularWeeks(); var str = new SimpleTableReport( string.Format( "Score Grid {0}-{1}", NflSeason.Year, ScopeInFocus ) ) { ReportHeader = ScopeInFocus }; StyleHelper.AddStyle( str ); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn( new ReportColumn( "Stat", "STAT", "{0}" ) ); str.AddColumn( new ReportColumn( "Total", "TOT", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk01", "WK01", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk02", "WK02", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk03", "WK03", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk04", "WK04", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk05", "WK05", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk06", "WK06", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk07", "WK07", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk08", "WK08", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk09", "WK09", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk10", "WK10", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk11", "WK11", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk12", "WK12", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk13", "WK13", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk14", "WK14", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk15", "WK15", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk16", "WK16", "{0}" ) ); str.AddColumn( new ReportColumn( "Wk17", "WK17", "{0}" ) ); str.LoadBody( BuildTable() ); //str.SubHeader = SubHeading(); str.RenderAsHtml( FileName(), true ); }
public string RenderProjectedData(ArrayList playerList, string sHead, [Optional] string sortOrder, IRatePlayers scorer, IWeekMaster weekMaster ) { // Output the list Utility.Announce("PlayerListing " + sHead); var r = new SimpleTableReport { ReportHeader = sHead, ReportFooter = Season, DoRowNumbers = true}; if (!string.IsNullOrEmpty(SubHeader)) r.SubHeader = SubHeader; /////////////////////////////////////////////////////////////// var ds = LoadProjectedData(playerList, scorer, weekMaster ); // <-- projection action here /////////////////////////////////////////////////////////////// r.AddColumn(new ReportColumn("Name", "NAME", "{0,-15}")); r.AddColumn(new ReportColumn("Pos", "POS", "{0,9}")); r.AddColumn(new ReportColumn("Role", "ROLE", "{0,9}")); r.AddColumn(new ReportColumn("RookieYr", "ROOKIEYR", "{0,4}")); r.AddColumn(new ReportColumn("Team", "CURRTEAM", "{0,2}")); if (ShowOpponent) { r.AddColumn(new ReportColumn("Opp", "OPPONENT", "{0,2}")); r.AddColumn(new ReportColumn("Opp", "OPPRATE", "{0,2}")); r.AddColumn(new ReportColumn("Spread", "SPREAD", "{0,5}")); } r.AddColumn(new ReportColumn("Age", "AGE", "{0,2}")); r.AddColumn(new ReportColumn("Owner", "FT", "{0,2}")); if (LongStats) { r.AddColumn(new ReportColumn("Curr", "CURSCORES", "{0,5}")); r.AddColumn(new ReportColumn("Tot", "SCORES", "{0,5}")); r.AddColumn(new ReportColumn("Avg", "AVG", "{0:0.0}")); r.AddColumn(new ReportColumn("Inj", "INJURY", "{0,5}")); r.AddColumn(new ReportColumn("YDp", "YDP", "{0,5}")); r.AddColumn(new ReportColumn("Tdp", "TDP", "{0,5}")); r.AddColumn(new ReportColumn("YDr", "YDR", "{0,5}")); r.AddColumn(new ReportColumn("Tdr", "TDR", "{0,5}")); r.AddColumn(new ReportColumn("YDc", "YDC", "{0,5}")); r.AddColumn(new ReportColumn("TDc", "TDC", "{0,5}")); r.AddColumn(new ReportColumn("Fg", "Fg", "{0,5}")); } r.AddColumn(new ReportColumn("Points", "POINTS", "{0,5}")); var dt = ds.Tables[0]; dt.DefaultView.Sort = LongStats ? (string.IsNullOrEmpty(sortOrder) ? "Points DESC" : sortOrder) : "Points DESC"; r.LoadBody(dt); // just assigns the data table FileOut = string.Format("{0}{1}.htm", Utility.OutputDirectory(), sHead); r.RenderAsHtml( FileOut, true); if (RenderToCsv) r.RenderAsCsv("Starters-" + sHead); return FileOut; }
/// <summary> /// This is a model SimpleTableReport, using expanded ReportColumn constructors /// </summary> public void RosterReport() { var week = Int32.Parse( Utility.CurrentWeek() ); var when = string.Format( "Week{0}-{1:00}", Season, week ); var str = new SimpleTableReport(string.Format("GridStats Roster : {0}", when)) { ColumnHeadings = true, DoRowNumbers = true }; str.AddColumn( new ReportColumn( "Team", "FTEAM", "{0,-20}" ) ); str.AddColumn( new ReportColumn( "Value", "VALUE", "{0}", true ) ); str.AddColumn( new ReportColumn( "Size", "SIZE", "{0}", true ) ); str.AddColumn( new ReportColumn( "Avg", "AVG", "{0:#.#}" ) ); str.AddColumn( new ReportColumn( "Starters", "STARTERS", "{0}", true ) ); str.AddColumn( new ReportColumn( "Backups", "BACKUPS", "{0}", true ) ); str.AddColumn( new ReportColumn( "Others", "OTHERS", "{0}", true ) ); str.AddColumn( new ReportColumn( "Injured", "INJURIES", "{0}" , true ) ); str.AddColumn( new ReportColumn( "TeamBias", "BIAS", "{0,-10}" ) ); str.LoadBody( BuildTable() ); FileOut = string.Format( "{0}{1}\\RosterSummary\\{2}\\RosterSummary-{3:00}.htm", Utility.OutputDirectory(), Season, CompCode, week ); str.RenderAsHtml( FileOut, true ); }
/// <summary> /// Make a big report then write it as CSV /// </summary> public void DumpPlayersToCsv() { // Define the simple report var when = string.Format("Week{0}-{1:0#}", Utility.CurrentSeason(), Int32.Parse(Utility.CurrentWeek()) + 1); var str = new SimpleTableReport(string.Format("Player Stats : {0}", when)); str.AddColumn(new ReportColumn("Jersey", "JERSEY", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Name", "NAME", "{0,-15}", typeof (String))); str.AddColumn(new ReportColumn("Team", "CURRTEAM", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Unit", "UNIT", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Rookie", "ROOKIEYR", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Drafted", "DRAFTED", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Category", "CATEGORY", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Pos", "POSDESC", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Role", "ROLE", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Owner", "OWNER", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Age", "AGE", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Stars", "STARS", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Value", "VALUE", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Scores", "SCORES", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Rushes", "RUSHES", "{0}", typeof (String))); str.AddColumn(new ReportColumn("YDr", "YDR", "{0}", typeof (String))); str.AddColumn(new ReportColumn("AvgYDr", "AVGYDR", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Tdr", "TDR", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Catches", "CATCHES", "{0}", typeof (String))); str.AddColumn(new ReportColumn("YDc", "YDC", "{0}", typeof (String))); str.AddColumn(new ReportColumn("AvgYDc", "AVGYDC", "{0}", typeof (String))); str.AddColumn(new ReportColumn("TDc", "TDC", "{0}", typeof (String))); str.AddColumn(new ReportColumn("COM", "COM", "{0}", typeof (String))); str.AddColumn(new ReportColumn("ATTEMPTS", "ATTEMPTS", "{0}", typeof (String))); str.AddColumn(new ReportColumn("YDp", "YDp", "{0}", typeof (String))); str.AddColumn(new ReportColumn("AVGYDp", "AVGYDp", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Tdp", "Tdp", "{0}", typeof (String))); str.AddColumn(new ReportColumn("INT", "INT", "{0}", typeof (String))); var dt = new DataTable(); var cols = dt.Columns; cols.Add("JERSEY", typeof (String)); cols.Add("NAME", typeof (String)); cols.Add("TEAM", typeof (String)); cols.Add("UNIT", typeof (String)); cols.Add("ROOKIEYR", typeof (String)); cols.Add("DRAFTED", typeof (String)); cols.Add("CATEGORY", typeof (String)); cols.Add("POSDESC", typeof (String)); cols.Add("ROLE", typeof (String)); cols.Add("OWNER", typeof (String)); cols.Add("AGE", typeof (String)); cols.Add("STARS", typeof (String)); cols.Add("VALUE", typeof (String)); cols.Add("SCORES", typeof (String)); cols.Add("RUSHES", typeof (String)); cols.Add("YDR", typeof (String)); cols.Add("AVGYDR", typeof (String)); cols.Add("TDR", typeof (String)); cols.Add("CATCHES", typeof (String)); cols.Add("YDC", typeof (String)); cols.Add("AVGYDC", typeof (String)); cols.Add("TDC", typeof (String)); cols.Add("COM", typeof (String)); cols.Add("ATTEMPTS", typeof (String)); cols.Add("YDp", typeof (String)); cols.Add("AVGYDp", typeof (String)); cols.Add("Tdp", typeof (String)); cols.Add("INT", typeof (String)); // Load the body foreach (NflConference c in _confList) foreach (NFLDivision d in c.DivList) foreach (NflTeam t in d.TeamList) { if (t.PlayerList == null) t.LoadPlayerUnits(); foreach (NFLPlayer p in t.PlayerList) { p.LoadPerformances(false, false, Utility.SeasonInFocus()); if (!string.IsNullOrEmpty(p.PlayerName)) { var dr = dt.NewRow(); dr["JERSEY"] = p.JerseyNo; dr["NAME"] = p.PlayerName; dr["TEAM"] = p.CurrTeam.TeamCode; dr["UNIT"] = p.Unit(); dr["ROOKIEYR"] = p.RookieYear; dr["DRAFTED"] = p.Drafted.Trim(); dr["CATEGORY"] = p.PlayerCat; dr["POSDESC"] = p.PlayerPos.Replace(",", "-"); dr["ROLE"] = p.PlayerRole; dr["OWNER"] = p.Owner; dr["AGE"] = p.PlayerAge(); dr["STARS"] = p.StarRating; dr["VALUE"] = p.Value().ToString(); dr["SCORES"] = p.Scores.ToString(); if (p.TotStats == null) { dr["RUSHES"] = "0"; dr["YDR"] = "0"; dr["AVGYDR"] = "0.0"; dr["TDR"] = "0"; dr["CATCHES"] = "0"; dr["YDC"] = "0.0"; dr["AVGYDC"] = "0"; dr["TDC"] = "0"; dr["COM"] = "0"; dr["ATTEMPTS"] = "0"; dr["YDp"] = "0"; dr["AVGYDp"] = "0.0"; dr["Tdp"] = "0"; dr["INT"] = "0"; } else { dr["RUSHES"] = p.TotStats.Rushes.ToString(); dr["YDR"] = p.TotStats.YDr.ToString(); dr["AVGYDR"] = string.Format("{0:0.0}", Utility.Average(p.TotStats.YDr, p.TotStats.Rushes)); dr["TDR"] = p.TotStats.Tdr.ToString(); dr["CATCHES"] = p.TotStats.Catches.ToString(); dr["YDC"] = p.TotStats.YDc.ToString(); dr["AVGYDC"] = string.Format("{0:0.0}", Utility.Average(p.TotStats.YDc, p.TotStats.Catches)); dr["TDC"] = p.TotStats.Tdc.ToString(); dr["COM"] = p.TotStats.Completions.ToString(); dr["ATTEMPTS"] = p.TotStats.PassAtts.ToString(); dr["YDp"] = p.TotStats.YDp.ToString(); dr["AVGYDp"] = string.Format("{0:0.0}", Utility.Average(p.TotStats.YDp, p.TotStats.Completions)); dr["Tdp"] = p.TotStats.Tdp.ToString(); dr["INT"] = p.TotStats.PassInt.ToString(); } dt.Rows.Add(dr); } } } str.LoadBody(dt); str.RenderAsCsv( "Players" ); }
/// <summary> /// Looks at the EP xml to dump out a report /// </summary> public void RosterExperience() { Utility.Announce("NFLRosterReport.RosterExperience - creating simple report"); CheckPreRequisites(); var str = new SimpleTableReport(string.Format("Roster Experience {0}", Utility.CurrentSeason())); str.AddStyle( "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 641px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }"); str.AddStyle("#main { margin-left:1em; }"); str.AddStyle("#dtStamp { font-size:0.8em; }"); str.AddStyle(".end { clear: both; }"); str.AddStyle(".gponame { color:white; background:black }"); str.ColumnHeadings = true; str.DoRowNumbers = true; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Team", "TEAM", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Player", "PLAYER", "{0}", typeof (String))); str.AddColumn(new ReportColumn("Unit", "UNIT", "{0}", typeof (String))); str.AddColumn(new ReportColumn("EP", "EP", "{0}", typeof (Int32), true)); BuildTable(str); str.SetSortOrder("EP DESC"); str.RenderAsHtml( string.Format("{0}Experience-{1}-{2}.htm", Utility.OutputDirectory(), Utility.CurrentSeason(), Utility.CurrentWeek()), true); }
public string SpitLineups(bool bPersist) { var usedDs = Utility.TflWs.PositionsUsed(TeamCode, Season); var ds = CreatePositions(); var posTable = ds.Tables[0]; var str = new SimpleTableReport { ReportHeader = "Lineups :" + TeamCode + " Season " + Season, ColumnHeadings = true }; str.AddColumn(new ReportColumn("Pos", "POS", "{0,-10}")); // Only add the columns for the last 12 weeks for (int i = 1; i <= 10; i++) { var colName = "Wk" + String.Format("{0:0#}", Week(i)); var colHead = "Wk " + String.Format("{0:0#}", Week(i)); str.AddColumn(new ReportColumn(colHead, colName, "{0,-20}")); } str.LoadBody(LineupTable(posTable, usedDs)); var outputfile = LineupFile(); var html = str.RenderAsHtml(outputfile, bPersist); return html; }
public void Render() { var str = new SimpleTableReport(string.Format("Suggested Lineup {0}:{1:#0} {2}", Season, Week, LeagueId)); str.AddDenisStyle(); str.ColumnHeadings = true; str.DoRowNumbers = false; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn(new ReportColumn("Slot", "SLOT", "{0:00}")); str.AddColumn(new ReportColumn("Player", "PLAYER", "{0}")); str.AddColumn(new ReportColumn("Team", "TEAM", "{0}")); str.AddColumn(new ReportColumn("Pos", "POS", "{0}")); str.AddColumn(new ReportColumn("RPoints", "PTS", "{0}")); str.AddColumn(new ReportColumn("Role", "ROLE", "{0}")); str.AddColumn(new ReportColumn("Game", "GAME", "{0}")); str.AddColumn(new ReportColumn("OppUnit", "OPPRATE", "{0}")); str.AddColumn(new ReportColumn("Spread", "SPREAD", "{0:##.#}")); str.AddColumn(new ReportColumn("Total", "TOTAL", "{0:##.#}")); str.AddColumn(new ReportColumn("Actual", "ACTUAL", "{0:##}")); str.LoadBody(BuildTable()); str.SetSortOrder( "SLOT,PTS DESC" ); str.RenderAsHtml(FileName(), true); }
public string RenderData(ArrayList unitList, string sHead, NFLWeek week) { // Output the list var tu1 = (TeamUnit) unitList[0]; var r = new SimpleTableReport {ReportHeader = sHead, ReportFooter = "", DoRowNumbers = true}; var ds = LoadData(unitList, week); r.AddColumn(new ReportColumn("Name", "TEAM", "{0,-15}")); r.AddColumn(new ReportColumn("Rating", "RATING", "{0,-1}")); r.AddColumn(new ReportColumn("Total", "tot", "{0,5}")); const int startAt = Constants.K_WEEKS_IN_A_SEASON; var currentWeek = new NFLWeek(Int32.Parse(Utility.CurrentSeason()), Int32.Parse(Utility.CurrentWeek()), false); for (var w = startAt; w > 0; w--) { var header = string.Format("Week {0}", currentWeek.Week); var fieldName = string.Format(FieldFormat, currentWeek.WeekNo); r.AddColumn(new ReportColumn(header, fieldName, "{0,5}", tu1.BGPicker)); currentWeek = currentWeek.PreviousWeek(currentWeek, true, false ); } var dt = ds.Tables[0]; dt.DefaultView.Sort = "tot " + tu1.SortDirection(); r.LoadBody(dt); FileOut = string.Format( "{0}Units\\{1}.htm", Utility.OutputDirectory(), sHead ); r.RenderAsHtml( FileOut, true); return FileOut; }
public void Render() { // might have to load some stuff first ??? var str = new SimpleTableReport( "Game Summary " + Game.ScoreOut() ); str.AddDenisStyle(); str.SubHeader = SubHeading(); str.AnnounceIt = true; str.AddColumn( new ReportColumn( "C1", "COL01", "{0}" ) ); str.AddColumn( new ReportColumn( "C2", "COL02", "{0}" ) ); str.AddColumn( new ReportColumn( "C3", "COL03", "{0}" ) ); str.AddColumn( new ReportColumn( "C4", "COL04", "{0}" ) ); str.AddColumn( new ReportColumn( "C5", "COL05", "{0}" ) ); str.AddColumn( new ReportColumn( "C6", "COL06", "{0}" ) ); str.AddColumn( new ReportColumn( "C7", "COL07", "{0}" ) ); str.AddColumn( new ReportColumn( "C8", "COL08", "{0}" ) ); str.AddColumn( new ReportColumn( "C9", "COL09", "{0}" ) ); str.AddColumn( new ReportColumn( "C10", "COL10", "{0}" ) ); str.AddColumn( new ReportColumn( "C11", "COL11", "{0}" ) ); str.CustomHeader = SummaryHeader(); str.LoadBody( BuildTable() ); str.RenderAsHtml( FileName(), persist: true ); }
//public void RenderTeam( string teamCode ) //{ // var team = new NflTeam( teamCode ); // RenderTeam( team ); //} public void RenderTeam( NflTeam team, bool skipPostseason ) { if ( team.MetricsHt == null ) LoadTeam( team, team.TeamCode, skipPostseason ); var metricsHt = team.MetricsHt; var str = new SimpleTableReport( string.Format( "Metrics-{0}", team.TeamCode ) ); str.AddStyle( "#container { text-align: left; background-color: #ccc; margin: 0 auto; border: 1px solid #545454; width: 761px; padding:10px; font: 13px/19px Trebuchet MS, Georgia, Times New Roman, serif; }" ); str.AddStyle( "#main { margin-left:1em; }" ); str.AddStyle( "#dtStamp { font-size:0.8em; }" ); str.AddStyle( ".end { clear: both; }" ); str.AddStyle( ".gponame { color:white; background:black }" ); str.ColumnHeadings = true; str.DoRowNumbers = true; str.ShowElapsedTime = false; str.IsFooter = false; str.AddColumn( new ReportColumn( "Week", "WeekSeed", "{0}", typeof( String ), false ) ); str.AddColumn( new ReportColumn( "OffTDp", "OffTDp", "{0}", typeof( Int32 ), true ) ); str.AddColumn( new ReportColumn( "Mult", "AvgOffTDp", "{0:#.#}", typeof( Decimal ), false ) ); str.AddColumn( new ReportColumn( "OffTDr", "OFFTDR", "{0}", typeof( Int32 ), true ) ); str.AddColumn( new ReportColumn( "Mult", "AvgOffTDr", "{0:#.#}", typeof( Decimal ), false ) ); str.AddColumn( new ReportColumn( "OffSAKa", "OFFSAKa", "{0}", typeof( Decimal ), true ) ); str.AddColumn( new ReportColumn( "Mult", "AvgOffSaka", "{0:#.#}", typeof( Decimal ), false ) ); str.AddColumn( new ReportColumn( "DefTDpa", "DefTDpa", "{0}", typeof( Int32 ), true ) ); str.AddColumn( new ReportColumn( "Mult", "AvgDefTDp", "{0:#.#}", typeof( Decimal ), false ) ); str.AddColumn( new ReportColumn( "DefTDra", "DEFTDRa", "{0}", typeof( Int32 ), true ) ); str.AddColumn( new ReportColumn( "Mult", "AvgDefTDr", "{0:#.#}", typeof( Decimal ), false ) ); str.AddColumn( new ReportColumn( "DefSAK", "DEFSAK", "{0}", typeof( Decimal ), true ) ); str.AddColumn( new ReportColumn( "Mult", "AvgDefSak", "{0:#.#}", typeof( Decimal ), false ) ); BuildTable( str, metricsHt, team ); str.SetSortOrder( "WeekSeed" ); str.RenderAsHtml(string.Format("{0}Metrics-{1}.htm", Utility.OutputDirectory(), team.TeamCode), true); }