Link to home
Start Free TrialLog in
Avatar of ElrondCT
ElrondCTFlag for United States of America

asked on

"Value does not fall within the expected range" with long CR parameter

Using Crystal Reports for .NET with Visual Studio .NET 2003, I'm passing a string parameter that is sometimes more than 254 characters. When it is, CR fails with the error: "Value does not fall within the expected range"

I've seen both here and on CR's web site that this is a known problem. However, I'm having difficulty finding a fix for it, in part because the support site has been totally rewritten since SAP's purchase of BusinessObjects earlier this year. I've downloaded some hotfix files, and was able to install a couple of them (crnet10win_en.zip and crnet11win_en.zip). However, while the version number of the files in C:\Program Files\Common Files\Crystal Decisions\1.1\Managed is now 9.1.9800.x (varies for different DLLs), the version number displayed in the references both for my project and in VS's list of .NET components still shows the original 9.1.5000.0. I've deleted the references from my project and readded them directly from the Managed files, but the version number doesn't change.

And according to other messages here (such as https://www.experts-exchange.com/questions/21692476/value-does-not-fall-within-the-expected-range-hot-fix.html), I need a version number of 9.2.9500.1 to get the fix anyway. However, if I try to run the update cr90devwin_en.zip, it fails when trying to update registry values, which I believe indicates a version mismatch (.NET isn't the same as CR v9).

Any ideas on how to resolve this, short of moving to a newer version of VS or buying CR? Unfortunately, splitting up the data into multiple pieces doesn't resolve my problem, because the parameter could be lengthy (it's a list of files being used, with full path information) and I don't know how much space to allow.
Avatar of Mike McCracken
Mike McCracken

You are correct, the .Net version isn't the same as the full version.

Check here for the service packs and hot fixes.
https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/bobj_download/main.htm

You may have to contact SAP/BO to get what you need since I didn't see any for the older versions of Crystal.Net

mlmcc
Avatar of ElrondCT

ASKER

I've gotten all the packs and hotfixes from that location that I can, but it doesn't resolve the situation.

The only way I see to contact SAP/BO for further assistance is by paying for a support incident at $195. If I'm going to pay that much, I might as well pay a few dollars more and get a full-fledged copy of CR. Is there another way to get assistance at lower (or no) cost?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've posted a question in SAP's forums, and have gotten no response. I'm not sure if that means no one's paying attention, or there's nothing to offer. Looks like I'll have to figure out some workaround. Since I only need the parameter to print out at one place in the report, I thought about using

            CType(rptOut.ReportDefinition.ReportObjects(strTextObject), _
                CrystalDecisions.CrystalReports.Engine.TextObject).Text = strOutput

to store the value into a text object, but I'm finding that the line breaks I want (between each file name, so each file is on a separate line) are getting converted into spaces, so the text is just running across the line. Any suggestions for an alternative?
Build your string like

strOutput = "Some FileName" & chr(13) & "Next FileName" & chr(13) & "thirdFileName"

mlmcc
I was already putting chr(13) & chr(10) between each line. When I take out the chr(10), I don't even get a blank space between the file names; they just run on. I wondered if the CanGrow property on the text field could be involved, but setting that False gives the same results.
Is this in the viewer or are you exporting?

Why are you doing the CTYPE?  That may be converting them to spaces.

mlmcc
Sorry, I tried to post a response but it looks like it didn't take. The CType is needed because not all ReportObjects have a Text property, so the CType tells VB what kind of ReportObject I'm working with so it doesn't give an error when compiling.

I found that I posted my question on the wrong forum at SAP; there's a specific forum for CR on .NET (which makes a lot of sense), but it wasn't linked to from the CR for .NET portal page. For anyone interested, the proper forum page is https://forums.sdn.sap.com/forum.jspa?forumID=313&start=0

Because it was posted in the wrong place, I didn't get any help. It was moved, but because the post was several days old, it's now buried, so I'm going to repost. But I'll close out here.