-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReportViewer.cs
44 lines (39 loc) · 1.35 KB
/
ReportViewer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using CrystalDecisions.CrystalReports.Engine;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.SqlServer.Server;
namespace QuestionPaper_Genration
{
public partial class ReportViewer : Form
{
int QSetNo;
public ReportViewer(int SetNo)
{
InitializeComponent();
QSetNo = SetNo;
}
private void ReportViewer_Load(object sender, EventArgs e)
{
//ReportDocument rd = new ReportDocument();
//rd.Load(@"E:\Nivruti kore\QuestionPaper_Genration\QuestionPaper_Genration\CrystalReport1.rpt");
//rd.SetParameterValue("@SetNo",QSetNo);
//crystalReportViewer1.ReportSource = rd;
//crystalReportViewer1.Refresh();
//rd.Refresh();
ReportDocument rptDoc = new ReportDocument();
string rptPath = @"G:\Proj 18-19\QuestionPaper_Genration\CrystalReport2.rpt";
rptDoc.Load(rptPath);
rptDoc.SetParameterValue("@SetNo", QSetNo);
crystalReportViewer1.ReportSource = rptDoc;
crystalReportViewer1.Refresh();
}
}
}