I would use the VirtualLIst technic here. Go through your fields, collect the relevant ones and assign store the collection in a global variable ($$), use this variable to populate the VirtualList.
But I would consider a redesign of your DB scheme. Put your fields as key/value pairs in a separate table (just 3 fields ReportID, Fieldname, Value), then you can collect the entries by a simple ExecuteSQL statement. Make a script to pre populate the keys to the input form.
Otmar last suggestion is on track. Create a template table with all the questions and what report they belong to, then let the doc:
- select a report -> this will show all questions for the report
- select one or more questions -> this create a new record in the table that you will run the report from
- now you have a simple set of records to print, just like any old report
Excellent idea. I will try that. Thank you
This is my method and the most flexible in reporting only those questions with responses.
Another possibility - not better, but different - is to use 'Hide Object When' (the 'when' being IsEmpty) in combination with Remove Blank Space by Sliding Up/Left. I suggest this because it sounds like your report would be for a single patient, rather than summing up info from many patients. You could have one template = layout for data entry, and another essentially identical one (except for the Hide & Slide stuff) for printing that only prints out fields (and their labels) that contain information. It could end up not looking as good as what you could do with a Virtual List, especially if there are multiple columns where you might end up with 9 visible in one column and 3 in the other.
I would conditional format the background of the modified fields, maybe with a light green color, but still report all the fields.
Never heard of a medical report in which you only need to see fields with info different from standard, btw.
And I've been developing medical software for a while..