Search the Community
Showing results for tags 'sub-summary report'.
Greets, all: I know FSQL isn't for creating documents, but tables, but this should be do-able: I have a single table (OJI) where I'm only concerned with two out of its many fields, Injury_Root_Cause and zz_RecordID. What I want to do is sub-summarize by Injury_Root_Cause and list each's respective (unique) zz_RecordID's under each heading--sorted in ascending order--horizontally listed and each zz_RecordID separated by a comma. So far, I have some of the calculation working: ExecuteSQL ( " SELECT zz_RecordID FROM OJI WHERE Injury_Root_Cause = 'Carelessness' ORDER BY zz_RecordID " ; "" ; ", " ) That works great for listing the zz_RecordIDs for one value, Carelessness, but it doesn't list the Injury_Root_Cause's value. I stumbled on one possible way of doing this by gutting an example on the 'net, but I got lost in the syntax so it doesn't work: ExecuteSQL ( " SELECT * FROM ( SELECT Injury_Root_Cause,zz_RecordID FROM OJI GROUP BY Injury_Root_Cause,zz_RecordID ) ORDER BY Injury_Root_Cause,zz_RecordID " ; "" ; ", " ) Soooooo, if you see where I need to tweak the calculation I'd greatly appreciate it. Cheers!
Hello Is it possible to capture the fields sorted by in a variable? I have a sub-summary report with multiple sub-summary parts. The script will be set to Sort Records with dialog so users can take out or rearrange the order of the fields. I'd like to capture the actual sort order and use the variable as a header in the report. I see sort state as a get function, but don't see a get function for sorted fields. Is it possible to capture? Thank you.