Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Page Breaks and nested reports

2 posts in PB Infomaker Report Writer Last posting was on 1998-03-04 17:53:57.0Z
Jim Kamp Posted on 1998-03-03 21:14:17.0Z
Newsgroups: sybase.public.infomaker.general
From: "Jim Kamp" <james.kamp@metrokc.gov>
Subject: Page Breaks and nested reports
X-Newsreader: Microsoft Internet News 4.70.1161
Date: Tue, 03 Mar 1998 16:14:17 -0500
Lines: 3
Message-ID: <348_01bd46f3$462ddd10$e8ba8192@kamp181364>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:7237
Article PK: 243267

Is there a way to set a page break between nested reports?

TIA

Jim Kamp


Terry Dykstra [TeamPS] Posted on 1998-03-04 17:53:57.0Z
Newsgroups: sybase.public.infomaker.general
From: "Terry Dykstra [TeamPS]" <no_spam_tdykstra@cfol.ab.ca>
Subject: Re: Page Breaks and nested reports
Organization: Canadian Forest Oil Ltd.
X-Newsreader: Microsoft Internet News 4.70.1161
Date: Wed, 04 Mar 1998 12:53:57 -0500
Lines: 51
Message-ID: <348_01bd479f$affe6960$3301020a@tdykstra>
References: <348_01bd46f3$462ddd10$e8ba8192@kamp181364>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:7236
Article PK: 243266

Not directly, but it can be done. The solution depends on whether you are
using IM 5 or 6.

IM6:
>>A group break occurs whenever a value changes in the column(s) on which
the group is based. But in a nested report that will never happen, since
the parameters sent from the main report to the nested report all have the
same value. So here comes the trick: we add a dummy group to the nested
report.

On the nested report itself you create 2 groups:
Group 1, based on a dummy value of 1. You must specify the 'new page on
break' option.
Group 2, based on the actual column(s) that are used with the retrieval
argument(s). Specify the 'new page on break' option. <<

IM5:
>>A group break occurs whenever a value changes in the column(s) on which
the group is based. But in a nested report that will never happen, since
the parameters sent from the main report to the nested report all have the
same value. So here comes the trick: we add some dummy rows to the nested
report, using a SQL UNION command. These rows will contain nulls only. The
easiest way is to duplicate the original select:

SELECT A, B FROM X WHERE A = :MY_ARG
UNION ALL
SELECT NULL, NULL FROM X WHERE A = :MY_ARG

So your data will look something like this:
A B
XX YY
null null

On the nested report itself you create 2 groups:
Group 1, based on a dummy value of 1.
Group 2, based on the actual column(s) that are used with the retrieval
argument(s). Specify the 'new page on break' option.

Sort the nested report, such that the null value rows appear first. This
will ensure that you trigger the page break properly.

Lastly, you set the visible property for all text objects so they are
invisible when you have null rows:
if ( IsNull ( A ), 0, 1 ).<<

--
Terry Dykstra [TeamPS]
Canadian Forest Oil Ltd.

Jim Kamp <james.kamp@metrokc.gov> wrote in article
<01bd46f3$462ddd10$e8ba8192@kamp181364>...
> Is there a way to set a page break between nested reports?
>
> TIA
>
> Jim Kamp
>