Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8378

Re: I need to display records in multiple groups

$
0
0

hi Sherman,

 

when you have an if then else statement, once a condition is met then the formula exits. that's why the records won't show up in both cases.

 

 

also, a record from a database can only show up in one group by default. you'd need to duplicate records in sql in order to have what was once one record show up in two groups. this is possible by adding a Command object that is a UNION ALL but you'd need to dive into some sql for that.

 

if you don't want to go the sql route, what you can do in cases like this if you're simply wishing to display a table is to use cross-tabs. in your case you can create 2 cross-tabs, one for the A, C, S selections and another for SorAorCorYandCurrentPhase.

 

steps

 

1) create a new formula called s1 with this syntax

if {Original100_GeneralInfo.100 Code} = "A" THEN "Projects Added to the Original 100" else

if {Original100_GeneralInfo.100 Code} = "C" THEN "Projects Combined with Other Projects" else

if {Original100_GeneralInfo.100 Code} = "S" THEN "Projects Split into Other Sub-Projects"

2) insert a cross-tab and use s1 as the Row

3) add the required fields to the summaries

4) you can format the cross-tab in the cross-tab expert tabs so that you can get things like no grid, no cell margins, horizontal summaries, etc.

 

5) copy and paste your cross-tab to a new section below the existing one

6) create another fomrula with this syntax

 

if {Original100_GeneralInfo.100 Code} in ["S", "A", "C", "Y"] AND {@CurrentPhase} = "Pre-Design" THEN "Original 100 in Pre-Design Phase"

 

7) in the new cross-tab, delete the existing s1 formula for the row and add the new formula instead

 

8) in your cross-tabs, you may have one blank row representing values that don't fit into the above categories. you can suppress those based on the blank value. if you do pursue this route let me know and send a screenshot of the cross-tab in design mode once it's done.


Viewing all articles
Browse latest Browse all 8378

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>