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
{
public int x;
private void Table11_ManualBuild(object sender, EventArgs e)
{
// get the data source by its name
DataSourceBase rowData = Report.GetDataSource("Table1");
// init the data source
rowData.Init();
x=0;
// print the first table row - it is a header
// now enumerate the data source and print the table body
while (rowData.HasMoreRows)
{
// print the table body
x++;
Table11.PrintRow(0);
Table11.PrintColumns();
// go next data source row
rowData.Next();
}
// print the last table row - it is a footer
Table11.PrintRow(1);
Table11.PrintColumns();
}
public double DivNum(double x,double y)
{
double z=0;
if (y==0)
{
z=0;
}else{
z=x/y;
}
return z;
}
private void Table19_ManualBuild(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource("Table3");
// init the data source
rowData.Init();
x=0;
// print the first table row - it is a header
// now enumerate the data source and print the table body
while (rowData.HasMoreRows)
{
// print the table body
x++;
Table19.PrintRow(0);
Table19.PrintColumns();
// go next data source row
rowData.Next();
}
// print the last table row - it is a footer
Table19.PrintRow(1);
Table19.PrintColumns();
}
private void Table27_ManualBuild(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource("Table4");
// init the data source
rowData.Init();
x=0;
// print the first table row - it is a header
// now enumerate the data source and print the table body
while (rowData.HasMoreRows)
{
x++;
// print the table body
Table27.PrintRow(0);
Table27.PrintColumns();
// go next data source row
rowData.Next();
}
// print the last table row - it is a footer
Table27.PrintRow(1);
Table27.PrintColumns();
}
private void Table29_ManualBuild(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource("Table5");
// init the data source
rowData.Init();
x=0;
// print the first table row - it is a header
// each PrintRow call must be followed by either PrintColumn or PrintColumns call
// to print cells on the row
// now enumerate the data source and print the table body
while (rowData.HasMoreRows)
{
x++;
// print the table body
Table29.PrintRow(0);
Table29.PrintColumns();
// go next data source row
rowData.Next();
}
// print the last table row - it is a footer
Table29.PrintRow(1);
Table29.PrintColumns();
}
private void Table23_ManualBuild(object sender, EventArgs e)
{
DataSourceBase rowData = Report.GetDataSource("Table6");
// init the data source
rowData.Init();
x=0;
// print the first table row - it is a header
// now enumerate the data source and print the table body
while (rowData.HasMoreRows)
{
// print the table body
x++;
Table23.PrintRow(0);
Table23.PrintColumns();
// go next data source row
rowData.Next();
}
// print the last table row - it is a footer
Table23.PrintRow(1);
Table23.PrintColumns();
}
}
}