SSRS ile CRM Attachment Resimlerini Gösterme
CRM On-Prem veritabanında notlar (ekler) AnnotationBase tablosunda durur.
DocumentBody Base64 stringdir, bunu SSRS içinde byte[] formatına çevireceğiz.
SSRS Dataset’inize CRM Attachment (Annotation) tablosundan veriyi alın
SELECT
a.AnnotationId,
a.ObjectId,
a.MimeType,
a.FileName,
a.DocumentBody — Base64 string olarak tutulur
FROM
AnnotationBase a
WHERE
a.ObjectId = @YourRecordId
AND a.MimeType LIKE ‘image/%’
2. Raporun içine bir “Image” kontrolü ekleyin
Image → Properties → General sekmesi:
- Image Source: Database
- MIME Type:
=Fields!MimeType.Value - Use this field: →
=Convert.FromBase64String(Fields!DocumentBody.Value)
Bu kısım önemli:
CRM’nin DocumentBody alanı Base64 formatında olduğu için SSRS içinde Convert.FromBase64String kullanmanız gerekir. Aksi halde resim gösterilmez.
Yorum gönder