Display text in a blob field

nbangaza
Member Posts: 30
Hi All,
I have text saved in a Blob field in a table. I would like to display the contents of the blob field(the text written on this field) in a report.
I have struggled with this, can anyone help?
Regards,
Q
I have text saved in a Blob field in a table. I would like to display the contents of the blob field(the text written on this field) in a report.
I have struggled with this, can anyone help?
Regards,
Q
0
Comments
-
nbangaza wrote:Hi All,
I have text saved in a Blob field in a table. I would like to display the contents of the blob field(the text written on this field) in a report.
I have struggled with this, can anyone help?
Regards,
Q
viewtopic.php?f=23&t=45307
1. divide the blob into array elements
2. in classic build a textbox for each element
3. print each element in RTC either in one textbox or in many.~Rik~
It works as expected... More or Less...0 -
It is possible to assign a textbox in a report to a blob field of a table. So i guess no arrays are needed because rdlc report can handle a large blob (text string) with no problems. You should be able to assign the blob field to a textbox, mabye you need to use Cstr() Function to get the text displayed.0
-
deV.ch wrote:It is possible to assign a textbox in a report to a blob field of a table. So i guess no arrays are needed because rdlc report can handle a large blob (text string) with no problems. You should be able to assign the blob field to a textbox, mabye you need to use Cstr() Function to get the text displayed.~Rik~
It works as expected... More or Less...0 -
I did some short testing but had no luck with the method i discribed, sorry for that... (But maybe there is a way of doing conversion from binary to text in rdlc)
But i found another solution:
Put this on the OnAfterGetRecord() Trigger of your Dataitem where you want to display the text.TempBlob.Blob.CREATEINSTREAM(IStream); StreamReader := StreamReader.StreamReader(IStream,TRUE);
Variable:Name DataType Subtype Length StreamReader DotNet 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.StreamReader
I used TempBlob table for my tests but of course this works with any blob field.
The last thing you need to do is using StreamReader.ReadToEnd() as SourceExpr of the textbox in the section designer.
Keep in mind to use ISSERVICETIER for this code if it's a hybrid report (classic & rtc) and you need to set the visible property to false.0 -
deV.ch wrote:I did some short testing but had no luck with the method i discribed, sorry for that... (But maybe there is a way of doing conversion from binary to text in rdlc)
But i found another solution:
Put this on the OnAfterGetRecord() Trigger of your Dataitem where you want to display the text.TempBlob.Blob.CREATEINSTREAM(IStream); StreamReader := StreamReader.StreamReader(IStream,TRUE);
Variable:Name DataType Subtype Length StreamReader DotNet 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.IO.StreamReader
I used TempBlob table for my tests but of course this works with any blob field.
The last thing you need to do is using StreamReader.ReadToEnd() as SourceExpr of the textbox in the section designer.
Keep in mind to use ISSERVICETIER for this code if it's a hybrid report (classic & rtc) and you need to set the visible property to false.
:thumbsup: good solution I hope to be able to test it soon.
Thx for sharing deV.ch.~Rik~
It works as expected... More or Less...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions