?
Solved

CR SUB REPORT PROBLEM

Posted on 2013-05-24
4
Medium Priority
?
362 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 101

Accepted Solution

by:
mlmcc earned 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

800 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