Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
stereo123 Absent Member.
Absent Member.
1125 views

Need help creating a XLS report from Analysis view

Hi,

I need to create a report in an excel format for requirement management purpose. The excel doc should be my business requirement doc. I want to create the report from the "Analysis View".  The columns that I'd need from requirements module are:

 

1.  Name

2. Author

3. Description

4. Priority

5. Attachments

 

The attachments within the requirements are the key and most essential part here. Can someone help me with the basic SQL query for this?

TY,

M-RR

0 Likes
7 Replies
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Need help creating a XLS report from Analysis view

Do you need the actual attachment or just the name of the attachment?  Are your attachments URLs or files?

 

Attached files are stored on the ALM server. You won't be able to download them and imbed them in your Excel file by using SQL.

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
stereo123 Absent Member.
Absent Member.

Re: Need help creating a XLS report from Analysis view

I would actually need the actual attachments, as a first priority. My attachments in the ALM are actual files. Is it possible to pull up the URLs of these files using SQL queries?

I am SQL challenged, btw.

0 Likes
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Need help creating a XLS report from Analysis view

No, you can't get URLs for the attachments. The attachments stored in the Repository are not accessible via URL. You could get the path to the attachment, but that would be a path on the server hosting the Repository. Anybody trying to use that path would have to have access to that server.

 

You would be much better off using the API to get what you need. At least then you would have the facilities to download local copies of the attachments.

 

But I don't see how you will imbed the actual files into an Excel file anyhow. How do you expect to display those files within Excel cells?

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
stereo123 Absent Member.
Absent Member.

Re: Need help creating a XLS report from Analysis view

So someone mentioned that I need to use an API to pull the attachments out of ALM into Excel. For that I'd need to create VBS Script, something in the following manner:

 

Set oAttFact = oBug.Attachments Set oAttList = oAttFact.NewList("") For Each oAtt In oAttList 'downloads the attachments to sPath which you cannot change oAttCH.Load True, sPath

 

Any idea if this looks legit?

0 Likes
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: Need help creating a XLS report from Analysis view

When you post code, you should format it so that it is easier to read

Set oAttFact = oBug.Attachments 
Set oAttList = oAttFact.NewList("") 
For Each oAtt In oAttList 
'downloads the attachments to sPath which you cannot change 
oAttCH.Load True, sPath

 

The code you provided would not work, but (hopefully) only because you have a typo in it.

 

The last line should be

oAtt.Load True, sPath

 

And you need a "Next" statement after that to actually complete the "For..Each" loop.

 

 

Also, this code appears to references Bugs, not Requirements, based on your statement:

Set oAttFact = oBug.Attachments

 

"oBug" is changed to reference a Requirement object.

 

Lastly, you said you were doing this with VBScript. According to the OTA API reference document, if you look at the Attachment object and drill down through the Load method, you will see a statement that the second parameter with VBScript. Review the example provided in the documentation.

 

Assuming you correct all that, and you have the prerequisite code to connect to ALM and retrieve the Requirement object(s), then the resultant code should work.

 

[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
Mad_Mags Absent Member.
Absent Member.

Re: Need help creating a XLS report from Analysis view

Hi

 

Have you tried a Project Report ?

 

I believe you can add a section for Attachments - will check this evening

 

Hope this helps

 

Thanks

Martin

 

NOTE : The views expressed here are entirely my own

0 Likes
Highlighted
Mad_Mags Absent Member.
Absent Member.

Re: Need help creating a XLS report from Analysis view

HI

 

I've checked and its not possible. Attachment is not an option

 

However, I have thought of an alternative option if you have one attachment. Copy the text of the attachment into the Rich Text tab. This is then available to extract

 

Hope this helps

 

Thanks

Martin

 

NOTE : The views expressed here are entirely my own

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.