You are on page 1of 6

Solution! Re: AssetCenter 3.

6: automating a data export from a view


Post Options
?03-02-2007 01:24 PM
I'm not sure there is a way to export from a view other than manually exporting
the list in the GUI.
You could create a Action Script in AC that contains a query to build a delimite
d string with all the fields and records you want to export and setup a workflow
to execute the script once a month. This is not very pretty and depending on th
e amount of data you are exporting it might not work very well.
The easier way would be to create a Connect-It scenario to export the data to a
delimited text file and schedule the Connect-It scenario to run once a month.
The only issue with these solutions, is if the user updates the view you have to
update the script or scenario file.
Reply
1
Valued Contributor
Jeanna Lampart
Valued Contributor
Jeanna Lampart
Posts: 108
Registered:
?08-17-2006
Message 3 of 11
(422 Views)
Re: AssetCenter 3.6: automating a data export from a view
Post Options
?03-05-2007 07:16 AM
I've seen customers use a batch file and AC Export to do this as well. You can b
uild the scx file in AC export and then use a batch file and task scheduler to e
xecute it.
Reply
1
Debbie Earley, PMP
Frequent Advisor
Debbie Earley, PMP
Posts: 38
Registered:
?02-26-2007
Message 4 of 11
(422 Views)
Re: AssetCenter 3.6: automating a data export from a view
Post Options
?03-05-2007 07:38 AM
Jeanna,
Are there any special format considerations for the batch file? I have only play
ed with AC Export a couple of times.
I am currently attempting Bryce's suggestions to see which will work the best fo
r us but I thought I would try your idea too.
Many thanks to both Bryce and Jeanna for their ideas - it is greatly appreciated
!
Debbie
Reply

0
Honored Contributor
Bryce Hull
Honored Contributor
Bryce Hull
Posts: 381
Registered:
?08-17-2006
Message 5 of 11
(422 Views)
Re: AssetCenter 3.6: automating a data export from a view
Post Options
?03-05-2007 12:19 PM
Debbie,
Here is help information on using AC Export in a command line. (This is from AC
4.4 Help, 3.6 is similar, if you search the help for "amexpl" it should give you
similar results):
Executing an export script from DOS
How it works
In order to execute the DOS software "online", you must first create an export s
cript using AssetCenter Export.
You can execute, either manually or automatically (with a batch file, for exampl
e), an export command using the amexp.exe program in the bin sub-folder of the A
ssetCenter installation folder.
Syntax
amexpl [-verbose] [-?|h|H] -script:<script>
-cnx: [-login:]
[-password:]
-verbose: displays messages during the export process.
-?, -h or -H: displays help messages.
-script: path and name of the export file to execute.
-cnx: name of the connection to the AssetCenter database (as it appears in the F
ile/ Manage connections menu item).
-login: login name of the database administrator ("Admin" or a user with adminis
trative rights).
-password: password for the login.
Strings between <> cannot include spaces.
For example:
amexpl32 -verbose -script:ibmassets.scx -cnx:GeneralDatabse -login:Gerald -passw
ord:PAssword
Reply
1
Valued Contributor
Valued Contributor
Jeanna Lampart
Posts: 108
Registered:

Jeanna Lampart

?08-17-2006
Message 6 of 11
(422 Views)
Re: AssetCenter 3.6: automating a data export from a view
Post Options
?03-05-2007 12:53 PM
Looks like Bryce replied with the syntax for you.
Your .bat file would have the path to your amexpl32 file and then the code.
i.e.
C:\Program Files\Peregrine\AssetCenter\bin32
amexpl32 -verbose -script:ibmassets.scx -cnx:GeneralDatabse -login:Gerald -passw
ord:PAssword
Within AC Export you can change the formatting to comma separated and save the f
ile as a .csv file which is easily opened in Excel. Just be sure to enclose in q
uotes if you have values in ac that have comma's within them.
Reply
1
Honored Contributor
ed k.
Honored Contributor
ed k.
Posts: 605
Registered:
?03-08-2007
Message 7 of 11
(422 Views)
Re: AssetCenter 3.6: automating a data export from a view
Post Options
?03-09-2007 08:57 AM
Hi Debbie and All our friends. In our project we have automated many different w
eekly / monthly / quarterly / annual reports out of AC to Excel / Access / Txt /
Other via Connect-It gateways buy assigning them via Connect-It Service Console
to run each individual report-extract as a separate Service on the Server. Best
Regards, Ed K.
"If you see a house, you're convinced that there is a builder. If you see a garm
ent, you're convinced that there is a tailor. If you see a universe, you are con
vinced that Someone created it." (R. Akiva)
Reply
0
Honored Contributor
ed k.
Honored Contributor
ed k.
Posts: 605
Registered:
?03-08-2007
Message 8 of 11
(422 Views)
Re: AssetCenter 3.6: automating a data export from a view
Post Options
?03-14-2007 06:18 AM
Hi to ALL. One more trick with Excel and AC
In case if you are not using Connect-It with Service Console tool or not familia
r how to use it, please check next steps for automating reports in Excel format
out of AC:

