تقرير الكريستال يتعامل مع أول صفين في جدول الداتا جريد فيو
ولا يظهر باقي البيانات التي تضاف له
تقرير الكريستال يتعامل مع أول صفين في جدول الداتا جريد فيو
ولا يظهر باقي البيانات التي تضاف له
السلام عليكم ورحمة الله وبركاته
ممكن توصح اكثر
سبحانه الله وبحمده سبحانه الله العظيم
if (You Love ArabTeam2000 ) MessageBox.Show("All ArabTeam2000 Love You"); else MessageBox.Show("go to your mama"); التقرير بيحتفظ بالبيانات القديمة حتي لو تم حذفها من قواعد البيانات رغم إني عملت uncheck حفظ الداتا في الريبورت ورغم ذلك البيانات القديمة مازالت موجودة
.
تم تعديل هذه المشاركة بواسطة KARIMSOFT في 9 أغسطس 2016 في 02:05
سبحانه الله وبحمده سبحانه الله العظيم
if (You Love ArabTeam2000 ) MessageBox.Show("All ArabTeam2000 Love You"); else MessageBox.Show("go to your mama");
try
{
ReportDocument crRep = new ReportDocument();
DataView Report_Parameter_view;
Report_Parameter_view = (DataView)SqlDataSource_Report.Select(DataSourceSelectArguments.Empty);
string sRepName = Report_Parameter_view[0].Row["Report_Name"].ToString();
this.Title = sRepName;
sRepName = sRepName.Replace(" ", "_");
crRep.Load(Server.MapPath("~\\" + Report_Parameter_view[0].Row["Report_File_Name"].ToString()));
SqlConnectionStringBuilder csbDb = new SqlConnectionStringBuilder(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
Tables crTables;
TableLogOnInfo crTableLogOnInfo;
ConnectionInfo crConnectionInfo = new ConnectionInfo();
crConnectionInfo.ServerName = csbDb.DataSource.ToString();
crConnectionInfo.DatabaseName = csbDb.InitialCatalog.ToString();
crConnectionInfo.UserID = csbDb.UserID.ToString();
crConnectionInfo.Password = csbDb.Password.ToString();
crTables = crRep.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in crTables)
{
crTableLogOnInfo = crTable.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTable.ApplyLogOnInfo(crTableLogOnInfo);
}
if (Report_Parameter_view[0].Row["val"].ToString() == "True")
crRep.SetParameterValue("@val", Session["val"].ToString());
// Export
ExportOptions oExportOptions = new ExportOptions();
oExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
if (Session["ExcelFormatOptions"].ToString() == "1")
{
ExcelFormatOptions oExcelFormatOptions = ExportOptions.CreateExcelFormatOptions();
oExcelFormatOptions.ExcelTabHasColumnHeadings = true;
oExcelFormatOptions.ExcelUseConstantColumnWidth = true;
oExcelFormatOptions.UsePageRange = false;
// Use detail section one as a guideline to determine column width
oExcelFormatOptions.ExcelAreaGroupNumber = 1;
oExcelFormatOptions.ExcelAreaType = AreaSectionKind.Detail;
// ExportOptions
oExportOptions.ExportFormatOptions = oExcelFormatOptions;
oExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.ExcelRecord;
}
try
{
crRep.ExportToHttpResponse(oExportOptions, Response, false, sRepName);
}
catch
{ }
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "text/richtext";
Response.Flush();
Response.Close();
crRep.Close();
crRep.Dispose();
}
catch (Exception ex)
{
Label1.Text = ex.Message.ToString();
}سبحانه الله وبحمده سبحانه الله العظيم
if (You Love ArabTeam2000 ) MessageBox.Show("All ArabTeam2000 Love You"); else MessageBox.Show("go to your mama");