Click here to Skip to main content
12,756,514 members (30,476 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET
Dim ds As New Crystal_DS
        Dim DT_TAB As DataTable = ds.Tables.Add("Summary")
        If LV.Items.Count > 1 Then
            For i As Integer = 0 To LV.Items(0).SubItems.Count - 1
                Dim DCOL As New DataColumn(LV.Columns(i).Text)
        End If
        For i As Integer = 0 To LV.Items.Count - 1
            Dim DROW As DataRow = DT_TAB.NewRow
            For j As Integer = 0 To LV.Items(i).SubItems.Count - 1
                DROW(LV.Columns(j).Text) = LV.Items(i).SubItems(j).Text
        DataGridView1.DataSource = ds.Tables("Summary")
        Dim objRpt As New TripSheet
        Dim strReportPath As String = Application.StartupPath & "\Cry_Chart\TripSheet.rpt"
        CrystalReportViewer1.ReportSource = objRpt

I used above the lines for view the crystal report.... but nothing display while program execution time... and also no error....
I try to read the data from the listview and convert to data table. Finally display the datatable in the crystal report...
Posted 24-Jan-13 21:06pm
Updated 24-Jan-13 21:07pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If your report is displaying but no data then there may be chances where CR wants your data to already be there .
Your .NET program has to put data into the dataset prior to running the report that reads the dataset. How this is done is dependent on how you've set up your dataset.
If it's tables, you can just open the tables. If it's based on a query, you have to run the query. If the data is generated through code, then you have to generate the data.
(For example, I have an app that does a user audit from Business Objects Enterprise XI. It gets the user information from BO XI through the SDK and saves it to a table in the dataset. It then reads user information from our security database and updates the table based on that. Then it opens up the audit report.)

Hope it helps.
PunithaSabareeswari 6-Feb-13 3:19am
Thank You
Teju MB 6-Feb-13 10:08am
Is that solves your problem, if so accept this as an answer. if not post the solution if you find any such that it can help to others.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170217.1 | Last Updated 25 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100