Click here to Skip to main content
Sign Up to vote bad
good
See more: VB.NET
Problem : I am using a crystal report which contain One main report and one subreport
 
each main record contain some basic data and have group data in subreport.
Hoe to set codes for above solution.
 
for Example : a company wants to show basic record for all employees as well as month wise annual report for each employee as subreport
 
I use following code to a simple crystal report
 
dim CrReport as New CRmain
 
crMain.SetDataSource(DTable)
 
RptViewr1.Reportsource = CrReport
 
RptViewr1.refresh()
Posted 19-Sep-11 9:03am
Edited 19-Sep-11 11:27am


3 solutions

You need to set up datasource for the sub report too. Here it is, read the "Sub report" section: Working with Crystal Reports in .Net[^]
  Permalink  
dim CrReport as New CRmain
 
CrReport.SetDataSource(DTable)
 
RptViewr1.Reportsource = CrReport
 
RptViewr1.refresh()
  Permalink  
this way...
   Dim orpt As New ReportDocument
...
   orpt.Subreports("HeaderRpt.rpt").SetDataSource(HeaderDT)
Happy Coding!
Smile | :)
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Christian Graus 544
1 Ron Beyer 296
2 OriginalGriff 258
3 samadhan_kshirsagar 229
4 Sergey Alexandrovich Kryukov 183
0 Sergey Alexandrovich Kryukov 7,007
1 Prasad_Kulkarni 3,815
2 OriginalGriff 3,557
3 _Amy 3,372
4 CPallini 2,975


Advertise | Privacy | Mobile
Web03 | 2.6.130617.1 | Last Updated 4 Jan 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid