using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using CrystalDecisions.CrystalReports.Engine;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace testReportSameExampleOnly
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.reportViewer1.RefreshReport();
}
private void btnReport_Click(object sender, EventArgs e)
{
ReportDocument rpt = new ReportDocument();
string directory = Application.StartupPath.ToString();
rpt.Load("D:\\Dropbox\\Projectc#\\TESTCODE\\testReportSameExampleOnly\\testReportSameExampleOnly\\CrystalReport1.rpt");
rpt.SetParameterValue("CustomerID", txtCustomerID.Text);
this.reportViewer1.SubmittingDataSourceCredentials = rpt;
this.reportViewer1.Refresh();
}
}
}