Reporte de ActiveReport

02 de Junio del 2004
Como puedo pasar la informacion contenida en un mshflegrid aun reporte en Active Report , donde cada renglon del mshflex sea una pagina del reporte, si tiene 8 renglones necesito que el reporte me salga con 8 paginas con la informacion que hay en cada renglon.??????????????????

Victor Licea
02 de Junio del 2004

No sé que version de active reports estes usando, pero aqui encontré algo que te ayudar a resolver tu problema.

Podrias implementar un arreglo o pasar directamente desde el grid que usas.


ActiveReports gives you complete control to bind your report to any data source - including arrays- through its programmable object model. You can create a report without any data binding then load the data from your data source and feed it into the report controls at runtime.
ActiveReports Fields property provides the data binding between the control and the runtime fields. It allows you to set the DataField property of the control to any of the runtime defined field names.

The DataInitialize and FetchData events are used to define the runtime fields and feeding the data values of these fields so they can be used with bound controls. These two events can also be used to create calculated fields in bound report (reports that have a data control).
The following example creates a set of runtime fields and loads the field values from an array.

Private Sub ActiveReport_DataInitialize()
Fields.Add "OrderID"
Fields.Add "ProductID"
Fields.Add "ProductName"
Fields.Add "Qty"
Fields.Add "Price"
Fields.Add "Amount"
' iRow is the current record pointer
iRow = LBound(arr)
End Sub

Private Sub ActiveReport_FetchData(eof As Boolean)
' If we processed all element then we exit the event
' after setting the eof parameter to True
' this will promp AR to end the report
If iRow > UBound(arr) Then

Eof = True
Exit Sub
End If
Fields("OrderID") = arr(iRow).OrderNo
Fields("ProductID") = arr(iRow).ProductID
Fields("ProductName") = arr(iRow).ProductName
Fields("Qty") = arr(iRow).Qty
Fields("Price") = arr(iRow).Price
Fields("Amount") = arr(iRow).Amount
iRow = iRow + 1
' We must set the eof parameter to True as
' long as there is more data to be processed
eof = False
End Sub

Note: The samples directory includes complete example for binding controls to arrays, collections and recordsets.