using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using System.IO;
using System.Drawing.Imaging;
using System.Data.Odbc;
namespace Mortgage_ERP_1
{
public partial class DR_Bill : Form
{
DataSet1 dataset = new DataSet1();
string bill, id,name,add,date;
string cmdstring;
OdbcDataAdapter da;
Conncation cc = new Conncation();
CrystalReport1 myReport = new CrystalReport1();
FirmClass fc = new FirmClass();
public DR_Bill(int Bill_No, string C_Name, string C_address, string Date, int ID, string ex_date)
{
InitializeComponent();
bill = Bill_No.ToString();
id = ID.ToString();
name = C_Name;
add = C_address;
date = Date;
}
private void DR_Bill_Load(object sender, EventArgs e)
{
cmdstring = "select `ID`,`Discription`,`Girvi Amount`,`GW`,`NW`,`Bill Date` from `girvi a/c` where `Bill No` = " + bill + "";
da = cc.Report(cmdstring);
dataset.Clear();
da.Fill(dataset, "DR Bill");
myReport.SetDataSource(dataset);
crystalReportViewer1.ReportSource = myReport;
myReport.SetParameterValue("Name", name);
myReport.SetParameterValue("Address", add);
myReport.SetParameterValue("Bill No", bill);
myReport.SetParameterValue("Date", date);
myReport.SetParameterValue("C_Id", id);
myReport.SetParameterValue("F_Name", fc.F_Name);
myReport.SetParameterValue("F_Address", fc.F_Address);
myReport.SetParameterValue("F_Phone", fc.F_Phone);
myReport.SetParameterValue("F_Mobile", fc.F_Mobile);
myReport.SetParameterValue("F_Email", fc.F_email);
}
}
}