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.

Conditionally run sub-report

4 posts in PB Infomaker Report Writer Last posting was on 1999-06-29 14:32:38.0Z
LarryB Posted on 1999-06-28 17:22:18.0Z
Newsgroups: sybase.public.infomaker.general
From: "LarryB" <lhb1@mindspring.com>
Subject: Conditionally run sub-report
Date: Mon, 28 Jun 1999 13:22:18 -0400
Lines: 10
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <348_DqdtQnYw#GA.206@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.infomaker.general:6153
Article PK: 240089

Is there a way to turn on/off a sub-report based soley on a user-reponse?
The user already enters other info for "Prompt for criteria'. I want to be
able to also ask for a
'Yes' or 'No' option on running a subreport.

Can this be done in IM 6.5.?

-LarryB


Rick Marden Posted on 1999-06-28 19:33:50.0Z
Newsgroups: sybase.public.infomaker.general
Reply-To: "Rick Marden" <rmarden@primavera.com>
From: "Rick Marden" <rmarden@primavera.com>
Subject: Re: Conditionally run sub-report
Date: Mon, 28 Jun 1999 15:33:50 -0400
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <348_llXIOzZw#GA.155@forums.sybase.com>
References: <348_DqdtQnYw#GA.206@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.infomaker.general:6151
Article PK: 240087

This is what I came up with, but maybe there is an easier way:

In your nested report...
Add a computed column: 'Y' AS dummy
Add a retrieval argument named: Run_Sub_Report
Add to the select statement: WHERE dummy = :Run_Sub_Report

In the master report...
Add a retrieval argument named: Run_Sub_Report
Ignore the warning message that "An argument used in the Select is not
defined."
Open the Properties of the nested report. Click the Arguments tab and
select the Run_Sub_Report argument from the drop-down.

Now when you run the master report, you will prompted to enter a value for
Run_Sub_Report. Entering a 'Y' will select rows from the nested report and
entering anything else will not.

Rick Marden
Primavera Systems, Inc.

LarryB <lhb1@mindspring.com> wrote in message
news:DqdtQnYw#GA.206@forums.sybase.com...
> Is there a way to turn on/off a sub-report based soley on a user-reponse?
> The user already enters other info for "Prompt for criteria'. I want to be
> able to also ask for a
> 'Yes' or 'No' option on running a subreport.
>
> Can this be done in IM 6.5.?
>
> -LarryB
>
>


Terry Dykstra Posted on 1999-06-29 14:32:38.0Z
Newsgroups: sybase.public.infomaker.general
From: "Terry Dykstra" <tdykstra@cfol.ab.ca>
Subject: Re: Conditionally run sub-report
Date: Tue, 29 Jun 1999 08:32:38 -0600
Lines: 46
X-Newsreader: Microsoft Outlook Express 4.72.3612.1700
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
Message-ID: <348_4nzB8ujw#GA.287@forums.sybase.com>
References: <348_DqdtQnYw#GA.206@forums.sybase.com> <348_llXIOzZw#GA.155@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.infomaker.general:6148
Article PK: 240084

I thought of that approach, but the problem is that you now have two
prompts: first for the run_report retrieval argument and then secondly for
the 'prompt for criteria'.

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

Rick Marden wrote in message ...
>This is what I came up with, but maybe there is an easier way:
>
>In your nested report...
>Add a computed column: 'Y' AS dummy
>Add a retrieval argument named: Run_Sub_Report
>Add to the select statement: WHERE dummy = :Run_Sub_Report
>
>In the master report...
>Add a retrieval argument named: Run_Sub_Report
>Ignore the warning message that "An argument used in the Select is not
>defined."
>Open the Properties of the nested report. Click the Arguments tab and
>select the Run_Sub_Report argument from the drop-down.
>
>Now when you run the master report, you will prompted to enter a value for
>Run_Sub_Report. Entering a 'Y' will select rows from the nested report and
>entering anything else will not.
>
>Rick Marden
>Primavera Systems, Inc.
>
>LarryB <lhb1@mindspring.com> wrote in message
>news:DqdtQnYw#GA.206@forums.sybase.com...
>> Is there a way to turn on/off a sub-report based soley on a user-reponse?
>> The user already enters other info for "Prompt for criteria'. I want to
be
>> able to also ask for a
>> 'Yes' or 'No' option on running a subreport.
>>
>> Can this be done in IM 6.5.?
>>
>> -LarryB
>>
>>
>
>


Terry Dykstra Posted on 1999-06-28 19:10:47.0Z
Newsgroups: sybase.public.infomaker.general
From: "Terry Dykstra" <tdykstra@cfol.ab.ca>
Subject: Re: Conditionally run sub-report
Date: Mon, 28 Jun 1999 13:10:47 -0600
Lines: 26
X-Newsreader: Microsoft Outlook Express 4.72.3612.1700
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
Message-ID: <348_EiNavlZw#GA.155@forums.sybase.com>
References: <348_DqdtQnYw#GA.206@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.infomaker.general:6152
Article PK: 240088

I don't think you can do this when using the 'prompt for criteria'.
The general technique for conditionally running nested reports, is to add a
retrieval argument on the report:
select ..
from ..
where 'N' <> :runreport

If you pass anything except 'N', the report will run. When you pass 'N',
the where clause will return false and not retrieve any rows.

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

LarryB wrote in message ...
>Is there a way to turn on/off a sub-report based soley on a user-reponse?
>The user already enters other info for "Prompt for criteria'. I want to be
>able to also ask for a
>'Yes' or 'No' option on running a subreport.
>
>Can this be done in IM 6.5.?
>
>-LarryB
>
>