Joined: 03 Feb 2014
Location: United States
Online Status: Offline
Posts: 4
Topic: Need help with displaying data Posted: 04 Feb 2014 at 8:41am
I have a sub report in which the report looks as follows:
Group header 1
Group header 2
Group header 3
Group header 4
Detail a
Detail b
Detail c
Detail d
Detail e
Group Footer 4
Group Footer 3
Group Footer 2
Group Footer 1
Now I have a query which has five parts and I separate each part using union. So I have 5 sections in the result set. The first section goes to detail a, the second to detail b, the third section to detail c, the fourth section to detail d and the fifth section to detail e. The query may or may not return data for each section. For example the result set can contain only section 1 and section 2 or section 3 and section 4.
The problem I am facing right now is that if the section is not returned I have to display a blank section of that detail. Could you please help me out with this problem. Any suggestion would be greatly appreciated.
Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Posted: 04 Feb 2014 at 9:09am
if you are using a command query with union
you could try
select 'Detail a' as detail_group, other_columns
from table
union
select 'Detail b' as detail_group, other_columns
from table
.. etc
then group on detail_group field
and you'll need only 1 details section
Joined: 03 Feb 2014
Location: United States
Online Status: Offline
Posts: 4
Posted: 04 Feb 2014 at 9:46am
But there are 4 group headers and one of my grouping is done as you suggested. If it were a single group it would have been ok but since there are 4 group headers it doesn't work.
Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Posted: 04 Feb 2014 at 11:22am
not sure what is your set up
another option is a suppression formula
in section expert
go to section expert next to Suppress click x-2 button
and for each of the details section
write a suppression formula like
@formula = ""
or
someFIeld = ""
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