cancel
Showing results for 
Search instead for 
Did you mean: 

Add Command Limitations

Former Member
0 Kudos

Is there any character / lines restriction as to custom code that can be added to command? Below is the screen shot taken from MS word on code statistics. When I copy the code from SSMS to CR XI, it is only done partially.

If so, if there a way to modify the settings?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Sunil,

CR XI seems to be capable of only handling around 30KB of SQL Text; per SAP Note: 121808.

The workarounds:

- Upgrade to CR XI R2 SP6 (More info here)

- Use a Stored Procedure

-Abhilash

DellSC
Active Contributor
0 Kudos

However, bear in mind that later versions of Crystal also have limitations - I have run into it in CR 2008.  I don't remember what the exact number of characters is, though.

Once a query gets complicated enough to hit the command text limit in Crystal, you may want to consider using  a stored procedure or looking at ways to consolidate your query.  If you want to upload your query here as a text document, I may be able to point out some things you can do to simplify it and still get the same results.

-Dell

abhilash_kumar
Active Contributor
0 Kudos

Dell,

The newer versions support around 64KB of text.

-Abhilash

DellSC
Active Contributor
0 Kudos

Cool.  I've still hit that limit a couple of times, though.

-Dell

Answers (1)

Answers (1)

former_member292966
Active Contributor
0 Kudos

Hi Sunil,

Are you saying a query in SQL Server returns more records than the same query in Crystal?  I don't really understand what you mean by custom code or the word count means.

Thanks,

Brian

Former Member
0 Kudos

Thank you all for your replies.

Abhilash - I will try an upgrade first. I liked the idea of SP too.

Dell - My code is certainly complex but I have few things in my mind to try. If I fail, will certainly post the code for your review and help.

Brian - Example - say my code is 1300 lines in SSMS when I copy and paste it to Crystal under Add command, I can only see partial code copied, say 1100 lines and the remaining 200 lines just do not appear in crystal. I paste the same code on MS word file and can see 1300 lines.

Thanks again,

-Sunil