Generating Reports

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
IrishManInBV
Posts: 5
Joined: Thu Jul 24, 2008 5:32 am

Generating Reports

Post by IrishManInBV » Wed Nov 11, 2009 1:48 pm

Is there a way to generate reports from Vault, so that I can see the history at the folder level or at the file level or both?

if not, then is it possible to get some information on the database structure where things are stored in the database, so I can write a report module to pull this information out.

paulroub
Posts: 29
Joined: Mon Nov 19, 2007 2:49 pm
Location: Champaign, IL
Contact:

Re: Generating Reports

Post by paulroub » Wed Nov 11, 2009 2:39 pm

The vault command-line client's HISTORY command will give you an XML report on the history of a file or folder. If this isn't sufficient, I'd recommend using the Client API (available from the Vault downloads page) instead of trying to go directly to the database.

The database structures are not documented at the user level, nor are they in any way guaranteed not to change. The API is a documented, predictable target. The full command line client source is included for example purposes.

-paul
Paul Roub
SourceGear

IrishManInBV
Posts: 5
Joined: Thu Jul 24, 2008 5:32 am

Re: Generating Reports

Post by IrishManInBV » Wed Nov 11, 2009 7:24 pm

where is the documentation on the api, i didn't see any when i downloaded the file and not seeing any documentation.
you mentioned the command line, and I was wondering if it was possible to set this up so that it does it recursively with the files that are in the selected folder or on a file level.

paulroub
Posts: 29
Joined: Mon Nov 19, 2007 2:49 pm
Location: Champaign, IL
Contact:

Re: Generating Reports

Post by paulroub » Wed Nov 11, 2009 9:17 pm

See VaultClientIntegrationLib.chm in the Client API zip file.
Paul Roub
SourceGear

paulroub
Posts: 29
Joined: Mon Nov 19, 2007 2:49 pm
Location: Champaign, IL
Contact:

Re: Generating Reports

Post by paulroub » Wed Nov 11, 2009 9:22 pm

As far as the command line client, it will list the history of whichever object you specify. If you give it the name of a Vault folder, it will recursively list the history of that folder and its contents. Given a file, it will list just that file's history.
Paul Roub
SourceGear

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Generating Reports

Post by Beth » Thu Nov 12, 2009 6:07 pm

I wanted to jump in quick just to mention a work-around I've helped a few users with. If you run a history query, you can save it as a .csv file. A .csv file can be imported into Excel and then manipulated a variety of ways to produce useful reports.
Beth Kieler
SourceGear Technical Support

IrishManInBV
Posts: 5
Joined: Thu Jul 24, 2008 5:32 am

Re: Generating Reports

Post by IrishManInBV » Thu Nov 12, 2009 8:55 pm

thanks for the quick replies, was a little disappointed to see that all of the code for the library is c#, nothing against c# just that I am more familiar with vb.net. Still, the documentation on the command line looks okay, so I should be able to get what I want.

Beth,
you mentioned a history query, not sure where that is, still i will search around and see what it is. Otherwise, thanks again for your help.

paulroub
Posts: 29
Joined: Mon Nov 19, 2007 2:49 pm
Location: Champaign, IL
Contact:

Re: Generating Reports

Post by paulroub » Thu Nov 12, 2009 9:02 pm

The library works just fine from any .NET language -- I've even blogged about using it from PowerShell here and here.
Paul Roub
SourceGear

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Generating Reports

Post by Beth » Fri Nov 13, 2009 4:51 pm

you mentioned a history query, not sure where that is, still i will search around and see what it is.
The history query is found in the Vault GUI client. You will select either $ or a folder you want to see history on, then select View - Show History. There are a number of options you can choose from the tabs in the dialog window, then you click OK. Once the history shows, go to Query - Save Results As. That is where you can save it as a .csv file.
Beth Kieler
SourceGear Technical Support

Post Reply