dynamic crystal report generation
The dynamic report can be generated only using Formula Fields. i m using Crystal reports 10.0. Just add few formula fields into details section of the report. Now through VB or VB.NET, we can access Report's Formula Fields Array. The instance of the Report (.rpt) has a property "FormulaFields" as Array of the formula fields on the report, we can assign column names of a datatble to the FormulaField(index).Text property to have dynamically those columns onto the report.
The syntax will be:
ReportInstance.DataDefinition.FormulaFields(index).Text = "{DataTable.ColumnName}"
For Eg:
SalaryReport.DataDefinition.FormulaFields(0).Text = "{EmployeeSalaryTable.Sal}"
Thus the first formula field, that is added to the details section in report, will dhow the salary details.
The syntax will be:
ReportInstance.DataDefinition.FormulaFields(index).Text = "{DataTable.ColumnName}"
For Eg:
SalaryReport.DataDefinition.FormulaFields(0).Text = "{EmployeeSalaryTable.Sal}"
Thus the first formula field, that is added to the details section in report, will dhow the salary details.
Labels: Crystal Reports
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home