cancel
Showing results for 
Search instead for 
Did you mean: 

Adding and opening a crystal report on menu click

Former Member
0 Kudos

Dear All,

Please let me know how can I add a Crystal report through SDK and open that report on a click menu. Is it possible or not ?

Regards,

Noor Hussain

Accepted Solutions (1)

Accepted Solutions (1)

marco_laporta
Participant
0 Kudos

1) For adding Report See SDK help file (search Crystal). And also search in thread because I already posted the same question.

2) For opening, it's not easy but I have done it. See this thread.

[;

Hope this help.

Regards

Marco

Answers (2)

Answers (2)

Former Member
0 Kudos

Closed

Former Member
0 Kudos

Hi Noor,

What do u mean to create a new Crystal report using SDK??

Opening a Crystal report (.rpt file) on the menu/button click is very much straight forward and possible. Please check the following thereads. And search for more in SDN.

Hope it helps,

Vasu Natari.

Former Member
0 Kudos

Hi Vasu,

Thanks a lot for your time. I have designed a report and I want to know how to open that report on a menu click of SAP B One ?

Regards,

Noor Hussain

Former Member
0 Kudos

Noor,

For that u need to use the crystal report viewer windows control. and assign the rpt file to that control. And this windows control will be a part of a .net form.

Please search on the SDN. I have posted on the same topic long back.

I'll try to find that thread if possible.

Vasu Natari.

Former Member
0 Kudos

Hi vasu,

Will it be embedded in SAP B One or not ?

Regards,

Noor

Former Member
0 Kudos

Noor,

Embedded in the sense, when the user clicks on the Menu, the report will open in a new windows window. Is this what ur asking?

Vasu Natari.

Former Member
0 Kudos

Hi,

The report should open in the Crystal report viewer when I click on the menu. Is it possible ?

Regards,

Noor Hussain

Former Member
0 Kudos

Yes its possible.

Vasu.

Former Member
0 Kudos

Hi Vasu,

Please provide me with some sample code. I will be very thankful to you.

Regards,

Noor Hussain

Former Member
0 Kudos

Noor,

The following is the code that I use. Have a look at that.

Dim objFrmLabelDisplay As New frmLabelDisplay
            objFrmLabelDisplay.WindowState = FormWindowState.Maximized
            objFrmLabelDisplay.iniViewer = AddressOf objFrmLabelDisplay.GenerateReport
            objFrmLabelDisplay.iniViewer(dsBarCodeLabels, rptLabelDispaly)
            objFrmLabelDisplay.ShowDialog()

And for generate report in windows form class..

Public Sub GenerateReport(ByVal SourceDataSet As System.Data.DataSet, ByVal RptClass As CrystalDecisions.CrystalReports.Engine.ReportClass)
        Try
            RptClass.SetDataSource(SourceDataSet)
            CrystalReportViewer1.ReportSource = RptClass
            CrystalReportViewer1.Refresh()
        Catch ex As Exception
            Throw (ex)
        Finally
            RptClass = Nothing
        End Try
    End Sub

Marco is using Active X i guess, which i do not use.

Regards,

Vasu Natari.

Edited by: vasu natari on Jul 22, 2010 8:15 AM

Former Member
0 Kudos

Hi Vasu,

Thanks for your time. I will try it out.

Regards,

Noor Hussain