2

When I run the SSRS report with data having 150 000 characters it gives error

HResult E_FAIL has been returned from a call to a COM Component

I am using the single textbox to display this data. For any other data it works fine. I have searched on some other forums and they say that you can only print 32 000 characters using SSRS textbox in 2008, but then why its working for some other data with 150 000 characters and not working with this particular data.

The data is having numbers as below

1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890121234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 

For normal data its working fine. The data type of the SQL server column is nvarchar(max) and it has such numbers only for 150 000 as the data.

Sometimes it returns the result as value does not fall within the expected range, but this a text column so why it is then considering this as number. The other data example is having a 100000 characters as strings and then rest of 50000 characters as numbers that are separated with spaces as given above for example 1234567890 1234567890 like this upto 50000 characters length.

I am not sure how to deal with this error.

Umesh D
  • 253
  • 2
  • 5
  • 18
  • Are you sure the limit is not being hit when exporting to excel? 32000 sounds very close to the max length allowed for a cell value in excel. – Ross Bush Jan 15 '20 at 17:13
  • Hi Ross I am exporting it in a PDF and not in excel, actually for SSRS textbox its a max length I guess i am not sure but if that is true then why it working fine for any normal data like normal text without such numbers the data gets exported in PDF all the 150000 chars , but the data that is migrated has such bad data and that is giving such error – Umesh D Jan 15 '20 at 17:20
  • Your question is filled with unclear things, for example what does "1 lakh is a text" mean? or "50 000 are the numbers like this"? Like what? – James Z Jan 15 '20 at 17:27
  • Made a guess that with "data having the characters as 150000" you mean that "the data is 150000 characters" – James Z Jan 15 '20 at 17:28
  • Hi James The total characters are 150000 , 100000 characters are the strings and rest of the 50000 characters are such numbers as given sample in the question. They are repeated as upto 50000 characters. That is one data and the another data is having all 150000 characters as numbers as given in a question. For both of this data it gives error as stated in question – Umesh D Jan 15 '20 at 18:03
  • Additional details are in ssrs I am displaying the data in a table ( tablix) this works perfectly fine for any other normal data even if the length of data is large 150000 characters. For demo you can just insert it in a simple table copy paste 1234568890 1234667890 such numbers upto 150000 characters and then try to display it in ssrs , in SQL server column data type keep it as nvarchar( max) and then you will get such error – Umesh D Jan 15 '20 at 18:17
  • In your VS Project Directory you should be able to delete the `.vs` directory [faded looking folder]. Relaunch the Solution and try it again. This worked for me on this Error. – Matt Jan 16 '20 at 14:50
  • In my SQL Server Development Tools I don't have such directory, Can you elaborate more on this – Umesh D Jan 17 '20 at 06:41
  • Hi Matt,I have created a new Project and added a new RDL in that project and created a new data source but still it is giving me the same issue – Umesh D Jan 17 '20 at 06:46
  • @user3110224 I usually develop SSRS in Visual Studio and RDL**C**. My solution may not be as useful to you. I apologize for assuming. – Matt Jan 17 '20 at 16:32

2 Answers2

0

Could you try a dataset that does not involve any table?

The following worked in a simple report for SQL2008R2

select 
    Col1, len(Col1) AS LenCol1,
    Col2,
    Col3, len(Col3) AS LenCol3
from
(
select 
    replicate(cast('abcdefg hijklmnop' as nvarchar(max)), 10000) + char(13) +convert(nvarchar(20), getdate(), 120) as Col1,
    12345 as Col2,
    replicate(cast('1234567890 1234567890' as nvarchar(max)), 7000) + '------' +convert(nvarchar(20), getdate(), 120) as Col3
) as src
lptr
  • 1
  • 2
  • 6
  • 16
0

We have not found solution to the Technical error, but after discussing this with Onsite folks, we have come to conclusion that the data is in single line, if line breaks are inserted in the data, then SSRS is working fine. SO we have proposed a Data Fix for this issue rather than going on and on with technical error of SSRS. We have not done any changes in SSRS. If line breaks are inserted in data then it works fine.

Umesh D
  • 253
  • 2
  • 5
  • 18