Solved

CR SUB REPORT PROBLEM

Posted on 2013-05-24
4
351 Views
Last Modified: 2013-06-03
Hi All,

I have created a CR report.

It has problem with login prompt.

 Public Sub Print()

               Dim strReportFile As String = strAppFolder & "\REPORT\" & strCRReportName

        Try
            Dim frmCRReportViewer As frmCRReportViewer = New frmCRReportViewer
            Dim ds As DataSet = Me.GetDataSource(strYear & strMonth)

            Dim rpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument

            With rpt
                .Load(strReportFile)
             
                .SetDataSource(ds.Tables("HEADER"))
                .Subreports("PENDAPATAN").SetDataSource(ds.Tables("PENDAPATAN"))


                .Subreports("POTONGAN").SetDataSource(ds.Tables("POTONGAN"))
                Object reference not set to an instance of an object.
         
             End With

            With frmCRReportViewer
                .CrystalReportViewer.ReportSource = rpt
                     .Show()
            End With

        Catch ex As Exception
     
        End Try

    End Sub

If I remarks :
      .Subreports("POTONGAN").SetDataSource(ds.Tables("POTONGAN"))
                Object reference not set to an instance of an object.
         
Then show up login.

What should I do?

Thank you.
rptSlipGajiFullSMIT.rpt
SlipGajiFullSMIT.xsd
0
Comment
Question by:emi_sastra
  • 3
4 Comments
 
LVL 1

Author Comment

by:emi_sastra
ID: 39193809
One more info, the ds (dataset) has no problem. All data needed are there.

Thank you.
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 39217650
Hi All,

Could some experts here help ?

Thank you.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39217795
Generally this is done opening each subreport in turn then assigning the dataset.


This link has a subreport logon example
http://wiki.sdn.sap.com/wiki/display/BOBJ/Crystal+Reports+for+.NET+SDK+Samples

Direct link
https://smpdl.sap-ag.de/~sapidp/012002523100006252712008E/csharp_web_smpl.exe

mlmcc
0
 
LVL 1

Author Closing Comment

by:emi_sastra
ID: 39217930
Great.

Thank you very much for your help.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question