Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
magertgen
Contributor III
Contributor III

Excel report sort order separate from page order

Hey all, I have an NP Excel report that creates a PDF report for people with appointments for that day.  I used a Page in the template to separate each persons data (a handful of tables and charts) within the report.  Right now when the PDF is printed, it's sorted by person alphabetically, just like the Page.  The end users are wondering if it's possible to keep the data separated by person, but order the report PDF pages by appointment time instead of person.  John has an appointment at 9:00 AM, his three pages print first, followed by two pages for Angie because her appointment is at noon, etc.

I've searched and experimented, but I can't see a way to do this.  Does anyone know if it's possible?

Thanks in advance, any help is appreciated!

~Mark

2 Replies
Daniel_Jenkins
Specialist III
Specialist III

Hi Mark,

If I understand correctly, you have a list of Patients with different appointment times and want to page on field Patient but you want the print order to be based on first appointment time. For example:

To achieve this I would add a PrintOrder table like this - where fields Patient and Appointment already exist in the table Appointments:

PrintOrder:
LOAD Patient, Min(Appointment) as PR, Patient as DispVal, RowNo( ) as rowno
Resident Appointments
Group By Patient order by Appointment;

Now you simply need to remove any sorting on DispVal and use it as the Page field. You should then get a report in the required order:

Project attached. Extract to folder C:\Temp\Community\060 or change the paths in the NSQ.

HTH - Daniel.

magertgen
Contributor III
Contributor III
Author

Hey Daniel, thanks for the tip!  I'll try this out and see if I can get it to work.

~Mark