Delete borrower or stockitem history
The information that is viewed from the Borrower history screen is made up of a combination of Borrower History and Stockitem history entries. Please note that HASREAD and Report history entries history entries actually come from the Borrower history, while RETURN entries come from the Stockitem History. Libraries wishing to remove the RETURN entries will need to delete the appropriate Stockitem history.
Care should be taken when deleting histories as once the entry has been deleted it cannot be retrieved.
History reports
Update report templates
The following report templates can be used in the Reports module to delete History if Update Entity is set to Y, and the report is run via the report Scheduler. The F7 Where statement is used to determine which records will be deleted.
Deletes/retains Borrower and Stockitem History records according to parameter set in Main >
Supervisor > Installation – Circulation tab: Keep the last ### history records
- &BORHIST.QRP – Deletes Borrower History ACTIVITY records
- &BORHICT.QRP – Deletes Borrower History REPORTS records
- &STKHIST.QRP – Deletes Stockitem History ACTIVITY records
- &BORFIN.QRP – Deletes Borrower Financial Transactions records
Summary report templates
The following report templates can be used in the Reports module for Summary reports which will just give a count of the number of records being deleted when used in the Reports module if Update Entity is set to Y, and the report is run via the report Scheduler.
- &BORHISU.QRP – Deletes Borrower History ACTIVITY records & produces count of records deleted (based on &BORHIST.QRP)
- &BHICTSU.QRP – Deletes Borrower History REPORTS records & produces a count of records deleted (based on &BORHICT.QRP)
- &STKHISU.QRP – Deletes Stockitem History ACTIVITY records & produces a count of records deleted (based on &STKHIST.QRP)
- &BFINSU.QRP – Deletes Borrower Financial Transactions records & produces a count of the records deleted (based on &BORFIN.QRP)
Note:
- To remove the RETURN and ISSUE History you will need to run the Stockitem History deletion report
- To remove the HAS READ History you will need to run the Borrower history deletion report
Supervisor setup
Borrower and Stockitem history records are kept until purged by the user. When they are purged the Keep the last ### history records setting will retain ### records despite any user report parameters. IF you intend to delete history based on a date range, you would always set this to 0.
- Launch the Amlib client
- Go to Main > Supervisor > Installation – the DEFAULT Installation screen will open
- Click on the Circulation tab
- Scroll down to Keep the last ### history records setting
- Change the Value to equal the number of records to be retained in a History deletion (if you want to all lines deleted based on your Where Statement, we highly recommend you set this to 0)
- Click the F3 Save button
- Then go to Installation dropdown > Advanced Copy
- In the Parameter Set dropdown select Circulation
- In the Source Location select DEFAULT
- Tick the setting “Keep the last ### history records” in the top table
- Click the Select All button next to the bottom table
- Then click the F6 Copy button at the top of the screen
- Say yes to the popup and select the Done button at the bottom of the screen
- Log out of Amlib client and restart for any changes to take effect
Note: If set to zero, all history for the date period defined in your Where Statement will be deleted once the report is run. If the parameter in the Supervisor module is set to a particular number (for example: 8) and the loan histories in the Borrower and Stockitem records are less than that of the Keep limit, then no records will be deleted during a history purge.
Please note: For libraries running version of Amlib prior to 5.4.1, the system will keep one history record of each History Type for each borrower or item even when the Supervisor setting is set to 0. It is for this reason that libraries are recommended to upgrade to Amlib Version 5.4.1 before running Borrower and Stockitem history deletion reports if it is important that ALL history is deleted for time period.
Create History Deletion Report
Borrower
- Go to Main > Reports > RepBorrower
- Click the F1 New button – the Select Report Format screen will appear
- Highlight the Borrower History report template you would like to use – &BORHIST.QRP (Borrower History) or &BORHISU.QRP (Borrower History Summary). You should locate these templates via Template name rather than Description, as these are multi-function templates and sometimes the Description refers to this alternate functionality
- Click the OK button
- Type in a Description – for example: Delete History > Years Old
- Ensure the Update Entity (Y/N) column is set to Y
- Click the F3 Save button
- Select the F7 Where button to set up the selection parameters – this will bring up the Borrower Reports – Where screen
- Enter the following Where search:
- Enter a start date: History Date >= enter a date in DD/MM/YYYY format – for example: 01/01/2010
- (Optional) Enter a finish date: History Date <= enter a date in DD/MM/YYYY format – for example: 10/10/2010 (a finish date is optional – if not inserted, the report will go up to the current date).
- (Optional) History Type LIKE READ
(Use the Paste button to insert the parameter into the list at the bottom of the screen) - (Optional) BorType = / BorType != - for example: BorType != H
- Click the F3 Save button when complete
- (Not required for Summary only reports) Click the F9 Order button – this will bring up the Borrower Reports – Order By screen
- Select BorBarcode from the Columns list and arrow it across into the Order By list
- Select and arrow History Type and History Date
- Click the F3 Save button when complete
Stockitem
- Launch the Amlib client
- Go to Main > Reports > RepStockitem
- Click the F1 New button – the Select Report Format screen will appear
- Highlight the Stockitem History report template you would like to use – &STKHIST.QRP (Stock Item History List), or &STKHISU.QRP (Delete Item History (with Summary)). You should locate these templates via Template name rather than Description, as these are multi-function templates and sometimes the Description refers to this alternate functionality.
- Click the OK button
- Type in a Description – for example: Deleting Previous Years Loan Histories
- Ensure the Create Fin (Y/N) column is set to Y
- Click the F3 Save button
- Select the F7 Where button to set up the selection parameters – this will bring up the Stockitem Reports – Where screen
- Enter the following Where search:
- Enter a start date: History Date >= enter a date in DD/MM/YYYY format – for example: 01/01/2010
- (Optional) Enter a finish date: History Date <= enter a date in DD/MM/YYYY format – for example: 10/10/2010 (if not inserted, the report will go up to the current date).
- (Optional) History Type LIKE ISS OR History Type = ISSUE
You can use ISSUE, RENEW OR RETURN
(Use the Paste button to insert the parameter into the list at the bottom of the screen) - Click the F3 Save button when complete
- (Not required for Summary only reports) Click the F9 Order button – this will bring up the Stockitem Reports – Order By screen
- Select ItemNo from the Columns list and arrow it across into the Order By list
- Select and arrow History Type
- Select and arrow History Date
- Click the F3 Save button when complete
Preview report
You may view this report before printing. This will not delete the records but will show you how many records may be deleted. The final total actually deleted may be less due to the Keep the last ### history records parameter in Main > Supervisor > Installation – Circulation tab.
- Highlight the report you wish to run and select F8 View
- The following message will appear: This type of report may use a Saved File. Do you want to select the file now?
- If you would like the report to run using the entire database (rather than a Saved File) then click the No button
- The report will then display:
- Select the print button to print the report
Schedule report
Start the scheduler
- From the Reports screen, select Application > RepStartSchedule
- The Report Scheduler screen will then open
- Select your printing options: Ensure Printing, E-mail and/or Save to File are ticked (you can tick all three if you intend on printing up multiple reports using multiple formats during a session)
- Also decide If a report is scheduled by another user do you still want to print it? = Yes/No
- Then click the OK button
- After clicking OK, if you go back into the Application menu you will see that RepStartSchedule is now greyed out with a tick next to it – this indicates that the Scheduler is now running
Please Note: If you need to restart the scheduler at any point, you will need to log out of all Report screens (Ctrl + L) and start at the beginning of these instructions.
Scheduling the report
- With your report highlighted, select the F6 Print button – the Print dialogue box will open
- Select from the following options:
- From:
- Database (to search the entire database)
- To:
- Printer
- Frequency:
- Once Only
- Schedule:
- First Print Date (leave as is)
- First Print Time (lease as is)
- Selected Printer:
- You can specify any active printer on the network to print to – including virtual printer drivers such as a third party software that allows you to print to PDF (For example: CutePDF Writer)
- You can specify any active printer on the network to print to – including virtual printer drivers such as a third party software that allows you to print to PDF (For example: CutePDF Writer)
- From:
- Once you have selected all of your settings, click the OK button
Check print progress
- You can check the progress of your reports at any time by going into Main > Reports > RepPrintProgress
- If your library uses the scheduler for a lot of reports, you can select a frequency type from the Filter drop-down menu at the top:
- You can also click through the three tab options at the top to see the ones that are Waiting, Running, or have already been Printed
- Your report will show up in “Printed” when it is complete