Hello,
Without getting too longwinded, i am having to produce a report which translates my client's personal shorthand method of noting the medication of a patient - they do have consistent shorthand for a given medication, but not a consistent order, or number of medications - into a description of the medication offered for the patient.
My current solution is to have a table with the shorthand for the medication and the actual description required on the report.
When the report is run, i have a nonvisible textbox control that has as its control source a subroutine which takes the shorthand list of medications and compares it one at a time to the 20 possible options, and then concatenates the required official descriptions, using blank lines etc, This long list is then written to another textbox, which is visible and can grow.
Essentially, it seems to work fine, it finds all the correct descriptions, it puts some of the textbox on the next page if needed, however, on closer inspection it does not always display what it should. Each time i generate the report, different patients work, and don't work. It isn't in the code (the correct number of medications are being recognised.) I think it must be in the formatting or printing events that i need to add something. If i print out a single page, it may or may not look the same as that page on the screen.
Any ideas, any thoughts on a different approach. (I've tried using the subroutine in the detail onformat event, and using the concatenated text to populate the caption for a label, however that would take the whole thing to the new page, rather than some on each, and i couldn't get the text boxes further down the report to move down the correct amount.)
I did get long winded after all - sorry
Anna
Without getting too longwinded, i am having to produce a report which translates my client's personal shorthand method of noting the medication of a patient - they do have consistent shorthand for a given medication, but not a consistent order, or number of medications - into a description of the medication offered for the patient.
My current solution is to have a table with the shorthand for the medication and the actual description required on the report.
When the report is run, i have a nonvisible textbox control that has as its control source a subroutine which takes the shorthand list of medications and compares it one at a time to the 20 possible options, and then concatenates the required official descriptions, using blank lines etc, This long list is then written to another textbox, which is visible and can grow.
Essentially, it seems to work fine, it finds all the correct descriptions, it puts some of the textbox on the next page if needed, however, on closer inspection it does not always display what it should. Each time i generate the report, different patients work, and don't work. It isn't in the code (the correct number of medications are being recognised.) I think it must be in the formatting or printing events that i need to add something. If i print out a single page, it may or may not look the same as that page on the screen.
Any ideas, any thoughts on a different approach. (I've tried using the subroutine in the detail onformat event, and using the concatenated text to populate the caption for a label, however that would take the whole thing to the new page, rather than some on each, and i couldn't get the text boxes further down the report to move down the correct amount.)
I did get long winded after all - sorry
Anna