An error has occurred while attempting to load the Crystal Reports runtime (Advance installer)

  • Thread starter Thread starter iSunner
  • Start date Start date
I

iSunner

Guest
Im trying to create a setup for my project it has db with sqlexpress connection and crystal reports

it works fine before setup , after i create a setup from advance installer

when I try to use the report, I get the following error at runntime:

---------------------------
Crystal Reports
---------------------------
An error has occurred while attempting to load the Crystal Reports runtime.


Either the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.

Please install the appropriate Crystal Reports redistributable (CRRedist*.msi) containing the correct version of the Crystal Reports runtime (x86, x64, or Itanium) required. Please go to http for more information.


This is how i call my crystal report ,

private void btnPrint_Click(object sender, EventArgs e)
{
if (cmbCategory.Text == "Setiap_Struk")
{
DataSet ds = new DataSet();
DataTable dt = new DataTable();
dt.Columns.Add("IdStruk", typeof(string));
dt.Columns.Add("Jumlah", typeof(Int32));
dt.Columns.Add("Harga", typeof(Int32));
dt.Columns.Add("Tanggal", typeof(string));

foreach (DataGridViewRow dgr in dataGridView2.Rows)
{
dt.Rows.Add(dgr.Cells[0].Value, dgr.Cells[1].Value, dgr.Cells[2].Value, dgr.Cells[3].Value);
}
ds.Tables.Add(dt);
ds.WriteXmlSchema("Sample.xml");

CrystalReport1 cr = new CrystalReport1();
cr.SetDataSource(ds);
cr.SetParameterValue("Total", txtTotalP.Text);
cr.SetParameterValue("Jumlah", txtTotal.Text);
cr.SetParameterValue("DariTanggal", DTPFROM.Text);
cr.SetParameterValue("KeTanggal", DTPTO.Text);
Crviewer.ReportSource = cr;
Crviewer.Refresh();
}

Continue reading...
 
Back
Top