using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Barcode;
using FastReport.Table;
using FastReport.Utils;
namespace FastReport
{
public class ReportScript
{
private Hashtable groupList = new Hashtable();
private void GroupFooter1_BeforePrint(object sender, EventArgs e)
{
if (Engine.FirstPass)
{
string groupName = ((String)Report.GetColumnValue("Products.ProductName")).Substring(0,1);
int groupTotal = Report.GetTotalValue("TotalProducts");
groupList.Add(groupName, groupTotal);
}
}
private object GroupRank()
{
if (Engine.FinalPass)
{
string groupName = ((String)Report.GetColumnValue("Products.ProductName")).Substring(0,1);
return groupList[groupName];
}
return 0;
}
}
}