Brian,

Thank you for this detailed and very helpful outline. I did exactly as you described and produced exactly as I wanted!

I then added the RV command and added "open filename in RV" command to an existing two-level report and made the necessary changes about margins etc. And again I had several files created just as I wanted.

Just two further points:

1. Is it possible to specify that the files are saved to a particular folder rather then the default directory where the database are stored?

2. I was not prompted to confirm overwriting as each category went by (not that I am complaining).

Screenshots can be seen in this pdf to show how I set it up: www.woroner.com/report_settings.pdf.

Thank you again.

Victor

Brian Hancock wrote:
Hi Victor,

How many records in the data and how many categories in the lookup?
If there are not many data records (ie less than say 200 more than that gets
tedious pressing Y to continue) then this is very simple, and doesn't
require you to have set up any special indexes or to understand linking or
virtual links in reports. I am also assuming that your category names are
less than 8 characters long, or alternatively the first 8 characters are
unique (ie you would have to do something if these were tow of the
categories : "Australian Mammals", "Australian Marsupials"). Additionally my
formula assumes that the category names do not include characters that would
be invalid in the filename, eg ".,$&?/\" etc, (in which case you would need
to create a formula to strip those characters

1. Create a report based on your data panel
        a. Open data panel (ie your first panel)
        b. Shift F7 - Built In Short Reports - Insert
c. Press 8 (Edit report form) 2. Go to the Report Body
3. Create an RV and store the following: (this will strip spaces but not
other invalid character, the QQQ is the extension I have given, but you can
use your own, being careful that your naming can't clobber an existing file,

        cat.t[apply.format["U8;;D";<CategoryField>];".QQQ"]
        a. Replace <CategoryField> with F4 selection of the field
4. Immedately after the RV CTRL-F7, 1 (Select report Field), C (open
Filename in RV" and select the RV that you assigned the previous formula to
5. Add the output fields to the report, if is it a comma separated file add
a "," between each field and use the ;;B print indicator to remove leading
and trailing blanks from your data
6. Exit the report editor, change 7. Print Margins to 0,0,0,0 otherwise you
might get strange errors caused in the program using the output files (cause
by page breaks) which can really spoil a nice day
7. Shift F7 to run the Report
8. At each Overwrite prompt press Y, and hope that you do not have too many,
and continue until the report finishes.

You will get a series of new files named with your category headings (well
at least the first 8 characters.

If the first 8 characters of the category are not unique, then you will
accumulate the matching categories into one file.
If you have invalid characters in the filename you will get errors running
the report.

If you run the report a second time you should delete the files previously
created as the report above will append data to those files.

The two-level report, or basing it on your category panel will be a better
solution, but for a two level report you might have to play around with
indexes to ensure that your first panel has an index based on the category
index as the first element of a composite field index.  In either case the
issue of getting a valid unique filename will still be the same.

Regards
Brian



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Victor Warner
Sent: Tuesday, 7 October 2008 9:41 AM
To: Dataperfect Users Discussion Group
Subject: Re: [Dataperf] Reports query - sending each record to a
differentfilename.

Don and Brian,

Thank you both for the responses.

Beyond a certain point (and what you describe is way beyond that point!) I do not have the knowledge to implement what is suggested.

Would it be possible to have a few pointers on the mechanics of implementing one of the suggestions?

Victor Warner.

Brian Hancock wrote:
Hi Victor,

Don's suggestion sounds fine. Personally I have never been a fan of the
two-level report, no specific reason just haven't found reason to use it
much.
I would base my report on the lookup panel, and in the report body of this
panel store the required filename into an RV, depending on whether you
want
empty files for empty categories, or files only records exist for that
category you would place an Open Filename in RV in the report body, of the
Category Panel or in the FirstPage header of a Linked or Virtually Linked
Panel to your second panel where the data is, and then output the data.

You might need to turn file on and file off, to make sure you do not get
appends, or prompts to overwrite.

As yet an even third choice might be to let records append by basing the
report solely on the second panel, without even using a Two-Level report.
Just open the filename in RV changing it for the character heading for
each
report. Unless you use a Turn File Off the data is appended to the
existing
file. A big disadvantage of this however is that you will be asked whether
you want to overwrite the existing record which you would have to answer
yes
to at each record which reopened an existing file, however for a a report
with just a couple of hundred records is a nice quick and dirty method,
which allows you to view records one by one as they are written

Regards
Brian


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Victor Warner
Sent: Monday, 6 October 2008 10:58 PM
To: [email protected]
Subject: [Dataperf] Reports query - sending each record to a different
filename.

I would like whether the following is possible in DataPerfect:

1. There is a (first) panel where one field in each record acts as a category (which is obtained by a data link from a second panel). 2. In the first panel there be several records each having the same category heading. 3. I would to produce a report where all the records sharing the same category heading are sent to a file, then the report proceeds to the next category heading and sends all the records under that second category heading to a second file. (I can do this where the records are sorted and sent to the same file name.)

Is this possible to run one report and that the files are automatically created or do I need to do separate reports?

Help with this would be gratefully received.

Regards

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

Reply via email to