Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: command object Post Reply Post New Topic
Author Message
swastik
Newbie
Newbie


Joined: 15 Dec 2007
Online Status: Offline
Posts: 5
Quote swastik Replybullet Topic: command object
     Posted: 16 Dec 2007 at 8:56pm
how many lines can a command object hold,i have a query that lasting for almost 70 pages but it seems that the command object could hold only half of it, is there any way to address this,,
 
actually i'm using this command object for a cross tab report,can i split it into 2 command object and generate 2 cross tabs, but in  that case i need to restrict the column header  in the 2nd cross tab and i have  to make it look like the 2 tabs are contimous  ....
 
will it work..
 
thanks
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 17 Dec 2007 at 4:43am
Er, I'm not sure I understand your question.  I'm assuming that the data returned takes up 70 pages on the report.  Yes?  Now, when you say "command object," are you talking about a .Net object?  Or are you talking about using a SQL Command to generate your dataset?

What sort of error are you getting?  Are you only seeing half the expected data on the report?  Or, is the application crashing, possibly due to a memory exception?

I would strongly recommend against trying to split the report into two cross-tabs, and then trying to marry them up.  Even if you could get it to work, it's going to be much more of a headache than it's worth.  It would be much better to focus on why the one cross-tab is only using half the data.


IP IP Logged
swastik
Newbie
Newbie


Joined: 15 Dec 2007
Online Status: Offline
Posts: 5
Quote swastik Replybullet Posted: 17 Dec 2007 at 2:42pm
I'M TALKING ABOUT THE LENGTH OF THE LINES THAT ADD COMMAND CAN ACCOMODATE IN CRYSTAL XI R2,
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 17 Dec 2007 at 3:19pm
You have a SQL query that takes up 70 pages?!?!? I'm not surprised that CR crashes on this. This should be in a stored procedure in the database. Wow. That must be a nightmare to maintain. I guess you don't have access to the database to save it as a SP?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
swastik
Newbie
Newbie


Joined: 15 Dec 2007
Online Status: Offline
Posts: 5
Quote swastik Replybullet Posted: 18 Dec 2007 at 2:42am

REASON TO SPLIT THE CROSS TAB:

AS STATED EARLIER, MY COMMAND OBJECT COULD NOT HOLD MORE THAN 40 PAGES
 
IP IP Logged
Lugh
Senior Member
Senior Member
Avatar

Joined: 14 Nov 2007
Online Status: Offline
Posts: 377
Quote Lugh Replybullet Posted: 18 Dec 2007 at 5:27am
*cough*  Please turn your caps lock off.  Using all caps is poor netiquette.


So, you honestly have a SQL query (i.e., SELECT ... FROM ... WHERE ...) that is 40 pages long?  Way before I got into trying to get fancy with splitting the cross-tab, I would take one big step back and revisit the query itself.  Because that is going to be a nightmare no matter how you slice it. 

What exactly is causing it to be so long?  Multiple complex CASE statements?  Convoluted joins?  A massive array of options for an IN comparison?  Multiple subqueries?  I mean, I've written some pretty complex queries in my day.  I don't think I've ever written one that would go past two pages.  Well, maybe three, come to think of it.  But 40 is right out.

Is there any way you could off-load some of that work back into the report itself?  Split some of the data up into subreports, and use shared variables to calculate aggregate data?  Use formulas to format some of the results? Allowing more data through, and just suppressing unwanted records? Normally, I'd advise against doing that.  But, this may be one of those exceptions that proves the rule.

If that kind of length is still necessary, and you don't have a way to push the work off into the database itself (try taking your DBA to dinner, you'd be amazed what a $30 steak can accomplish Wink  ), then I'm not sure what to do.  I'm also still a bit lost as to how splitting the cross-tab will help with your problem.  Unless you mean trying to make it look like you are running a single cross-tab across multiple subreports.  In which case, my friend, I suggest psychiatric advice.  That is crazy talk.  There must be a better solution.


IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum