| Author |
Message |
brockloch
Groupie
Joined: 03 Oct 2010
Location: United Kingdom
Online Status: Offline
Posts: 76
|

Topic: Shared Variables Posted: 26 Feb 2014 at 1:42am |
|
Hi
I have created a subreport with a shared variable and passed it to the main report - this all works great however I want to create a group on this shared variable - it isn't available to use - I am assuming it is not possible to do this.
Any help would be much appreciated.
Thanks
Ed
|
|
brockloch
|
IP Logged |
|
|
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|

Posted: 26 Feb 2014 at 5:09am |
|
I do not see how it would be possible because of the order of processing crystal uses. Grouping is done on Pass#1 and Hierarchical Grouping done on Pre-Pass#2. Subreports are done on Pass#.
|
IP Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
|

Posted: 27 Feb 2014 at 4:56am |
|
also, typically, shared variables return a single value, so how would CR group on it?
I know you can return an array, but I don't know how CR would use that to group...I would think that everything in the array would be one group.
As a rule, for CR to group on something, that something has to be intrinsic to the dataset, a field or a formula that acts on a field or fields...maybe another way of saying this is that the formula has to be deterministic just from reading the raw data. A shared variable is cannot be determined by just looking at the data...you have to do more work...and as kevlray states, it is in a later pass through the data.
|
IP Logged |
|
brockloch
Groupie
Joined: 03 Oct 2010
Location: United Kingdom
Online Status: Offline
Posts: 76
|

Posted: 27 Feb 2014 at 11:15pm |
|
Thanks for this, I think my ultimate aim was to have the shared variable in the main report as a formula with another variable in the main report, this would then be the basis of the group.
The main reason I am having to try this is that I have a report which uses table A & table B. I need all the data in table A but Table B only contains some of the variables from A therefore I am using a "Left Outer" join, which sort of works - but if the variable in Table A doesn't exist in table B the report return from Table B the first variable which starts with the same letter as Table A!
I feel the issue mat be more to be with the ODBC driver I am using.
Thank you all for your help.
|
|
brockloch
|
IP Logged |
|
|
|