The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP ALM / Mercury Quality Center

Pages: 1
SDK1978
Newbie


Reged: 08/10/09
Posts: 20
Macro/VB script to generate reports from QC 10.0
      #610863 - 01/25/10 08:05 AM

Appreciate if someone could help me with a macro to generate reports from HP QC 10.0 in to Microsoft Excel automatically.

The queries in Dashboard are written currently in SQL.

Thanks,
SDK


Post Extras: Print Post   Remind Me!   Notify Moderator  
www82
Member


Reged: 01/08/10
Posts: 115
Re: Macro/VB script to generate reports from QC 10.0 [Re: SDK1978]
      #610883 - 01/25/10 09:20 AM

Are you trying to schedule existing dashboard reports?

Post Extras: Print Post   Remind Me!   Notify Moderator  
SDK1978
Newbie


Reged: 08/10/09
Posts: 20
Re: Macro/VB script to generate reports from QC 10.0 [Re: www82]
      #610884 - 01/25/10 09:34 AM

I have some exectuion metrics out of the dashboard on the project that I am trying to schedule using a macro so the reports will be generated at a specifice time in the day.

Thanks


Post Extras: Print Post   Remind Me!   Notify Moderator  
www82
Member


Reged: 01/08/10
Posts: 115
Re: Macro/VB script to generate reports from QC 10.0 [Re: SDK1978]
      #610898 - 01/25/10 10:11 AM

Code:
Sub Report(URL, Usr, Pwd, Dom, Prj, Sql)
Set TDConnection = CreateObject("TDApiOle80.TDConnection")
TDConnection.InitConnectionEx URL
TDConnection.Login Usr, Pwd
TDConnection.Connect Dom, Prj
Set Com = TDConnection.Command
Com.CommandText = Sql
Set RecSet = Com.Execute
For Col = 1 To RecSet.ColCount
Cells(1, Col).Value = RecSet.ColName(Col - 1)
Next
Row = 1
Do While Not RecSet.EOR
Row = Row + 1
For Col = 1 To RecSet.ColCount
Cells(Row, Col) = RecSet.FieldValue(Col - 1)
Next
RecSet.Next
Loop
TDConnection.Disconnect
TDConnection.Logout
TDConnection.ReleaseConnection
End Sub



Post Extras: Print Post   Remind Me!   Notify Moderator  
SDK1978
Newbie


Reged: 08/10/09
Posts: 20
Re: Macro/VB script to generate reports from QC 10.0 [Re: www82]
      #610905 - 01/25/10 10:41 AM

Thanks for the code. I am newbie at VBscripts...could you tell me where in Excel Spreadsheet -> Developer should i insert the code?

Can you please tell me how to proceed in detail. Thanks for your prompt response


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 31 anonymous users are browsing this forum.

Moderator:  Rich W., AJ, jgottlieb 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 4642

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5