1. Roland Smith
  2. PowerBuilder
  3. Monday, 12 December 2022 14:18 PM UTC

Currently PB 2019 Build 2170, soon to be PB 2022.

We have a DataWindow report with a nested DataWindow report located in the Detail band.

I'm wondering if it is possible to have the nested report not retrieve when a column from the main result set is a certain value.

Roland Smith Accepted Answer Pending Moderation
  1. Monday, 12 December 2022 16:14 PM UTC
  2. PowerBuilder
  3. # 1

I did an experiment and found that the retrieve is not performed if the nested report is not visible on that row.

Comment
  1. Andreas Mykonios
  2. Tuesday, 13 December 2022 07:11 AM UTC
Thanks for sharing that.

Andreas.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 12 December 2022 14:38 PM UTC
  2. PowerBuilder
  3. # 2

Hi Roland;

   FWIW: just a random thought... What about using a Stored Procedure for that nested DWO's Retrieve() DB source? Then have the SP return a null result set when you get that specific value you were talking about. Food for thought. 

Regards ... Chris 

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Monday, 12 December 2022 14:36 PM UTC
  2. PowerBuilder
  3. # 3

Hi Roland.

What I tried to do is a little bit strange and may not be a solution for you.

In SQL Anywhere it works.

// Case 1
case
	when 1 = 0 then
		select 100 from dummy
	else
		select 'a' as a1 from dummy where a1 = 'a1'
end;

// Case 2
case
	when 0 = 0 then
		select 100 from dummy
	else
		select 'a' as a1 from dummy where a1 = 'a1'
end;

The idea is to check the value (as an argument) instead of  1 = 0 or 0 = 0... Don't know what database you use so cannot write something that would work for sure.

But the queries I wrote return different value depending of when...

Andreas.

Comment
  1. Roland Smith
  2. Monday, 12 December 2022 14:57 PM UTC
SQL Server
  1. Helpful
  1. Andreas Mykonios
  2. Monday, 12 December 2022 15:01 PM UTC
In SQL Server I believe you should be able to run that query.

Andreas.
  1. Helpful
  1. Andreas Mykonios
  2. Monday, 12 December 2022 15:01 PM UTC
Of course it needs some modifications...
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.