Click to See Complete Forum and Search --> : Data not appearing in report at runtime


leejevans
August 14th, 2007, 04:18 AM
Hi all,

I am attempting to create and view a simple Crystal Report in VB.net and am running into some difficulty.

- First of all I add my Microsoft Access database as a datasource.
- Then I create a Crystal Report within VB.Net using the fields from my datasource e.g. MyReport.rpt
- Finally I create a form with a Crystal ReportViewer control on it and set the ReportSource to my new report, MyReport.rpt

However when I run my project the report appears but the data does not display.

I have tried looking at a couple of tutorials but haven't been able to figure it out, I'm guessing that I need to run a piece of code at runtime or something for the data to display?

Can anyone please help?

Many thanks in advance.

Lee

henky@nok.co.id
August 15th, 2007, 06:59 AM
Did you refresh the report source using your program?

leejevans
August 15th, 2007, 08:08 AM
Hi there,

How do I carry that out?

Many thanks
Lee

henky@nok.co.id
August 15th, 2007, 09:25 PM
Hi there,

How do I carry that out?

Many thanks
Lee
Just call the method of CrystalReportViewer;
i.e.
CrystalReportViewer CR
CR.RefreshReport()