locked
Crystal Report - Loop in detail section RRS feed

  • Question

  • User899290 posted

    I am a newbie in Crystal report. And i want to ask if i want to loop the label using code ((TextObject)report.ReportDefinition.ReportObjects["lTitle"]).Text in the detail section, what should i do? Can anyone show me?

    My code like this:

            public MainWindow()
            {
                InitializeComponent();
                CrystalReportViewer cryreportviewer = null;
                CrystalReportViewer rptViewer = new CrystalReportViewer();
                ReportViewer.Child = cryreportviewer;
                ReportDocument report = new ReportDocument();
                WindowsFormsHost host = new WindowsFormsHost();
                report.Load("C:\\ReportViewerView.rpt");

                ((TextObject)report.ReportDefinition.ReportObjects["lTitle"]).Text = "Want to loop in detail section";

                rptViewer.ReportSource = report;
                host.Child = rptViewer;
                reportGrid.Children.Add(host);
     }

    Thank you.

    Sunday, June 19, 2011 9:00 PM

Answers