| Author |
Message |
DDSJ
Newbie
Joined: 18 Aug 2021
Online Status: Offline
Posts: 12
|

Topic: How to pull all values of field in page header? Posted: 18 Aug 2021 at 7:55pm |
|
Hi,
I am working on crystal report where I have to display the same field with different value from stored procedure in the page header suppressing the field value based on another field value. The problem is that in page header only first value of list fetched is displayed hence suppression is not working to fetch another values from list of values and showing blank in preview. How can we achieve other values of same field based on suppressed formula in page header ?
Thanks
DDSJ
|
IP Logged |
|
|
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
|

Posted: 19 Aug 2021 at 8:11am |
|
there are couple of ways to accomplish this...
You could run a subreport in group header 1a and use the results in group header 1b for your suppression.
You could do put all the information in a column in the stored proc.
You could mark the rows to be suppressed in the report in the stored proc.
As you see, I like to do as much logic in the stored proc as possible. It makes the report less intensive to code, and makes the report more transportable if you ever decide to change reporting platforms.
Also, I can see what the stored proc is doing much easier than the report making it easier for me to verify the results.
If you cannot modify the procedure, the subreport is probably the way to go. It will make for a slower report overall due to the subreport being called repeatedly, and you may not even notice...just something to think about.
HTH
|
IP Logged |
|
DDSJ
Newbie
Joined: 18 Aug 2021
Online Status: Offline
Posts: 12
|

Posted: 31 Aug 2021 at 12:47am |
|
I have already pulled the information in stored procedure column and trying to display the column values in a field in group header but want to display value based on condition.
For eg:
DB column name = A,B
Field in group header :
Field1, Field2
Field1 value : column A:value1 when Column B value='B1'
Field2 Value: Column A:value2 when Column B value='B2'
but in group header only first value is displayed that is column A:value1 and for field 2 value blank is displayed.
|
IP Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
|

Posted: 31 Aug 2021 at 9:54am |
|
is the group based on field1 and field2 or just field1?
If it is on both, as you have noticed you will only get 1 line.
If you want more, I would use a subreport which can group differently and display the results however you want.
HTH
|
IP Logged |
|
|
|