Could someone send a code snip as to how I could perform a thick client rendering dynamically on a ReportViewer object?
I have an client object on VS.NET
The following code fails.
~~~~~~~~~~~
Dim rep2 As CrystalReportPluginLib.Report
Dim rep3 As CrystalDecisions.ReportSource.EnterpriseReport
Dim rep4 As CrystalDecisions.ReportSource.RemoteReportSource
Dim file As CrystalInfoStoreLib.File
rep2 = infoObj2.PluginInterface
If rep2.NeedsLogon = True Then 'Additional information: Property SI_PROCESSINFO.SI_DBNEEDLOGON must be retrieved at Query time for this method to work properly.
System.Diagnostics.Debug.WriteLine("Needs Logon" & rep2.ReportFileName())
End If
System.Diagnostics.Debug.WriteLine("FileName = " & rep2.ReportFileName())
For Each file In infoObj2.Files
System.Diagnostics.Debug.WriteLine(" " & file.Name())
Next
file.CopyTo(rep3)
CRViewer1.ReportSource = rep4
~~~~~~~~~~~
eg: Statically This will work...
CRViewer1.ReportSource = EnterpriseReport1
(viewer object) CrystalDecisions.ReportSource.EnterpriseReport
Thanks,
I have an client object on VS.NET
The following code fails.
~~~~~~~~~~~
Dim rep2 As CrystalReportPluginLib.Report
Dim rep3 As CrystalDecisions.ReportSource.EnterpriseReport
Dim rep4 As CrystalDecisions.ReportSource.RemoteReportSource
Dim file As CrystalInfoStoreLib.File
rep2 = infoObj2.PluginInterface
If rep2.NeedsLogon = True Then 'Additional information: Property SI_PROCESSINFO.SI_DBNEEDLOGON must be retrieved at Query time for this method to work properly.
System.Diagnostics.Debug.WriteLine("Needs Logon" & rep2.ReportFileName())
End If
System.Diagnostics.Debug.WriteLine("FileName = " & rep2.ReportFileName())
For Each file In infoObj2.Files
System.Diagnostics.Debug.WriteLine(" " & file.Name())
Next
file.CopyTo(rep3)
CRViewer1.ReportSource = rep4
~~~~~~~~~~~
eg: Statically This will work...
CRViewer1.ReportSource = EnterpriseReport1
(viewer object) CrystalDecisions.ReportSource.EnterpriseReport
Thanks,