Well this topic is dead, or at least it will be after this post.
I wrote about this topic just prior to The Crystal Report Writing class. During the class the question was asked
"What about using the Execute SQL tool in the SalesLogix Administrator for syncing out SQL views to remotes?"
As a development team we have looked at this before and always found that it just did not work. But we had not tested it in quite a while so we decided to try it again, and this time it worked.
So here for the final time as a topic on the Report Writing blog is the "Best way to Sync SQL views out to Remotes".
To accomplish this we need a SQL view. A SQL view for those who do not know is an excellent way of organizing data for a report. When your view is complete the view will act like a database table. The biggest issue with using SQL views in reports is the Remote database issue. Just creating a view in SQL does not synchronize it out to the SalesLogix Remote Databases.
Here is a simple SQL selected statement that counts records related to an Account.
SELECT a.ACCOUNTID, a.ACCOUNT, COUNT(c.CONTACTID) AS ContactCount,
(SELECT COUNT(HISTORYID) AS Expr1 FROM sysdba.HISTORY WHERE (ACCOUNTID = a.ACCOUNTID)) AS HistoryCount,
(SELECT COUNT(ACTIVITYID) AS Expr1 FROM sysdba.ACTIVITY WHERE (ACCOUNTID = a.ACCOUNTID)) AS ActivityCount,
(SELECT COUNT(OPPORTUNITYID) AS Expr1 FROM sysdba.OPPORTUNITY WHERE (ACCOUNTID = a.ACCOUNTID)) AS OpportunityCount,
(SELECT COUNT(TICKETID) AS Expr1 FROM sysdba.TICKET WHERE (ACCOUNTID = a.ACCOUNTID)) AS TicketCount
FROM sysdba.ACCOUNT AS a LEFT OUTER JOIN
sysdba.CONTACT AS c ON a.ACCOUNTID = c.ACCOUNTID
GROUP BY a.ACCOUNTID, a.ACCOUNT
To make it a view we add the text of:
CREATE VIEW sysdba.vACCOUNCOUNTs
AS
This is entered right above the select statement.
When you combine the view with other tables we can get some excellent roll up information.

This data can even be used with the group builder in SalesLogix

To get this view synchronized out to the remotes, log into the SalesLogix Administrator.
Once the interface is open use the Tools> Execute SQL menu selection to open the Execute SQL tool.

When the Execute SQL interface opens, right click and select Add from the list that appears.

When the Edit SQL view appears copy in the SQL View you wish to synchronize out.

When you are ready, select OK. You are returned to the Execute SQL interface.
Next we must identify the users who will receive this view. On the lower half of the Execute SQL interface we see a list of names on the Left, find and highlight the name of the people the view should be synchronized out to and select the right pointing arrow.

Once all of the target users are selected, click on the "Execute" button on the upper right side of the view.

You will receive the following message box. Simply click on the "Yes" button....

....and the SQL Script will run.

Select OK and close out of the SalesLogix Administrator.
The next time the Sync Serve Synchronizes it will pick up the view and ship it off to your selected users.
A lot easier then writing all of that script. God Bless.
Geo