Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jep9816

Pages: [1]
1
As a Followup,

I installed EA 7.5 and rebuilt my report generation tool.

The project.RunReport() method works but the project.RunHTMLReport() still does not completely work.

I can see that an Images sub-directory is being created in my target directory as well as intermediate temp files.

However, at the end of the report generation no html file is created.

Jerry

2
Additional Info.

I was able to get an output from the RunReport() method.

But the RunHTMLReport() method does not work.

3
Ok I did this:
        public void runReport(String aFilepath, String anExportPath) {
            EA.Repository repository = new EA.RepositoryClass();
            bool success = repository.OpenFile(aFilepath);
            if (success) {
                try {
                    EA.Project project = repository.GetProjectInterface();
                    EA.Package aModel = (EA.Package)repository.Models.GetAt(0);
                    project.RunHTMLReport(aModel.PackageGUID, anExportPath, "GIF", "<default>", ".html");
                } catch (Exception e) {
                    Console.Out.Write(e.Message);
                }
                repository.CloseFile();
            }
            repository.Exit();
        }

but no report.
Again in the debugger it looks like the model is found, I can get is GUID, but I call the report method, and no output, no exceptions.

4
Hello,

Ok this is what I did:
using System;
using System.Collections.Generic;
using System.Text;
using EA;

namespace EAReportGenerator {
    class Program {
        static void Main(string[] args) {
            Program program = new Program();
            program.runReport(args[0], args[1], args[2]);
        }

        // arg0 "C:\\Source\\BaseLibraries\\Documentation\\BaseLoggingLibrary.EAP"
        // arg1 "Model" {0F14A2A8-0BD4-46f9-A6EA-00C433C05F61}
        // arg2 "C:\\temp\BaseLibraries"
        public void runReport(String arg0, String arg1, String arg2) {
            EA.Repository r = new EA.RepositoryClass();
            EA.Project project;
            r.OpenFile(arg0);
            project = r.GetProjectInterface();
            try {
                project.RunHTMLReport(arg1, arg2, "GIF", "<default>", ".html");
            } catch (Exception e) {
                Console.Out.Write(e.Message);
            }
            r.CloseFile();
            r.Exit();
        }
    }
}

It appears that I am opening my repository file.
In the debugger I see it initialized and no exceptions.
However, when I try the project.RunHTMLReport() method it does not generate the report.
I don't really know what I should use for the PackageGUID.

Sorry for the obtuse questions but the docs are not very clear on how to obtain this information.

Or maybe I can't read :)

Jerry

5
Hello again,

Thanks for the quick reply!

I will take a look and see what I can do.

6
Hello,

Thanks for the reply.

I looked at that example and I did not quite get it.

BTW I am using V 7.0 perhaps there it a better example in the newer version?

Also where are the API docs?

thanks,

Jerry

7
Hello,

New user here.
Boss has given me task of using automation api to generate reports from EA.

He wants to generate the reports via Nant and integrate with CruiseControl.

My intent is have a simple .exe app that would take a couple of command line parameters that would point to a EAP file and generate an HTML report.

I have looked at the API docs online and I can't quite figure out how to get started.

Anybody have a quick and dirty example on how to build a simple "faceless" .exe in C# to access the API to do this?

thanks,

Jerry

Pages: [1]