Printing of Reports with VB, i need some help desperately 
Author Message
 Printing of Reports with VB, i need some help desperately

Hi.
This is my first time posting a question on newsgroup.  I have a project

to write a macro in VB to pring weekly schedules of employees.  The task

schedules can be accessed by View->Reports>Assignments->To-Do-List, and
after that a window comes up to select the name of the employee, once I
choose the name, it shows me their task sheet (custom made) for next one

month.  I found that there is a method ReportPrintPreview, but that only

supports the reports that project makes.
When I started writing my code, I could access some of the fields like
following

p = TName =
ActiveProject.Resources.Item(6).Assignments.Item(1).ResourceName

in this case, p is the name of some employee, but I need to access some
other parameters that I don't see as methods or properties of Item. For
example I can see the number of hours assigned in the "Work" column
under "Resource Usage" view, but how do I access those hours through my
code, any code or help will be really appreciated. By the way I have
never done any VB, and never used project before.

Thanks
Ray



Fri, 16 Jan 2004 22:48:57 GMT  
 Printing of Reports with VB, i need some help desperately

Rehan

<<I can see the number of hours assigned in the "Work" column under "Resource Usage" view, but how do I access those hours through my code>>

Sub ListAssignmentWork()
    Dim Tsk As Task, Res As Resource, Asn As Assignment
    For Each Res In ActiveProject.Resources
        If Not Res Is Nothing Then
            Debug.Print Res.Name
            For Each Asn In Res.Assignments
                Debug.Print , Asn.TaskName; Asn.Work
            Next
        End If
    Next
End Sub

Regards
Venkata Krishna

ps:Work is displayed in minutes

Quote:

> Hi.
> This is my first time posting a question on newsgroup.  I have a project

> to write a macro in VB to pring weekly schedules of employees.  The task

> schedules can be accessed by View->Reports>Assignments->To-Do-List, and
> after that a window comes up to select the name of the employee, once I
> choose the name, it shows me their task sheet (custom made) for next one

> month.  I found that there is a method ReportPrintPreview, but that only

> supports the reports that project makes.
> When I started writing my code, I could access some of the fields like
> following

> p = TName =
> ActiveProject.Resources.Item(6).Assignments.Item(1).ResourceName

> in this case, p is the name of some employee, but I need to access some
> other parameters that I don't see as methods or properties of Item. For
> example I can see the number of hours assigned in the "Work" column
> under "Resource Usage" view, but how do I access those hours through my
> code, any code or help will be really appreciated. By the way I have
> never done any VB, and never used project before.

> Thanks
> Ray



Fri, 16 Jan 2004 23:29:59 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Desperately needed printing help....

2. Desperately need help printing vb3.0!!!!

3. DESPERATELY need help printing on a form!!!

4. Desperately Need HELP!!!!-Crystal Report-Logon Fail - Can anyone even give me a lead

5. I desperately need help with reporting.....

6. Need help Desperately in Netapps using VB

7. Newbie Needs Help Desperately With VB 4.0

8. need help for printing crystal report from vb

9. Printing Crystal Reports report help needed

10. Need help printing LARGE reports with vb3.0 and Crystal Reports

11. Need help printing LARGE reports with VB3.0 and Crystal Reports 4.5

12. desperately need help with automation error

 

 
Powered by phpBB® Forum Software