Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, June 19, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Printing Reports without user interaction
Richard
Posts: 33
 
Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 May 07 11:40 AM
fiogf49gjkf0d
Is there a way for SLX to print a given report at a certain time without user interaction?
[Reply][Quote]
Nick McLean
Posts: 50
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 May 07 9:28 AM
fiogf49gjkf0d
Hi Richard

If you have a sync server, you could add an agent via the administrator to do it or the way I usually do it is to use Knowledgesync to produce a report and print it via vbscript.

Nick
[Reply][Quote]
Richard
Posts: 33
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 May 07 10:06 AM
fiogf49gjkf0d
Well, I don't have a sych server, but I do have knowledgesync, so let's follow that thought. How do you print the report that KS would run? Would this be an even action in KS?
[Reply][Quote]
Nick McLean
Posts: 50
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 May 07 10:20 AM
fiogf49gjkf0d
first step - create your crystal report using the ksync odbc connection and create a report definition in ksync to it

second - create a new basic script kind like this or better
strreport = KSGetPackage("Report Files")

Set word6 = CreateObject("Word.Basic")
word6.FileNewDefault

Word6.FileOpen streport

Word6.FilePrint

Word6.FileExit(2)
Set Word6 = Nothing


third - create a scheduled report pointing at your report exporting it as rtf with a basic script action pointing to your new script.

Should now print for you. Its not exactly elegant, but it is effective

Nick

[Reply][Quote]
Richard
Posts: 33
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 May 07 12:44 PM
fiogf49gjkf0d
Thanks, Nick. I'll give it a try.
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 May 07 12:39 PM
fiogf49gjkf0d
Quote:
Originally posted by Richard

Well, I don't have a sych server, but I do have knowledgesync, so let's follow that thought. How do you print the report that KS would run? Would this be an even action in KS?


You do NOT need a syncserver to use the "Agent" in SalesLogix. many of us (partners) have been using the agent for YEARS to do these simple tasks w/out adding 3rd party products.

I just got back from Insights.. so a bit "strung out" but will post the exact steps on how to use the Agent as a "job runner"... VERY easy!
--
rjl
[Reply][Quote]
Richard
Posts: 33
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 May 07 2:02 PM
fiogf49gjkf0d
I appreciate any insight, Bob. Thanks
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 May 07 4:25 PM
fiogf49gjkf0d
Quote:
Originally posted by Richard

Is there a way for SLX to print a given report at a certain time without user interaction?


Just to throw another idea in the mix, I use SQL Reporting Services for this type of stuff. This kind of thing works really well with SSRS as it's built right in. You can have a report automatically sent out to user(s) in about any format (PDF, Excel, etc) based on a schedule, or even have it be data driven. Users can visit the report portal and easily subscribe or unsubscribe as needed (even change their delivery and schedule options). You don't need to write a line of code. SQL reports are brain dead easy to build too, much easier than Crystal IMO. You just focus on the query, once it delivers the data you need you just drop the data elements on the report however you want it to look.

Anyway, IMO it is a great route for this type of thing and a far better reporting solution than Crystal.

-Ryan
[Reply][Quote]
Richard
Posts: 33
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 May 07 3:47 PM
fiogf49gjkf0d
By the by, where and how can I learn more about the agent in Saleslogix?
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 May 07 3:46 PM
fiogf49gjkf0d
Quote:
Originally posted by Richard

By the by, where and how can I learn more about the agent in Saleslogix?


Richard,
Here's some "agentrunner" info:

'HowTo - Use the Agent to run scheduled jobs

Here's how to use the "Agent" to run scheduled jobs w/out the sync server:

Background:
The "Agent" jobs are normally run by the Sync Server.
When a job is in setup in the "que" using the (WG)Admin and scheduled for a particular time,
the sync server checks for "queued" agent jobs after a sync run.
If there are any scheduled they are then launched.
Now if one does not have a sync server setup (and if you have no remotes that would be true)
it is possible to use the AgentRunner as a job scheduler.
In order to do so, you need to know a little bit about how the "Agent" subsystem works.

Working forward:
Setup an Agent in the (WG)Admin:
Systems->Agents
Insert->Agent or RMB Add Agent
Fill in:
Name: some Unique name for this Agent
Select User (usually administrator)
Email (normal email addresses or list separated by the ; character)
Action: (ex: CRW-EMailReport-As-PDF)
Argument: Select the report you want to run/email
Description: (Optional but recommended - EX: Special agent)
NOTE: Do NOT select anything else - not even the Active checkbox or schedule
Click OK and Save
We need to know the ID of the agent - so locate it by:
SELECT AGENTID
FROM sysdba.AGENTS
WHERE NAME = 'some Unique name for this Agent'
At this point we have two choices as to how we proceed so I'll describe both:

OPTION A:
Create a .CMD file and put the following in the file:
REM
REM My Agentrunner
REM
"C:\Program Files\SalesLogix\Agentrunner.exe" SalesLogixDbAlias AGENTID
Where:
SalesLogixDBAlias is the Alias for your SalesLogix db (EX:SalesLogix")
AGENTID is the ID of the AGENT Job (EX: Q6UJ9A001AJL)
Save the file in a location of your choice
Test the job by doing a Start-Run (-Browse to the cmd file) OK
- the job should run - if not, re-check your steps
Using the Windows Task Scheduler, Setup a Scheduled task to run the cmd file above

OPTION B:
Create a file and name it "TheAgents.que" in the SalesLogix Program Directory (using Notepad or some other text editor) and
put the following in the file:
Agentrunner SalesLogixDbAlias AGENTID
Where:
SalesLogixDBAlias is the Alias for your SalesLogix db (EX:SAlesLogix")
AGENTID is the ID of the AGENT Job (EX: Q6UJ9A001AJL)
Save the file in a location of your choice
Test the job by doing a Start-Run (-Browse to AgentQueue.exe in the SalesLogix Directory) OK
- the job should run - if not, re-check your steps
Using the Windows Task Scheduler, Setup a Scheduled task to run the following:
"C:\Program Files\SalesLogix\AgentQueue.exe"

Either method will let you run multiple jobs.
OPTION A:
Same Time (Sequentially): Add more lines to the .CMD file for additional jobs
Different Times: Create more .CMD file(s) for each job and setup Task Schedules
OPTION B:
Same Time (Sequentially): Add more lines to the "TheAgents.que" file
Different Times: Not possible with this option.



The best part.. it's FREE and no 3rd party tools/software needed!
--
rjl
[Reply][Quote]
Richard
Posts: 33
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 May 07 4:22 PM
fiogf49gjkf0d
Thank you Bob, this worked really well.

Although I like Ryan's SQL method, I liked this one better because I can use existing reports which I had to have anyway.
[Reply][Quote]
Richard
Posts: 33
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Jul 07 10:23 PM
Here's an update...

Your method worked perfectly on one system.

Sadly, on another system using either of these methods will bring up the SLX login and wait for a response. Then the script will give an error from the SLX Database Support script ("Variable is undefined 'Application') at line 26...). That same script runs fine when run from a menu in SLX.
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Printing Reports without user interactionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Jul 07 6:54 AM
The "Application" object (nor are other SalesLogix "objects" - Activity, etc) is not exposed to the runtime environment of the Agent. This is well known.

A common error is to try to use the "connection" object from the Slx DB Support include file. You have to write your own replacement.

--
rjl
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/19/2025 8:29:06 AM