Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Sage MAS Partner
TomTarget
Posts: 1,752
Registered: 11-02-2008
0

Running SMI and targeting a temporary work table

First off,  I know I need to use the connector.

 

My goal is be able to access the work file for the inventory turnover report (so we can get the complex inventory turn calculations) and then add other information.   Currently doing this with a crystal report,  but would love to be able to do it with SMI.

 

I could see running the inventory turn report and holding it open and then run SMI against it,  however the work file name would be different every time.

 

Any ideas of how one might configure so that this could be accomplished?

Thomas H. Rogers, C.P.A.
Target System Technology, Inc. - Spokane, WA -
The best solution often comes not from answering the question asked, but understanding WHY the question was asked.
Sage MAS Partner
accountingnerd
Posts: 64
Registered: 10-22-2010
0

Re: Running SMI and targeting a temporary work table

Ok. I've been pondering on this one for a while, and while I'm not sure how to do this yet, here's what I have come up with:

 

In the connector, create a container that is based on a SQL statement, but put a pass-through variable name in the statement. Here's what I did:

 

SELECT * FROM @TABLENAME@

Next, add the PTV (in my case @TABLENAME@) as an expression. Then, do the data column selection, and when SMI asks you to operate in the "Default Value Mode" (my words, not theirs), say no, and then you'll be prompted for the Table Name. Use the work table name, and then it will let you choose the columns from the table for your container.

 

As far as getting the right table name to SMI at run time, I'd start exploring with the Scheduler command, because that will let you send parameters through a command line. I believe you can even create a hyperlink in the Crystal report that will run an EXE, so that you could run the Crystal Report in preview mode, and then click the hyperlink to run the SMI report. The problem I'm running into is determining which table the Crystal Report is based on. Perhaps there's a Crystal Expert who can tell us how to do that.

 

Here's the command line that SMI generated for my report:

 

"C:\Program Files (x86)\Sage Software\SMI\BICore.exe" -RU129 -P{PARAM:TableName}{/PARAM:TableName}[_]INSERT_TABLE_HERE[_]TableName -INO_USER -E -J{TENANT_CODE=ABC}{DBTYPE=115}{_privateDBSERVER=C:\Sage Software\MAS 90\Version4.4\MAS90}{_privateDBCATALOG=ABC}{_privateDBUSER=ajclark}{_privateDBPASSWORD=B_L_A_N_K_P_A_S_S_W_O_R_D}{_publicLANGCODE=en}

Assuming that your report was the same as mine, the only thing you'd have to change is the INSERT_TABLE_HERE.

 

I hope that helps. Good luck!

Aaron J. Clark, CPA, CITP
SGS Technology Group
Our Blog
If you don't like change, you're going to like irrelevance even less.
Sage MAS Partner
TomTarget
Posts: 1,752
Registered: 11-02-2008
0

Re: Running SMI and targeting a temporary work table

Wow!  You did your homework!

 

I could probably do it,   but  I think it would probably be beyond the end users comfort zone unless it could be better automated.

 

Thanks for the input.

Thomas H. Rogers, C.P.A.
Target System Technology, Inc. - Spokane, WA -
The best solution often comes not from answering the question asked, but understanding WHY the question was asked.
Sage MAS Partner
accountingnerd
Posts: 64
Registered: 10-22-2010
0

Re: Running SMI and targeting a temporary work table

I'm sure this could be automated -- I just don't have the Crystal expertise to know how to find the names of the tables being queried.

 

Aaron

Aaron J. Clark, CPA, CITP
SGS Technology Group
Our Blog
If you don't like change, you're going to like irrelevance even less.