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.

Nested reports don't show

2 posts in PB Infomaker Report Writer Last posting was on 1998-12-10 23:20:41.0Z
Dave tR Williams Posted on 1998-12-08 22:43:03.0Z
Newsgroups: sybase.public.infomaker.general
Date: Tue, 08 Dec 1998 14:43:03 -0800
From: Dave tR Williams <davetr@Tek.com>
Reply-To: davetr@Tek.com
X-Mailer: Mozilla 3.01 (WinNT; I)
MIME-Version: 1.0
Subject: Nested reports don't show
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 14
Message-ID: <348_366DAB77.143E@Tek.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:6669
Article PK: 241656

If a nested report returns a value of zero using the code below:
'Printers shipped: '+count( mfgunitid for all)
then it is not returned to the containing report. I have tried using an
IF statement to return a string of 'Nothing shipped' if zero, but even
that does not work. I use InfoMaker 6 right now, although in version 4
it did the same thing. What is required is to get the nested report to
return a value of zero to the containing report. Thanks for any help
you can give with this perplexing problem.
"tR"


Terry Dykstra Posted on 1998-12-10 23:20:41.0Z
Newsgroups: sybase.public.infomaker.general
From: "Terry Dykstra" <tdykstra@cfol.ab.ca>
Subject: Re: Nested reports don't show
Date: Thu, 10 Dec 1998 16:20:41 -0700
Lines: 30
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <348_eXCPfmIJ#GA.321@forums.powersoft.com>
References: <348_366DAB77.143E@Tek.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.infomaker.general:6663
Article PK: 241649

Nested reports are designed to not print when there are no rows. To get
around that, you need to force the nested report to always return at least 1
row.
Convert the nested report to use a UNION:

select a,b,c from mytable
union
select null,null,null from dummy_table_that_contains_1_row

The report will now retrieve at least 1 row.

Be aware that if your nested reports relies on rowcounts (e.g.
count(mycolumn for all)), you will need to substract 1 to compensate for the
dummy row.

--
Terry Dykstra (TeamPS)
Canadian Forest Oil Ltd.

Dave tR Williams wrote in message <366DAB77.143E@Tek.com>...
>If a nested report returns a value of zero using the code below:
>'Printers shipped: '+count( mfgunitid for all)
>then it is not returned to the containing report. I have tried using an
>IF statement to return a string of 'Nothing shipped' if zero, but even
>that does not work. I use InfoMaker 6 right now, although in version 4
>it did the same thing. What is required is to get the nested report to
>return a value of zero to the containing report. Thanks for any help
>you can give with this perplexing problem.
>"tR"