Skip to content

Instantly share code, notes, and snippets.

View sAbakumoff's full-sized avatar

Sergey Abakumoff sAbakumoff

View GitHub Profile
Sub ActiveReport_DataInitialize
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)
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;
var navigationBar = viewer1.Toolbar.NavigationBar;
navigationBar.Visible = false;
var items = navigationBar.Items.Cast<ToolStripItem>().ToList();
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);
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 December 27, 2012 04:56
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 …
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);
private void SelectAllClickHandler(object sender, EventArgs agrs)
private void DesignerForm_Load(object sender, EventArgs e)
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);
private void DisableChartWizard()
var regSubkey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(@"SOFTWARE\GrapeCity\ActiveReports 6\Windows");
if (regSubkey!=null)
regSubkey.SetValue("AutoRunWizard", 0);