Step 1. Save your monthly report in Excel format on a shared drive


Step 2. By using AC EXPORT tool, prepare select statement with fields and condit
ions like in your AC view and from PREVIEW tab of Query on table in AC Export co
py entire SQL Select statement like [SELECT A1.AssetTag, A1.SerialNo, A1.Status
FROM amAsset A1 WHERE A1.SerialNo is NOT NULL AND A1.Status = 'In Stock']
Step 3. In your Excel report from DATA menu select IMPORT EXTERNAL DATA submenu
and there click on NEW DATABASE QUERY submenu. From CHOOSE DATA SOURCE dialog bo
x select AssetCenter Databases* and at the bottom of this dialog box uncheck opt
ion USE THE QUERY WIZARD Click OK.
Step 4. From next dialog box CONNECTION TO DATABASE provide your AC login ID and
password info and click OPEN.
Step 5. In the ADD TABLES dialog box of MICROSOFT QUERY click CLOSE
Step 6. From the toolbar of MS QUERY click on SQL and paste there your SQL state
ment from the PREVIEW tab of AC Export tool. Click OK.
Step 7. Click on OK in the message box: SQL QUERY CAN T BE REPRESENTED GRAPHICALL
Y
Step 8. You will see QUERY FROM AC DB window with criteria, fields and data from
AC at the bottom of the window. Save this query like: QUERY 001 FROM AC DB.dqy
and from the toolbar click on EXIT MS QUERY button.
Step 9. In the IMPORT DATA dialog box select option EXISTING WORKSHEET with opti
on: =$A$2 and click OK. Save this report and each time you open it and click on
REFRESH ALL button in the toolbar, you will see up to the minute data from AC li
ke in your view..
Best Regards, Ed K.
"If you see a house, you're convinced that there is a builder. If you see a garm
ent, you're convinced that there is a tailor. If you see a universe, you are con
vinced that Someone created it." (R. Akiva)
Reply
1
Debbie Earley, PMP
Frequent Advisor
Debbie Earley, PMP
Posts: 38
Registered:
?02-26-2007
Message 9 of 11
(422 Views)
Re: AssetCenter 3.6: automating a data export from a view
Post Options
?03-14-2007 06:40 AM
Thanks Ed - your post was very helpful!
I had completely forgotten about pivot tables / external data options in Excel.
I also really appreciate the step-by-step instructions. I like this solution for
the simple reason it allows my users to update their information whenever they
want it.
Your post also reminded me that Pass-through SQL queries in Access will also giv
e the user some of the same information and I can grant read-only access to the
user to be able to run it.

Thanks again for the help!


Debbie
Reply
0
Honored Contributor
Bryce Hull
Honored Contributor
Bryce Hull
Posts: 381
Registered:
?08-17-2006
Message 10 of 11
(422 Views)
Re: AssetCenter 3.6: automating a data export from a view
Post Options
?03-20-2007 01:43 PM
Debbie,
If you use Access, you can use the AssetCenter ODBC driver that gets installed w
ith AC. This will give them an AC login prompt when they open an AC linked table
in Access and should also take care of the read only logic.
Bryce
Reply
1
Debbie Earley, PMP
Frequent Advisor
Debbie Earley, PMP
Posts: 38
Registered:
?02-26-2007
Message 11 of 11
(421 Views)
Re: AssetCenter 3.6: automating a data export from a view
Post Options
?03-21-2007 12:34 AM
Bryce,
Good point! I am in the process of creating an Access query for a different user
who found out what I have been working on and wants to be able to run their que
ry on an as-needed basis. I will create a database to store multiple pass-throug
h queries and place it in a shared directory for their whole organization. Based
on their AC rights, they should be able to access their own data without saving
a password in the database - thanks.
A different group of users prefer Excel so I am using Ed's suggestion for them.
Our metrics group wants the automated export so I will attempt to schedule a few
AC Export scripts to fill that need. It seems I opened the flood gate and am no
w scrambling to satisfy multiple automated data queries.
Thanks,
Debbie
Reply
0
Powered by Lithium
The opinions expressed above are the personal opinions of the authors, not of HP
. By using this site, you accept the Terms of Use and Rules of Participation.

End content
Open Country Selector Dialog United States
About HP
Contact us
Newsroom
Investor relations
Living Progress
Accessibility
Events
HP Labs
Jobs
Social Media
Consumer support forum
Enterprise business community
Developer community
Corporate blogs
HP on FacebookHP on LinkedInHP on Twitter
HP Partners
Become a partner
Find a reseller
PartnerOne
Customer Support
Power cord replacement
Download drivers
Register your product
HP replacement parts
Authorized service providers
Training & certification
Product recycling
Home|Email sign-up|Site map|Privacy|Cookies & ad choices|Terms of use|Recalls
2015 Hewlett-Packard Development Company, L.P.
View mobile site

You might also like