本文整理汇总了C#中Report.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Report.Show方法的具体用法?C# Report.Show怎么用?C# Report.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Report
的用法示例。
在下文中一共展示了Report.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrintPreview
public static void PrintPreview(DataTable data, string fileName)
{
Report report = new Report();
report.Load(fileName);
report.RegisterData(data, fileName);
//这样就可以预览数据了
report.Show();
report.Dispose();
}
示例2: showInfedenceLKK
public void showInfedenceLKK(string id)
{
Database dataToReport = new Database();
DataSet rep = new DataSet();
rep = dataToReport.getInfedenceLKK (id);
Report infedence = new Report();
infedence.Load("infedence.frx");
infedence.RegisterData(rep);
infedence.Show();
}
示例3: btnListaUkupno_Click
private void btnListaUkupno_Click(object sender, EventArgs e)
{
if (dgArtikli.Rows.Count > 0)
{
try
{
DataTable artikli = new DataTable();
artikli = pregled_akcijskih_nabavnih_cijena.Tables["Table"].Copy();
string partner = glDobavljac.Text;
string datumOD = Convert.ToDateTime(dtpODkada.Text).ToString("dd-MM-yyyy");
string datumDO = Convert.ToDateTime(dtpDokada.Text).ToString("dd-MM-yyyy");
//pregled_akcijskih_nabavnih_cijena.PregledAkcNabCijena.Copy();
//pregled_akcijskih_nabavnih_cijena.PregledAkcNabCijena.CopyToDataTable(artikli,LoadOption.Upsert);
//veza.ExecuteQuery("select poslovnica.po_ID, poslovnica.po_sifra, poslovnica.po_naziv, mjesto.mj_naziv, poslovnica.po_asortiman, poslovnica.po_cjenik from poslovnica, mjesto where mjesto.mj_ID = poslovnica.mjesto_mj_ID and poslovnica.po_aktivna = 1 and poslovnica.po_datumZatvaranja is null and (poslovnica.vp_sifra = 300 or poslovnica.vp_sifra =200) and (poslovnica.po_cjenik <> '' or poslovnica.po_asortiman <> '') order by poslovnica.po_sifra asc", ref artikli);
if (dgArtikli.Rows.Count > 0)
{
//create dataset
DataSet FDataSet = new DataSet();
artikli.TableName = "Artikli";
FDataSet.Tables.Add(artikli);
// create report instance
Report report = new Report();
// load the existing report
System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
string baseDir = System.IO.Path.GetDirectoryName(a.Location);
report.Load(baseDir + "/report/PregledAkcNabCijena.frx");
// register the dataset
report.RegisterData(FDataSet);
report.SetParameterValue("Partner", partner);
report.SetParameterValue("DatumOD", datumOD);
report.SetParameterValue("DatumDO", datumDO);
//dizajn
//report.Design();
// run the report
report.Show();
// free resources used by report
report.Dispose();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
示例4: btnIzvjestaj_Click
private void btnIzvjestaj_Click(object sender, EventArgs e)
{
if (gridView2.RowCount > 0)
{
try
{
DataTable artikli = new DataTable();
artikli = dodatnePozicijeZaTrgovinu.DodatneTrgovina.CopyToDataTable();
string datOD = Convert.ToDateTime(dtpDatumOD.Text).ToString("dd-MM-yyyy");
string datDO = Convert.ToDateTime(dtpDatumDO.Text).ToString("dd-MM-yyyy");
//string skladisteBroj = txtSkladiste.Text;
//string brojNarudzbe = txtBrojNarudzbe.Text;
//veza.ExecuteQuery("select poslovnica.po_ID, poslovnica.po_sifra, poslovnica.po_naziv, mjesto.mj_naziv, poslovnica.po_asortiman, poslovnica.po_cjenik from poslovnica, mjesto where mjesto.mj_ID = poslovnica.mjesto_mj_ID and poslovnica.po_aktivna = 1 and poslovnica.po_datumZatvaranja is null and (poslovnica.vp_sifra = 300 or poslovnica.vp_sifra =200) and (poslovnica.po_cjenik <> '' or poslovnica.po_asortiman <> '') order by poslovnica.po_sifra asc", ref artikli);
if (gridView2.RowCount > 0)
{
//create dataset
DataSet FDataSet = new DataSet();
artikli.TableName = "Artikli";
FDataSet.Tables.Add(artikli);
// create report instance
Report report = new Report();
// load the existing report
System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
string baseDir = System.IO.Path.GetDirectoryName(a.Location);
report.Load(baseDir + "/report/DogovorenePozicijeTrgovina.frx");
report.SetParameterValue("datumod", datOD);
report.SetParameterValue("datumdo", datDO);
// register the dataset
report.RegisterData(FDataSet);
//dizajn
//report.Design();
// run the report
report.Show();
// free resources used by report
report.Dispose();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
示例5: btnIspisi_Click
private void btnIspisi_Click(object sender, EventArgs e)
{
try
{
if (dgPodaci.RowCount > 0)
{
try
{
DataTable artikli = new DataTable();
artikli = slanje_na_knjizenje.SlanjeNaKnjizenje.CopyToDataTable();
string datumSlanja = Convert.ToDateTime(dtpPredaja.EditValue).ToString("dd.MM.yyyy");
//create dataset
DataSet FDataSet = new DataSet();
artikli.TableName = "Artikli";
FDataSet.Tables.Add(artikli);
// create report instance
Report report = new Report();
// load the existing report
System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
string baseDir = System.IO.Path.GetDirectoryName(a.Location);
report.Load(baseDir + "/report/Knjizenje3.frx");
report.SetParameterValue("datumSlanja", datumSlanja);
// register the dataset
report.RegisterData(FDataSet);
//dizajn
//report.Design();
// run the report
report.Show();
// free resources used by report
report.Dispose();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
示例6: btnAnimationReport_Click
private void btnAnimationReport_Click(object sender, RoutedEventArgs e)
{
ReportParameter[] p = new ReportParameter[3];
ReportParameter rp = new ReportParameter("SalesDrive", manager.Animation.IDSalesDrive.ToString());
ReportParameter rp2 = new ReportParameter("Animation", manager.Animation.ID.ToString());
ReportParameter rp3 = new ReportParameter("DivisionID", LoggedUser.LoggedDivision.ID.ToString());
p[0] = rp;
p[1] = rp2;
p[2] = rp3;
Report reportCtrl = new Report(ReportType.AnimationReport, p);
reportCtrl.Width = 800;
reportCtrl.Height = 600;
reportCtrl.Show();
}
示例7: btnAsortimanCjenik_Click
private void btnAsortimanCjenik_Click(object sender, EventArgs e)
{
if (gridView2.RowCount > 0)
{
try
{
DataTable artikli = new DataTable();
veza.ExecuteQuery("select poslovnica.po_ID, poslovnica.po_sifra, poslovnica.po_naziv, mjesto.mj_naziv, poslovnica.po_asortiman, poslovnica.po_cjenik from poslovnica, mjesto where mjesto.mj_ID = poslovnica.mjesto_mj_ID and poslovnica.po_aktivna = 1 and poslovnica.po_datumZatvaranja is null and (poslovnica.vp_sifra = 300 or poslovnica.vp_sifra =200) and (poslovnica.po_cjenik <> '' or poslovnica.po_asortiman <> '') order by poslovnica.po_sifra asc", ref artikli);
if (artikli.Rows.Count > 0)
{
//create dataset
DataSet FDataSet = new DataSet();
artikli.TableName = "Artikli";
FDataSet.Tables.Add(artikli);
// create report instance
Report report = new Report();
// load the existing report
System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
string baseDir = System.IO.Path.GetDirectoryName(a.Location);
report.Load(baseDir + "/report/ListaAsortimanCjenik.frx");
// register the dataset
report.RegisterData(FDataSet);
//dizajn
//report.Design();
// run the report
report.Show();
// free resources used by report
report.Dispose();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
示例8: ispis
public void ispis(string broj)
{
try
{
DataTable finacijsko = new DataTable();
veza.ExecuteQuery("select partner.pa_sifra, partner.PA_NAZIV, gratis.gr_datum, gratis.akc_broj, gratis.gr_vrijednostsnizenja, gratis.gr_zapisnik, poslovnica.po_sifra, poslovnica.po_naziv from gratis left join poslovnica on poslovnica.po_id=gratis.poslovnica_PO_ID left join partner on partner.PA_ID=gratis.partneri_PA_ID where gratis.akc_broj ='"+broj+"'", ref finacijsko);
if (finacijsko.Rows.Count > 0)
{
//create dataset
DataSet FDataSet = new DataSet();
finacijsko.TableName = "Financijsko";
FDataSet.Tables.Add(finacijsko);
// create report instance
Report report = new Report();
// load the existing report
System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
string baseDir = System.IO.Path.GetDirectoryName(a.Location);
report.Load(baseDir + "/report/Financijsko_snizenja.frx");
// register the dataset
report.RegisterData(FDataSet);
report.SetParameterValue("Mjesec", "2");
//dizajn
//report.Design();
// run the report
report.Show();
// free resources used by report
report.Dispose();
}
}
catch (Exception ex)
{
}
}
示例9: showReportLKK
public void showReportLKK(string id, DataTable results)
{
Report reportLKK = new Report();
if (Program.status == 0)
{
reportLKK.Load("report.frx");
}
else
{
reportLKK.Load("register.frx");
}
reportLKK.RegisterData(results, "resultData");
if (id != "")
{
DataBand dataBand = reportLKK.FindObject("reportData") as DataBand;
dataBand.Filter = "[resultData.id]==" + id;
}
reportLKK.Show();
}
示例10: btnNezaduzene_Click
private void btnNezaduzene_Click(object sender, EventArgs e)
{
try
{
DataTable gratis = new DataTable();
veza.ExecuteQuery("select uf_broj, uf_datum, poslovnica_po_ID, uf_memo, uf_iznos from ufaifa where partner_pa_ID =' 5061' AND uf_STATUS <>'S' and uf_broj not in (select ufaifa_uf_broj from gratis where ufaifa_uf_broj is not null and ufaifa_uf_broj <>'')", ref gratis);
if (gratis.Rows.Count > 0)
{
//create dataset
DataSet FDataSet = new DataSet();
gratis.TableName = "Artikli";
FDataSet.Tables.Add(gratis);
// create report instance
Report report = new Report();
// load the existing report
System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
string baseDir = System.IO.Path.GetDirectoryName(a.Location);
report.Load(baseDir + "/report/Gratis.frx");
// register the dataset
report.RegisterData(FDataSet);
//dizajn
//report.Design();
// run the report
report.Show();
// free resources used by report
report.Dispose();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
示例11: btnIspis_Click
private void btnIspis_Click(object sender, EventArgs e)
{
if (dgStavkeNarudzbe.RowCount > 0)
{
try
{
DataTable artikli = new DataTable();
artikli = narudzbaStavke.narudzbaStavke.CopyToDataTable();
string skladisteBroj = txtSkladiste.Text;
string brojNarudzbe = txtBrojNarudzbe.Text;
string trgovina = txtNazivTrgovine.Text;
string trgovinasifra = txtSifraTrgovine.Text;
//veza.ExecuteQuery("select poslovnica.po_ID, poslovnica.po_sifra, poslovnica.po_naziv, mjesto.mj_naziv, poslovnica.po_asortiman, poslovnica.po_cjenik from poslovnica, mjesto where mjesto.mj_ID = poslovnica.mjesto_mj_ID and poslovnica.po_aktivna = 1 and poslovnica.po_datumZatvaranja is null and (poslovnica.vp_sifra = 300 or poslovnica.vp_sifra =200) and (poslovnica.po_cjenik <> '' or poslovnica.po_asortiman <> '') order by poslovnica.po_sifra asc", ref artikli);
if (dgStavkeNarudzbe.RowCount > 0)
{
//create dataset
DataSet FDataSet = new DataSet();
artikli.TableName = "Artikli";
FDataSet.Tables.Add(artikli);
// create report instance
Report report = new Report();
// load the existing report
System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
string baseDir = System.IO.Path.GetDirectoryName(a.Location);
report.Load(baseDir + "/report/StavkeNepotvrdjeneNarudzbe.frx");
report.SetParameterValue("skladiste", skladisteBroj);
report.SetParameterValue("narudzba", brojNarudzbe);
report.SetParameterValue("trgovina", trgovina);
report.SetParameterValue("sifratrgovina", trgovinasifra);
// register the dataset
report.RegisterData(FDataSet);
//dizajn
//report.Design();
// run the report
report.Show();
// free resources used by report
report.Dispose();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
示例12: frmPregledDobavljacaPoTrgovinama_KeyDown
private void frmPregledDobavljacaPoTrgovinama_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F5)
{
try
{
DataTable artikli = new DataTable();
veza.ExecuteQuery("select partner.pa_sifra, partner.pa_naziv, poslovnica.po_naziv from dobavljacposlovnica, partner, poslovnica where dobavljacposlovnica.poslovnica_po_ID = poslovnica.po_ID and dobavljacposlovnica.partner_pa_ID = partner.pa_ID and dobavljacposlovnica.poslovnica_po_ID = "+glDobavljac.EditValue+" order by partner.pa_naziv", ref artikli);
if (gridView1.RowCount > 0)
{
//create dataset
DataSet FDataSet = new DataSet();
artikli.TableName = "Artikli";
FDataSet.Tables.Add(artikli);
// create report instance
Report report = new Report();
// load the existing report
System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
string baseDir = System.IO.Path.GetDirectoryName(a.Location);
report.Load(baseDir + "/report/dobavljac_trgovina.frx");
// register the dataset
report.RegisterData(FDataSet);
//dizajn
//report.Design();
// run the report
report.Show();
// free resources used by report
report.Dispose();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
//string IDposlovnica = glDobavljac.EditValue.ToString();
//System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
//string baseDir = System.IO.Path.GetDirectoryName(a.Location);
//report1.Load(baseDir + "/report/dobavljac_trgovina.frx");
//report1.SetParameterValue("poslovnicaID", IDposlovnica);
////report1.Load("C:/Users/IvanS/Documents/Visual Studio 2010/Projects/odobrenja_3.3/Report.frx");
//report1.Show();
}
else if (e.KeyCode == Keys.Escape)
{
this.Close();
}
}
示例13: btnIspis_Click
private void btnIspis_Click(object sender, EventArgs e)
{
if (dgPodaci.RowCount > 0)
{
try
{
DataTable artikli = new DataTable();
artikli = status_poste.statusPoste.CopyToDataTable();
//create dataset
DataSet FDataSet = new DataSet();
artikli.TableName = "Artikli";
FDataSet.Tables.Add(artikli);
// create report instance
Report report = new Report();
// load the existing report
System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
string baseDir = System.IO.Path.GetDirectoryName(a.Location);
report.Load(baseDir + "/report/Sve.frx");
if (dtpDO.Text != "" && dtpOD.Text != "")
{
string OD = Convert.ToDateTime(dtpOD.EditValue).ToString("dd.MM.yyyy");
string DO = Convert.ToDateTime(dtpDO.EditValue).ToString("dd.MM.yyyy");
report.SetParameterValue("datumod", OD);
report.SetParameterValue("datumdo", DO);
}
if (glPartner.Text != "")
{
report.SetParameterValue("partner", glPartner.Text);
}
if (glVrstaTroska.Text != "")
{
report.SetParameterValue("vrstaTroska", glVrstaTroska.Text);
}
report.SetParameterValue("evidBroj", txtEvidBroj.Text.Trim());
// register the dataset
report.RegisterData(FDataSet);
//dizajn
//report.Design();
// run the report
report.Show();
// free resources used by report
report.Dispose();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
示例14: reportOznaceni
private void reportOznaceni()
{
if (dgPodaci.RowCount > 0)
{
try
{
table = new DataTable();
napunipotvrdjeneZaPredajuUDataset();
string OD = Convert.ToDateTime(dtpOD.EditValue).ToString("dd.MM.yyyy");
string DO = Convert.ToDateTime(dtpDO.EditValue).ToString("dd.MM.yyyy");
//create dataset
DataSet FDataSet = new DataSet();
table.TableName = "Artikli";
FDataSet.Tables.Add(table);
// create report instance
Report report = new Report();
// load the existing report
System.Reflection.Assembly a = System.Reflection.Assembly.GetEntryAssembly();
string baseDir = System.IO.Path.GetDirectoryName(a.Location);
report.Load(baseDir + "/report/Predaja.frx");
report.SetParameterValue("datumod", OD);
report.SetParameterValue("datumdo", DO);
report.SetParameterValue("datumPredaje", DateTime.Now.Date.ToString("dd.MM.yyyy"));
// register the dataset
report.RegisterData(FDataSet);
//dizajn
//report.Design();
// run the report
report.Show();
// free resources used by report
report.Dispose();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
示例15: _btnPrint_Click
private void _btnPrint_Click(object sender, EventArgs e)
{
if (Save())
{
try
{
using (Report report = new Report())
{
PrepareReport(report);
report.Show();
}
}
catch (System.Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}