Now it is easier on FM16, do you have?
This is somewhat a crosstab (pivot table) type of report.
What is the structure of your data (fields, relationships) such that the data can be pulled? (screen shots, please, or create a graphic with bogus names & data for examples)
It may be one (or more) of several methods to arrange so that the report is as you need. But how the data is stored is important in determining which method(s) for the reporting.
Agreed, the main task here is correctly gathering the data in the right (cross-tab or other) format.
That is a simplification of the actual file
The export file need to have the header row and a row for level 0 then first level1 with subs levels. Export should look like this except first column.
Header row Level Level0name level1 name Level2 name Level3 name Level4 name... level0 row 0 "Center" Level1 1 Name1 Level2 2 Name2 Level3 3 Name3 Level4 4 MainName Level2 2 Name2 Level3 3 MainName
You have a table for each "level"?
I see fk fields relating other levels.
Perhaps the relationship needs to be different for the report.
Thank you for the screen shots.
Sent from miPhone
The desired results seem more complex than the current documentation here so far.
It's not clear to me, for example, how your ERD relates to your desired output. What I would do is look at my data and figure out how to get the result set (Found Set), if possible, I need directly. If that's not possible, then as beverly suggested, I think, I would consider creating one or more special condensed report tables.
Perhaps what you want can be done with a SQL statement, but I'm not sure since I don't know your data.
What I would probably do is process this programmatically - outside of FMP using JDBC, getting actual data from your live FMP database - and then creating any kind of needed file, in any format whatsoever, including binary, from Java.
Assuming it might be super difficult to get the "exact" SQL to give me the data I wanted, I'd opt for more data in a less precise SQL and then use code to get the right output.
Each record can be calculated as
LevelNo & Substitute ( 10 ^ ( LevelNo + 1 ) - 1 ; 9 ; "," ) & NameField
(where LevelNo should be <= 400 )
Then export concatenated header and all records, on FM16 it can be "Export Field Contents" from container with any encoding, but FM15 or older need more steps.