Skip to content

Instantly share code, notes, and snippets.


Sergey Abakumoff sAbakumoff

View GitHub Profile
View gist:3411016
Sub ActiveReport_DataInitialize
View gist:3411094
Dim rowsCounter As Integer = 0
Dim dr as DataRow
Sub ActiveReport_FetchData(eof)
rpt.fields("rptDate").value = Now()
rpt.fields("rptTitle").value = "FOR " & asOfDate & " USING " & camel & " CAMEL SCORE"
'rpt.fields("header1").value = dataclass.GetParm("year") & " DEPOSIT"
rpt.fields("header1").value = "DEPOSIT"
If rowsCounter < ds.Tables(0).Rows.Count Then
eof = false
dr = ds.Tables(0).Rows.Item(rowsCounter)
View gist:3415320
SELECT Movie.MovieID, Movie.Title, Movie.Length, Movie.YearReleased, Movie.UserRating, Movie.MPAA, MoviePerson.MoviePersonID, MoviePerson.FirstName+" "+MoviePerson.LastName AS CastName, CrewTitle.CrewTitleID, CrewTitle.Title AS CrewTitle, Genre.GenreID, Genre.GenreName
FROM CrewTitle INNER JOIN ((Genre INNER JOIN (Movie INNER JOIN MovieGenres ON Movie.MovieID = MovieGenres.MovieID) ON Genre.GenreID = MovieGenres.GenreID) INNER JOIN (MoviePerson INNER JOIN MovieCrew ON MoviePerson.MoviePersonID = MovieCrew.CastID) ON Movie.MovieID = MovieCrew.MovieID) ON CrewTitle.CrewTitleID = MovieCrew.TitleID
WHERE (((Movie.MovieID)=[?]))
ORDER BY Movie.MovieID, MoviePerson.MoviePersonID, CrewTitle.CrewTitleID, Genre.GenreID;
View gist:3850474
var navigationBar = viewer1.Toolbar.NavigationBar;
navigationBar.Visible = false;
var items = navigationBar.Items.Cast<ToolStripItem>().ToList();
View gist:3896819
private void view_Click(object sender, EventArgs e)
var rpt = (GrapeCity.ActiveReports.PageReport)designer1.Report;
rpt.ConfigurationProvider = new DefaultConfigurationProvider();
var pageDocument = new GrapeCity.ActiveReports.Document.PageDocument(rpt);
View gist:3909467
private void Form1_Load(object sender, EventArgs e)
var rpt = new PageReport(new FileInfo("report.rdlx"));
var doc = new PageDocument(rpt);
var xml = new XmlRenderingExtension();
var settings = new Settings {Encoding = "UTF-8"};
var streamProvider = new CustomStreamProvider(new DirectoryInfo("."), "report.xml");
doc.Render(xml, streamProvider, settings);
sAbakumoff / DisksMoveSolution.cs
Created Dec 27, 2012
There are K pegs. Each peg can hold discs in decreasing order of radius when looked from bottom to top of the peg. There are N discs which have radius 1 to N; Given the initial configuration of the pegs and the final configuration of the pegs, output the moves required to transform from the initial to final configuration. You are required to do …
View DisksMoveSolution.cs
public class Solution
private static IEnumerable<string> ReadInputLine()
var input = Console.ReadLine();
return input == null ? null : input.Split(' ');
private delegate bool Parse<T>(string str, out T result);
View gist:4950514
private void SelectAllClickHandler(object sender, EventArgs agrs)
private void DesignerForm_Load(object sender, EventArgs e)
View gist:5088530
PageReport pagereport = new PageReport(new System.IO.FileInfo("Invoice2.rdlx"));
pagedoc = new PageDocument(pagereport);
pagedoc.LocateDataSource += new LocateDataSourceEventHandler(runtime_LocateDataSource);
pagedoc.PageReport.Document.LocateDataSource += new LocateDataSourceEventHandler(runtime_LocateDataSource);
View gist:5351370
private void DisableChartWizard()
var regSubkey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"SOFTWARE\GrapeCity\ActiveReports 6\Windows");
if (regSubkey!=null)
regSubkey.SetValue("AutoRunWizard", 0);