Quantcast
Viewing all articles
Browse latest Browse all 256

My crystal report not working after publish with screen shot

My crystal report not working after publish with screen shot

hi, I have VISUAL STUDIO 2010, c#, with mysql database, i installed crystal report for visual studio.


all are working in the debugging mode in vs 2010
flow list is.
1. enter an id number in the textbox
2. after pressing the generate button , value of the textbox will be converted as a parameter of the crystal report
3. It shows the information of that i.d from the database.

screen shot here

Attachment 125055


after publishing my project crystal report no longer working.

screen shot here

Attachment 125057

been looking for the answer for the past 10 days. please help


this is my code from the report.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
using System.IO;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportSource;
using CrystalDecisions.Reporting;

namespace WebApplication11
{
public partial class report : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//this portion of data come from webform where i stored it in a session state.

desk.Text = Session["desk"].ToString();
Label2quan.Text = Session["qty"].ToString();
Label1issuedto.Text = Session["toname"].ToString();
Label2dept.Text = Session["todept"].ToString();
Label1issuedby.Text = Session["fromname"].ToString();
Label2date.Text = Session["date"].ToString();
Labelid.Text = Session["idform"].ToString();

//this portion is where i try to fill in the data to the crystal report

string cs = "data source=dlssvr; database = geography; user id=sa; password=service@password1";
using (SqlConnection con = new SqlConnection(cs))
{
ReportDocument rdoc = new ReportDocument();
SqlCommand cmd = new SqlCommand("formproce", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable ds = new DataTable();
da.Fill(ds);
rdoc.Load(Server.MapPath("CrystalReport1.rpt"));
rdoc.SetDataSource(ds);
rdoc.SetParameterValue("j parameter",Convert.ToInt32(Session["idform"]));
CrystalReportViewer1.ReportSource = rdoc;
CrystalReportViewer1.DataBind();
}
}
}
}

Attachment 125053



i also did tried to copy aspnet_client folder to the published directory

Viewing all articles
Browse latest Browse all 256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>