|
En las declaraciones, puede que esté sobrando
alguna, porque lo tomé de un proyecto y no lo analicé. Pero
funciona.
Dim CRXSections As CRAXDRT.Sections
Dim CRXSection As CRAXDRT.Section Dim CRXSubreportObj As CRAXDRT.SubreportObject Dim CRXReportObjects As CRAXDRT.ReportObjects Dim crxSubreport As CRAXDRT.Report Dim ReportObject As Object Dim Crxformulafield As CRAXDRT.FormulaFieldDefinition Dim Crxformulafields As CRAXDRT.FormulaFieldDefinitions Dim crField As CRAXDRT.DatabaseFieldDefinition Dim crxOleObject As CRAXDRT.OLEObject Dim crxFieldObject As CRAXDRT.FieldObject Set CRXSections =
m_Report.Sections
For Each CRXSection In CRXSections 'In each section, you get all the objects in the section. Set CRXReportObjects = CRXSection.ReportObjects 'You cycle through the objects. For Each ReportObject In CRXReportObjects 'You test the objects to see if they're subreports. If ReportObject.Kind = crSubreportObject Then 'When you find a subreport, you get a hold of it. Set CRXSubreportObj = ReportObject 'Finally, you open the subreport and treat it as you would any other report. Set crxSubreport = CRXSubreportObj.OpenSubreport 'NOTE: This is where you put the code for manipulating the subreport.
If InStr(g_ReportName, "CCClientes")
Then
Set Crxformulafields = crxSubreport.FormulaFields For Each Crxformulafield In Crxformulafields If Crxformulafield.Name = "[EMAIL PROTECTED]}" Then Crxformulafield.Text = miFormula End If Next End If End If Next ReportObject Next CRXSection Suerte
Viviana
|
- [vbusers] Pasar formulas a subreportes en crystal Sistemas C.M.P.
- [vbusers] Pasar formulas a subreportes en cry... Report System - Viviana
