• We just launched and are currently in beta. Join us as we build and grow the community.

Load Crystal Sup Report in VS2008

Rotten

Reel Monetizer
R Rep
0
0
0
Rep
0
R Vouches
0
0
0
Vouches
0
Posts
29
Likes
176
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
Suppose you have namespace MoonSun.Solution.Report, and report rpt_StaffMovement that has 4 subreports name
1. NewStaff
2. Resignation
3. Termination
4. Transfer

You can use the following code
parameter DataSet dsStaffMovement has four tables
  1. public

    static

    void

    View_StaffMovement(

    DataSet dsStaffMovement)
  2. {
  3. try
  4. {
  5. MoonSun.

    Solution

    .

    Report

    .

    Rpt

    .

    rpt_StaffMovement

    rptDoc =

    new

    MoonSun.

    Solution

    .

    Report

    .

    Rpt

    .

    rpt_StaffMovement

    (

    )

    ;
  6. rptDoc.

    OpenSubreport

    (

    "NewStaff"

    )

    .

    Database

    .

    Tables

    [

    0

    ]

    .

    SetDataSource

    (

    dsStaffMovement.

    Tables

    [

    0

    ]

    )

    ;
  7. rptDoc.

    OpenSubreport

    (

    "Resignation"

    )

    .

    Database

    .

    Tables

    [

    0

    ]

    .

    SetDataSource

    (

    dsStaffMovement.

    Tables

    [

    1

    ]

    )

    ;
  8. rptDoc.

    OpenSubreport

    (

    "Termination"

    )

    .

    Database

    .

    Tables

    [

    0

    ]

    .

    SetDataSource

    (

    dsStaffMovement.

    Tables

    [

    2

    ]

    )

    ;
  9. rptDoc.

    OpenSubreport

    (

    "Transfer"

    )

    .

    Database

    .

    Tables

    [

    0

    ]

    .

    SetDataSource

    (

    dsStaffMovement.

    Tables

    [

    3

    ]

    )

    ;

  10. frm_RptDesign frmRptDesign =

    new

    frm_RptDesign(

    )

    ;
  11. frmRptDesign.

    crView

    .

    ReportSource

    =

    rptDoc;

  12. frmRptDesign.

    crView

    .

    Zoom

    (

    75

    )

    ;
  13. frmRptDesign.

    Show

    (

    )

    ;
  14. }
  15. catch

    (

    Exception e)
  16. {
  17. MessageBox.

    Show

    (

    e.

    Message

    .

    ToString

    (

    )

    +

    ","

    +

    e.

    StackTrace

    .

    ToString

    (

    )

    )

    ;
  18. }
  19. }

 

452,292

323,341

323,350

Top