набор данных и не перетаскивая его в отчет? Я извлекаю URL-адрес из базы данных и на основе
показываю изображение из S3 в поле большого двоичного объекта.
Мне нужно сгенерировать поле BLOB-объекта динамически в Crystal Reports без добавления нового
столбца (например, QRIMG11) и перетаскивания его в отчет. Моя цель – добавить и отобразить QR
изображение в Crystal Reports динамически на основе полученного мной URL-адреса базы данных, а затем отобразить
возвращенное изображение. из S3 для столбца QRIMG11 Без добавления столбца вручную и перетаскивания его в
crystal report.
Возможно ли это в Crystal Reports?
Код: Выделить всё
var ds = db.GET_UNIFIED_GOVS(P_LICN_CIVIL_ID, P_LICN_CENTRAL_NO);
var P_DATA_CUR = ds.Tables["P_DATA_CUR"];
// check dynamic qr filling
int numberOfQRCodes = P_DATA_CUR.Rows.Count; // Get the number of rows (QR codes)
DataTable qrParamsTable = new DataTable(); // This will hold all QR images
// Create columns for each QR code image
for (int i = 0; i < numberOfQRCodes; i++)
{
qrParamsTable.Columns.Add($"QRIMG{i + 1}", typeof(byte[])); // Add column for each QR image
}
// Create a single row
DataRow qrParamsRow = qrParamsTable.NewRow();
// Loop through each row in the DataTable to fill the single row
for (int i = 0; i < numberOfQRCodes; i++)
{
string qrObjectKey = P_DATA_CUR.Rows[i]["FILE_NAME"].ToString();
// Get the image bytes from S3 using your existing method
var imageBytes = new AwsFile() { objectKey = qrObjectKey }.GetImageBytesS3();
// Set the value in the single row for the corresponding column
qrParamsRow[$"QRIMG{i + 1}"] = imageBytes;
}
// Add the filled row to the DataTable
qrParamsTable.Rows.Add(qrParamsRow);
eReg_Crystal.Rpt.RptGET_UNIFIED_GOVS_Test cr = new Rpt.RptGET_UNIFIED_GOVS_Test();
cr.SetDataSource(P_DATA_CUR);
cr.Database.Tables["QrParams"].SetDataSource(qrParamsTable);

Подробнее здесь: https://stackoverflow.com/questions/793 ... -blob-fiel
Мобильная версия