
Я хочу показывать изображение в моем средстве просмотра отчетов из моей базы данных, мое средство просмотра отчетов работает нормально. Мне просто нужно изображение для каждого выбора, и в моей базе данных уже есть изображения для каждого пациента. просто хочу показать, что здесь, на моей странице .aspx, я также прикрепил код ниже.
Моя страница Aspx:
Мой файл .cs:
Я хочу показывать изображение в средстве просмотра отчетов из моей базы данных.
Код страницы aspx находится здесь
public partial class PatientReport : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
populateDropDownPat();
}
}
private void populateDropDownPat()
{
try
{
patientCollection pcal = (new patientBAL()).GetAllDetailspatient();
DropDownPat.DataSource = null;
DropDownPat.DataSource = pcal;
DropDownPat.DataTextField = "patientName";
DropDownPat.DataValueField = "PatientID";
DropDownPat.DataBind();
DropDownPat.Items.Insert(0, new ListItem("--Select Patient--"));
}
catch(Exception ex)
{
}
}
protected void DropDownPat_SelectedIndexChanged(object sender, EventArgs e)
{
string name = DropDownPat.SelectedItem.Text;
patientCollection pcal = (new
patientBAL()).GetDetailsByPatientName(name);
ReportViewer1.Visible = true;
this.ReportViewer1.LocalReport.EnableExternalImages = true;
this.ReportViewer1.LocalReport.ReportPath = "Report1.rdlc";
ReportViewer1.LocalReport.DataSources.Clear();
ReportDataSource rds = new ReportDataSource("DataSet1", pcal);
this.ReportViewer1.LocalReport.DataSources.Add(rds);
this.ReportViewer1.LocalReport.Refresh();
}
}
Подробнее здесь: https://stackoverflow.com/questions/459 ... dlc-report
Мобильная версия