This is actually two questions.
I have an application that runs "perfect" until I set up a crystal report form.
Basically I fill a dataset with the data I'm looking for using a LINQ query with the following code:
Dim ds As New TalkScheduleDataSet
Dim dt As DataTable = ds.TalkSchedule
Dim sched = From s In db.TalkSchedules Where s.Date >= CDate(startDate) And _
s.Date <= CDate(endDate) _
Select s
Dim rpt As New ReportDocument
for each sch In Sched
dt.Rows.Add(sch)
Next
Dim rpt As New ReportDocument
rpt = New rptTalksSchedule
rpt.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rpt
Error is:
VS 2012
No source available
The call stack contains only external code
Mixed mode assembly is built against version 'v2.0.50727' and cannot be
loaded in the 4.0 runtime without additional configuration.
An unhandled exception of type 'System.IO.FileLoadException' occurred in
mscorlib.dll
VS 2013 error is about the same with different formatting
Both have to do with CrystalDecisions.ReportAppServer.DataSetConversion.dll
I have another application I have upgraded from VS2008 to 2013, which does the same, and it works perfectly, using the same pre-filled DataSet for several different CrystalReport forms. Each form displays the data the way it is supposed to.
Can't understand what's going on. Both applications use the same CrystalReports versions (13.0.2000.0)
CrystalDecisions.CrystalReports.Engine
CrystalDecisions.ReportSource
CrystalDecisions.Shared
CrystalDecisions.Windows.Forms
In the past I've had a lot of problems getting to know the eccentricities of Crystal Reports and I actually would prefer to use the VS built in reportviewer, but I can't get it to work with the dataset. It won't update with the data after I fill the dataset.
Is there a good walkthrough for the ReportViewer. Not the basic ones that only use the Wizard. I need to format the report and get specific data, as shown in the subroutine above. I built the report, added it to a ReportViewer on the form and added
ReportViewer1.Refresh
ReportViewer1.Update
Neither works, although I know the Dataset has data in it.
Hope I've been clear enough.
Thanks for all your help.