Solved

How to fix Crystal Reports Bug that causes Buffer too small for string or missing null byte error?

Posted on 2008-10-24
10
1,867 Views
Last Modified: 2013-11-07
Details of my Page:
I have an aspnet listbox that allows multiple selects.  ListBox something like this:  All, House, Mechanical, Comfort, Noise, Electrical.  <--small example...maybe 50 options.  User can select as many options as needed.  Then these options are passed through a string as parameter Issues to a stored procedure variable @Issues.  However that all works.  


The Problem:
When i pass the querystring to CrystalReportsViewer, I get the above error.  
I have a field on the the report called:

report.SummaryInfo.ReportComments = Request.QueryString("Comments1") & Request.QueryString("Comments2") & Request.QueryString("Comments3")

where
Comments1 = ReportTitleName  <--not too big
Comments2 = selections from List which can be up to 50 words  
Comments3 = EnteredByInformation <--not too big...

and depending on size of Comments2, I will get the error:   Buffer too small for string or missing null byte error.  

My Question:
Is there anyway to make        report.SummaryInfo.ReportComments  size limitless?
otherwise how would I fix?

0
Comment
Question by:silemone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 22797131
What version of Crystal?

I don't think it is the Crystal length.  I suspect it is an ASP or system buffer.

mlmcc
0
 
LVL 21

Author Comment

by:silemone
ID: 22797923
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>  

i hope that helps with version question.
0
 
LVL 21

Author Comment

by:silemone
ID: 22798063
oh...and it doesn't happen until i load the query string into the report object and it works if i only select up to 10 options...but past that it will give the error....also error points directly to  report object:

report.SummaryInfo.ReportComments = Request.QueryString("Comments1") & Request.QueryString("Comments2") & Request.QueryString("Comments3")


report is Crystal Report Object

Private report As New CrystalDecisions.CrystalReports.Engine.ReportDocument.

If I remove one of the QueryStrings or pick less data from select object, it does not give an error.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 100

Expert Comment

by:mlmcc
ID: 22798342
CR XI is not supposed to have a string length issue.

Is the problem when the string gets to around 254 characters?

mlmcc
0
 
LVL 21

Author Comment

by:silemone
ID: 22798944
yes...and the error that's given is exactly the one that I included...yes, but its either the buffer size is too great or the number of characters may be causing the issue...also...I noticed that the field that the data is going to is a IFieldObject...
0
 
LVL 21

Author Comment

by:silemone
ID: 22799247
Another note:  if i add that string to an <asp:Label  id="lblText"...>
the super long string will show on page...however if i try to pass it to the field on the report I get the error.  
so it's not an issue with the QueryString length that i'm using to pass data with (as I thought it would be since Buffer error) or i would get an error when I pass string to lblText.Text...however when I pass that same text to CR IFieldObject, it's too big...i know it does fail when text size is: 1459.  Its stops at length 511...after that it crashes.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22799434
Sounds like the CR.IFieldObject is limited to 512 hcaracters.

mlmcc
0
 
LVL 21

Author Comment

by:silemone
ID: 22799496
is there anyway i can change limits?
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 22799883
I don't think so.

mlmcc
0
 
LVL 21

Author Comment

by:silemone
ID: 22815021
Thanks for your help and time...i don't think we've actually moved forward on a solution, but I'll give you all the points.  you did verify what I thought was the case...Thanks for your time.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question