43
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 51
Slowing Down Outgoing Emails
If your SMTP service provider imposes a limit on how many emails you are allowed to send
within a given time period, you may need to slow down the email queuing process:
Set the Visual CUT Outgoing folder as:
c:\Visual CUT\smtpQ\Delayed
and the Outgoing folder monitored by smtpQ as: c:\Visual CUT\smtpQ\Outgoing
This means Visual CUT would deposit eml files in the Delayed folder, so they won't be sent
unless they get moved to the smtpQ Outgoing folder.
The following batch file would move the files from the Delayed folder to the Outgoing folder at
a rate of 1 per 10 seconds.
----------------------------------------
@ECHO OFF
for %%i in ("c:\Visual CUT\smtpQ\Delayed\*.eml") do (
Move "%%i" "c:\Visual CUT\smtpQ\Outgoing\"
timeout /t 10 /nobreak
)
----------------------------------------
A timeout of 10 seconds would result in only 6 emails per minute. If you want to increase the
emailing rate to 30 per minute, reduce the timeout value to 2.
When the process runs out of files, the batch file simply goes away.
You can a) trigger the batch file manually, b) schedule it to run every N minutes, or
c) call it in Visual CUT using the following command line argument:
"After_Success_Batch:Whole>>c:\Batch\Move_emls_ from_Delayed_to_Outgoing.bat"
To avoid concurrent running instances of the batch file, here is a version that writes a
FilesBeingMoved text file at the start of the process and deletes it at the end.
When the batch starts, it aborts if the file already exists.
----------------------------------------
IF EXIST "c:\Visual CUT\smtpQ\Delayed\FilesBeingMoved.txt" (
REM Do nothing
) ELSE (
@ECHO OFF
REM Create lock file
ECHO > "c:\Visual CUT\smtpQ\Delayed\FilesBeingMoved.txt"
for %%i in ("c:\Visual CUT\smtpQ\Delayed\*.eml") do (
Move "%%i" "c:\Visual CUT\smtpQ\Outgoing\"
timeout /t 10 /nobreak
)
REM Delete the lock file afterwards
DEL "c:\Visual CUT\smtpQ\Delayed\FilesBeingMoved.txt"
)
----------------------------------------
Pdf metadata - add, remove, update PDF metadata in C#.net, ASP.NET, MVC, Ajax, WinForms, WPFAllow C# Developers to Read, Add, Edit, Update and Delete PDF Metadata
pdf metadata editor online; pdf metadata Pdf metadata - VB.NET PDF metadata library: add, remove, update PDF metadata in vb.net, ASP.NET, MVC, Ajax, WinForms, WPFEnable VB.NET Users to Read, Write, Edit, Delete and Update PDF Document Metadata
pdf metadata viewer; batch update pdf metadata
27
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 52
Generating Twitter or SMS Messages via Email
You can send SMS messages from Visual CUT using email. You just need to know the number
and the carrier of the recipient. See detail at http://www.makeuseof.com/tag/email-to-sms/
In order to send tweets via Visual CUT, you can send email messages via a service that acts as a
bridge to Twitter. The text below was provided by a Systems Analyst at a Fire Department that
asked to remain nameless:
Our Fire Department uses Visual CUT to send various tweets via Twitter based on
specific call for service data. Visual CUT is set up via a scheduled task to run every
y
minute and looks for any newly-created records qualifying for tweeting. If a qualified
ied
record is found, Visual CUT sends an email to a specified email address that
automatically posts to twitter. This is a free service provided by Twitter Counter
ter
(http://twittercounter.com/pages/twittermail/).
As part of the same process, Visual CUT also exports some data fields via ODBC to
another table. This keeps track of which incidents were tweeted about. The same
e
process also uses that table to determine if a previously tweeted incident has been
cleared. This allows us to also use Visual CUT to send an all clear Twitter message.
We don’t tweet out every incident, as many of our incidents are medical.
We use a
separate Visual CUT process at the end each month to send a count of the total number
of incidents. This way our residents are aware of a total volume as opposed to just a
couple of calls a day that get tweeted about.
How to C#: Modify Image Metadata (tag) edit, C#.NET PDF pages extract, copy, paste, C#.NET rotate PDF pages, C#.NET search text in PDF, C#.NET edit PDF bookmark, C#.NET edit PDF metadata, C#.NET
pdf metadata extract; bulk edit pdf metadata
9
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 53
‘Start Process’ button and Progress Window
This button simply starts the process of Bursting, Exporting, and Emailing as specified by the
options above. During the process, a window traces the progress of the operation:
While in progress, instead of a Close button, you will see a STOP button allowing you to abort
the operation.
Tip: at the end of a process, if you double-click the export file name field
(in the export/email tab) , Visual CUT will open that folder in file explorer for you.
26
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 54
Scheduling Area
Scheduling String
The scheduling string text provides the necessary command line to trigger Visual CUT
processing for this report. The button to the right allows you to select or create a batch file to
hold this command line.
Arguments
The argument field allows you to specify and save extra command line arguments. You should
review the table of command line arguments at the end of this user manual. They allow you to
tackle many use scenarios that are impossible to address with other tools. By specifying the
arguments in this field, you remove the need to specify them in the command line. Also, this
allows you to take advantage of the power of these argument even during interactive processing.
The button to the right opens a text editor that makes it easier to review/edit the arguments.
Scheduled Printing
This area also shows what printer is currently associated with the report. Visual CUT sends
reports scheduled for printing to that printer. Within Crystal, you can associate each report with a
different printer using the File, Printer
Setup…
dialog. As explained later, you can override the
printer destination when scheduling or invoking Visual CUT via command lines.
The number of copies option can be dynamic (drag & drop a formula into that option) or static
(enter a value). You can also specify the collation option.
Note that these printing options apply only for scheduled (command line) invocations of Visual
CUT. if you want the report to be printed during an interactive session, you should simply print
it from the Preview tab).
How to C#: Basic SDK Concept of XDoc.PDF for .NET XDoc.PDF for .NET supports editing PDF document metadata, like Title, Subject, Author, Creator, Producer, Keywords, Created Date, and Last Modified Date.
online pdf metadata viewer; pdf metadata viewer online
23
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 55
Scheduling (new approach)
Version 6.9002 has an integrated task scheduling GUI (Windows Scheduler used as engine).
See 9-minute video demo.
Note: to disable this functionality, see Restricting User Actions.
Management & Monitoring of Scheduled Tasks
A button on the first tab launces a window for managing & monitoring scheduled tasks.
The targeted tasks are those that call batch files, Visual CUT or DataLink Viewer.
Compared to the Windows Task Scheduler dialog, this window has several key advantages:
Task status is updated automatically without needing to click Refresh (and is color-coded)
Mass update of login information for all tasks that belong to a specified user.
Suspend/Resume all enabled tasks (leaving Disabled Tasks untouched)
Easily update batch file tasks to avoid failure (insert missing Start-in folder) or
to run in an invisible window .
Rename, Clone, Edit, Export & Import tasks.
Arrange the grid: sorting, grouping, filtering, visible columns...
17
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 56
Adding Scheduled Tasks
In the Export/Email tab, a button to the right of the scheduling string launches a dialog that
allows:
a) Viewing and modifications of the command line
b) Inserting the command line into a new/existing batch file
c) Creating a scheduled task for the command line or the batch file
Inserting multiple command lines into a single batch file allows a single scheduled task to trigger
multiple processes. Consider naming the batch file to reflect the schedule logic (for example,
"Morning Reports.cmd" or "Every Hour.bat"). If you are scheduling a new batch file, turn on the
'& Schedule' checkbox. You would be prompted to set the task trigger options
(see image:
http://screencast.com/t/mlhOtvZod
). Then, the task is automatically created with all
other options set to recommended defaults. You may then use the task management &
monitoring window to review/edit those options.
15
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 57
DataLink Viewer Requirement
To enable the integrated scheduler, DataLink Viewer 2011 must be installed on the same
machine.
Free DataLink Viewer License
A free license of DataLink Viewer 2011 is available upon request if the use is only for
integration with Visual CUT.
Set DataLink Viewer to Run as Administrator
In File explorer, right-click "C:\Program Files (x86)\Millet Software\DataLink Viewer
2011\DataLink_Viewer_2011.exe"
Select 'Properties', 'Compatibility' Click the button at the bottom to 'Change Settings for All
Users' and turn on the option to 'Run this program as an administrator'
See image:
http://screencast.com/t/1ySxjQBuv8
20
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 58
Scheduling (old approach)
By clicking on the Save button, all report processing options, parameters, and logon information
(encrypted) are saved for later use by Visual CUT. This allows the application to process any
report in unattended mode by simply invoking the executable (Visual CUT.exe) with a proper
command line (using a *.Bat file, a RUN command, a desktop shortcut, or a call from any other
application).
The recommended, and most typical, approach is to
1) place the command line in a batch (.bat) file, and
2) call the batch file from the Windows Task Scheduler
Place the command line in a batch (.bat) file
The "Scheduling String" in Area 5 provides you with the command line needed to run a report
via Visual CUT in unattended mode. You may copy and paste that command line into a batch
file but a better approach is to click the button to the right of the scheduling string.
This prompts you to enter a new batch file name or select an existing batch file.
The command line is then inserted into the new/existing batch file and you can elect to
immediately view/edit the batch file inside Notepad.
You can test the process by double-clicking the batch file. This should trigger processing of the
report in Visual CUT.
22
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 59
Command Line Wizard (Parameters & Skip Zero Records)
If the report has parameters, the button to the right of the scheduling string starts a dialog
with options to include parameters in the initial command line. If the report has Date or
DateTime parameters, the dialog defaults to including them. You can then edit the static values
in Notepad, and replace them with Date Constants such as Yesterday, Start_Month_Minus_1,
etc. (see Date Constants section in the user manual).
If you select ‘ALL parameters’
from the drop-down, all active parameters are included.
Note: you should include parameter arguments only if you need to override the parameter
values saved when you previewed the report in Visual CUT.
(Parm1 is not included in the case below because it is an unused parameter):
If you uncheck the ‘Skip 0 Records’ option, the execute flag in the command line changes
from
-e
to
-E
. With the default of
-e
Visual CUT skips processing if the main report has zero
records (allowing easy implementation of exception reports and email alerts).
17
©2002-2016, Ido Millet, ido@MilletSoftware.com
Page 60
Processing of Multiple Reports in a Single Batch (.BAT) File
You can use several command lines inside a single batch (.bat) file to trigger processing
(manually or via scheduling) of multiple reports. For example, double-clicking (or scheduling)
the following Ido.bat file would trigger processing, one after the other, of Report1.rpt and then
Report2.rpt:
Call the Batch file from Windows Task Scheduler
While there are many commercial schedulers, the free Windows Task Scheduler (already
installed as part of your Windows operating system) is capable of handling most scheduling
requirements.
Here’s how you can go about scheduling
a batch file:
1. In Windows, click on Start, Settings, Control Panel, Scheduled Tasks
2. Double-Click Add Scheduled Task
3. In the Scheduled Task Wizard, click the Browse button,
and select the Batch file containing the Visual CUT command line(s).
Documents you may be interested
Documents you may be interested