See comments in your text. There are other ways to do this, but this seems to me to be the simplest and clearest.
Don

Victor Warner wrote:
Don

I am sorry but I am failing, somewhere, to understand some part of your suggestion. I am almost a complete novice for this more advanced stuff. I would like to go over this procedure again with a few queries:

1. First, right at the top of the report, I create rv 250, just with

""

in it (no space between the question mark)

Yes

2. right at the start of the report body of the sub-report, I print the rv 250, and set "Eliminate Line if Blank".
Yes

QUERY: what should the format of this rv be, if it only contains nothing? Should it is still be A0A0;;T
Yes. That format allows for multiline text in your variable, but includes nothing after the last character in your variable (that's the purpose of the ";;T"). At the beginning, when RV250 = "" there will be nothing to print in the RV, so you will skip that line in the Report and not leave a blank line there.

3. Then follows the fields from the panel used for the sub report (plus any other text) etc
Yes

4. At the end of the report body of the subreport I "set RV250 to the text you want between your records, i.e. to "
and also present the same time was "

QUERY: This part I am obviously lost here. Do I print the RV250 again with the format A0A0;;T and then just type the text I wish to include in the report of the sub-report after printing RV250?
No, you do not print RV250 here. If you do, you will get it printed twice with each subsequent record that is selected, once before and once afterward. Instead you define a new report variable (in the same way you defined it in the beginning except that here you give it the text you want between your records, and when you are asked for the number, you number it 250. The values you have entered for it then replace whatever was in RV 250 before, so that when it prints with the next record, you get the text you want between your records.

Victor Warner.



body, before anything else I printed report variable 250 with a format of A1 and set "Eliminate Line if Blank"

Don Codling wrote:
September 25, 2007

If your report of what you did is correct, & I understand it correctly, you are not printing the report variable, but text you previously had in your report, so it comes out the same way.

You set your report variable size as A1 - that will give you only 1 character of your report variable, at best. I would suggest an A0A0;;T format. Alternatively, An;;T where n is the number of characters in the longest insert you would use, or more. It is important to add the truncate code, because otherwise your blank line will always print for the first record. Without the truncate code, DP automatically fills in whatever you have in the variable with spaces, so it will see a non-blank line.

And delete the text you had previously in the report to give you this extra line.

Don Codling
WP 12.0.0.602
DP 2.6x
Windows XP home, SP2
512 MBytes RAM

Victor Warner wrote:
Don,

This is what I did

1. First I created a report variable 250, just with

""

in it (no space between the question mark)

2. Then in the report body, before anything else I printed report variable 250 with a format of A1 and set "Eliminate Line if Blank"

3. At the end of the report body, created another report variable 250 with the following

"and also present the same time was"

4. Then printed the report variable.

I assume these are the steps, but the result is still the same, the text still gets printed twice

Victor



Don Codling wrote:
September 25, 2007

Hi Victor

1. "In the report header, set up a variable, call it variable 55, & set it to "" ". Do I place this right at the top of the report? Not in the header of the sub-report in question?
I think it should work in either place, but I would put it right at the top of the report, to be sure.

2. "As the first item in your subreport, print Var 55 a. Mark it "skip line if blank" " Is this in the sub-report's header or report body?
The first item in the sub-report body because you want it to "print" with every record that is printed.

3. "At the end of your subreport, set Var 55 to the text". Again is this at the end of report body or the sub-report in the footer/final footer?
Again, in the sub-report body, because you want it to change with the first record that is chosen, so that it prints your text with all further records.

Don Codling
WP 12.0.0.602
DP 2.6x
Windows XP home, SP2
512 MBytes RAM

Victor Warner wrote:
Don,

Thank you for the reply. Just a few queries.

1. "In the report header, set up a variable, call it variable 55, & set it to "" ". Do I place this right at the top of the report? Not in the header of the sub-report in question? 2. "As the first item in your subreport, print Var 55 a. Mark it "skip line if blank" " Is this in the sub-report's header or report body? 3. "At the end of your subreport, set Var 55 to the text". Again is this at the end of report body or the sub-report in the footer/final footer?

Victor

Don Codling wrote:
September 25, 2007

Here is a suggestion for your problem of printing information between records selected in a subreport. I have not tested this, but I think it will do what you want.

1. In the report header, set up a variable, call it variable 55, & set it to ""
2.    As the first item in your subreport, print Var 55
   a.    Mark it "skip line if blank"
3. At the end of your subreport, set Var 55 to the text you want between your records, i.e. to "
and also present the same time was
". You may want added hard returns to give you the spacing you desire

The effect of this should be to do nothing at the beginning of the first record selected any time you run the report, because var 55 is set to "". But then the var is reset in the subreport to the text you desire & will print before each selected record in your subreport. Nothing will print at the end because it prints only at the beginning of the printout of selected records.

I hope that helps.


Don Codling
WP 12.0.0.602
DP 2.6x
Windows XP home, SP2
512 MBytes RAM

Victor Warner wrote:
I am still trying to solve this issue. I have been over Ralph's chapter on subreports and the chapter on iteration control and I just cannot get this seemingly simple thing to work, even with some of the methods/suggestions in the Iteration control chapter.

I can use the parallel report technique to count the records and get that result placed where I wish in the report, but still cannot work out the following:

1. That where there are two records to be printed (using a sub report), 2. after the first printing of the first record, some text is printed, but
3. that text is not printed after the second record is printed.

This advanced stuff is new and difficult for me to grasp. Help with this would be really appreciated.

Victor Warner.



Victor Warner wrote:
I have gone over the chapter, and have worked out to do the counting of the records using parallel reports and this works as expected, so that the where an order number has two persons ordering then I can print out the extra text I described in my original problem but only where there is more than one person ordering (using a if statement taking the value from the first parallel report)

However I am still having one problem is that wherever I place the printing of the variable which taking the value from the first parallel report, it is repeated twice

"John A Smith, date of birth [ ], residing at [ ] and identified by his British passport [ ]
etc

and also present the same time was

Jane B Smith, date of birth [ ], residing at [ ] and identified by her British passport [ ]

and also present the same time was"

The "and also present the same time was" is printed twice (which is controlled by the variables used to count etc).

I am not sure how to control this so that "and also present the same time was" is only printed once.

Looking the rest of the chapter I could not work this out. Help with this would be greatly appreciated it.
Victor Warner


Ralph Alvy wrote:
Go over the section in my book called Subreports and Subroutines. There is extensive discussion there on using subreports to gather data before actual printing starts, using parallel reports, dummy reports, etc.

On Fri, 21 Sep 2007 15:18:56 -0700, Victor Warner <[EMAIL PROTECTED]> wrote:

I would be grateful to know whether the following is possible, where

1. I have a panel which is contains an order number (Panel 1).

2. Another panel contains the details of what is ordered (Panel 2)

3. A third panel contains the name of address of the person(s) ordering (Panel 3)

4. There is a link between Panel 1 and Panel 2 (based on the order number) and a link
between Panel 2 and Panel 3 (based on a customer number).

5. For each order there can be two or more customer records.

In a report I have created which uses subreports (in the order Panel 1, 2 and 3) where there is one customer then the report works fine, but where there are two customers for the one order their is a slight variation I would like to make a slight change but cannot work
out how to do it.

To be specific, in the report, when producing details from Panel 3, there is stated where there is one
customer:

"John A Smith, date of birth [ ], residing at [] and identified by his British passport [ ]
etc"

which is what I want.

If there are 2 customers then two sets of details are reproduced, eg

"John A Smith, date of birth [ ], residing at [ ] and identified by his British passport [ ]
etc

Jane B Smith, date of birth [ ], residing at [ ] and identified by her British passport [ ]"

Again this is what I expect to see, however there is one addition that I wish to make which is to add some additional wording between two sets of details. What I am looking for is it possible to carry out a count of the number of records which are present against the particular order number and if there is 2 of them then add the additional wording.

eg

"John A Smith, date of birth [ ], residing at [ ] and identified by his British passport [ ]
etc

and also present the same time was

Jane B Smith, date of birth [ ], residing at [ ] and identified by her British passport [ ]"

Victor Warner.



_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf

Reply via email to