Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: Dataset to HTML table, written to a text file
Topic Summary:
Created On: 03/14/2014 01:56 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 03/14/2014 01:56 AM
User is offline View Users Profile Print this message

Author Icon
GavinDuxbury
Journeyman (50-99)

Posts: 53
Joined: 11/25/2008

Hi

Something I build a lot for our customers (in various guises). Often this is on request via an automated email (read by another AM task), or I add it in at the bottom of a large processing task as a confirmation of what was done in the ERP system.

Using a SQL query I pull out data to a dataset.
Write to a Text file and create a header step and add in the HTML Table header
Loop through Dataset
Write each line to Text file
End Loop
Write in footer (close off HTML tags)

An Advanced property would be the ability to add Text above and below the table. This created Text file would then be attached to an email as HTML and sent off to user.

I use SQL Server Reporting services a lot, but this is often a lot easier for users, especially if they are on the road. They send a quick email off and within 5 minutes they receive a reply with all the data they wanted.




Task Steps: (Right click, Select All, Copy to copy to the clipboard. Steps can then be pasted into the AutoMate Task Builder)
 03/14/2014 02:51 AM
User is offline View Users Profile Print this message

Author Icon
JeanDelfosse
Supreme Guru (1000+)

Posts: 8883
Joined: 03/30/2005

For those interested, see an interim solution based on a basic script function in this thread

-------------------------
Jean Delfosse - Automate Beta Tester
Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4
 03/14/2014 12:58 PM
User is offline View Users Profile Print this message

Author Icon
AlexLalvani
Journeyman (50-99)

Posts: 55
Joined: 02/14/2014

We would like exactly the same thing

 03/17/2014 05:20 PM
User is offline View Users Profile Print this message

Author Icon
KenMorley
Student (5-19 posts)

Posts: 15
Joined: 10/05/2008

Hi Gavin,

I tried your solution above and it works great!!!

Thanks a lot for all your help, I will now spend some time testing Jean's task, but let's hope the guys can look at an automated action at some time in the future.

Thanks again,

Ken
 03/17/2014 10:55 PM
User is offline View Users Profile Print this message

Author Icon
GavinDuxbury
Journeyman (50-99)

Posts: 53
Joined: 11/25/2008

My pleasure Ken. I didn't stick the code in expecting it to be used, but included it as an example of what I do. For instance the HTML table formatting wasn't there - needs visible column borders at times to make it easier to read. I haven't tried Jean's solution yet, but planning on giving it a go when I have to build another dataset to email block of code.
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 917 guests browsing this forum, which makes a total of 917 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog