Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Crystal 10 for VS 2005 - How to bound unbound fields at runtime

Hello,

In VB6 I have unbound fields and method SetUnboundFieldDataSource to bound those fields at runtime, but in VS 2005 there is no way to handle unbound fields?

I have desktop application, some CR report with unbound fields 1,2,3.

At runtime I want to set CR,datasource to DataTable and to bound unbound fields 1,2,3 to DataTable fields 1,2,3. How to do this?

Thanks in advance

Former Member
replied

Create three formulas; formula1,formula2, formula3. Populate those formulas with your data. One formula example;

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class Form1
Inherits System.Windows.Forms.Form
Dim Report As New CrystalReport1()
Dim FormulaFields As FormulaFieldDefinitions
Dim FormulaField As FormulaFieldDefinition

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
FormulaFields = Report.DataDefinition.FormulaFields
FormulaField = FormulaFields.Item(0)
FormulaField.Text = "[formula text]"
CrystalReportViewer1.ReportSource = Report
End Sub

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question