Normal Topic How to create and save reports with a batch file (Read 5421 times)
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
How to create and save reports with a batch file
Feb 16th, 2022 at 8:38pm
Print Post Print Post  
Each day, I generate reports in HTML for special order arrivals by each clerk and reports for pending purchase orders.

After the previous day's deliveries are posted to our Sold database, I click on the button to generate the reports.
Once that happens, I must save the reports individually to our Cloud drive.  There are 12 different reports.

In Q&A, I used to print to text using macros.  I tried the Sesame Export feature, but the spacing was inconsistent. Any ideas how I can resolve this?
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: How to create and save reports with a batch file
Reply #1 - Feb 27th, 2022 at 11:15pm
Print Post Print Post  
Why not use something like a series of @XResultSetPrintReport() calls (which provides you with the filename of the report it generates)? Then, you can use @Shell() with a DOS move command to relocate each file (or Xcopy to copy them).
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
Re: How to create and save reports with a batch file
Reply #2 - Mar 1st, 2022 at 5:20pm
Print Post Print Post  
Hi Carl,

When I click on the All Reports button, it would generate reports like the name below.

C:/Sesame2/SesameReports/NEWARR7_2022_03_01_13_15_58.htm 

in the Sesame Reports folder on the local machine. The file should be NEWARR7, but each day it is printed it is a different name with the date-time extension.

How do I make the batch file do this?
  
Back to top
 
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 103
Joined: Mar 22nd, 2018
Re: How to create and save reports with a batch file
Reply #3 - Mar 3rd, 2022 at 12:49pm
Print Post Print Post  
Hi Carl,

I got it.

Thanks
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: How to create and save reports with a batch file
Reply #4 - Mar 22nd, 2022 at 2:57am
Print Post Print Post  
I assume you used something like "C:/Sesame2/SesameReports/NEWARR7*.htm" in the batch file?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged