Reports Line by Line

Hello
how i can fill the Report Body area of the reports with out send the RecordSet like using Dictionary or add line by line of data to the Body on the Report.

I’m also interested in populating a report this way. Is it possible? Any examples?

Not exactly sure what you are asking. Is it the fact that you want to do a report from data in arrays, a dictionary, anything other than a recordset from a database. If so, e-mail me at:

harriew at frontiernet dot net

and I can send you a project that reports from the information in a listbox. If this is not what you are interested in then I am sorry for not better understanding your question.

By the way, once you see how it is done from a listbox, it is easy to switch to any other collection of data such as arrays, dictionary or array of a data class etc.

emal sent. thank you.

Not sure why the delay but in 20 minutes it hasn’t arrived.

harriew@frontiernet.net

to be sure that you get it right.

tried again…

I send you me email to

[quote=35219:@Alexis Colon Lugo]Hello
how i can fill the Report Body area of the reports with out send the RecordSet like using Dictionary or add line by line of data to the Body on the Report.[/quote]

From User Guide - Framework:

Using Text as a Data Set.

To use anything else as a data set for a report, such a text file, you create a custom class that implements the Reports.DataSet interface. This interface specifies these methods: EOF As Boolean, Field(Integer) As Variant, Field(String) As Variant, NextRecord As Boolean, Run, Type(String) As Integer.

In these methods, you fetch the specific data you need from your actual data source (perhaps a text or XML file) and then return the result or do the expected action.

harriew
Have you recive me email

Hi harriew

thanks for the Big Help with that example project i learn how DataSet works

i have my report now works

Glad to hear that the example, along with the explanation helped you achieve getting your report working. Now you have a good reference for the future.

thanks you

With this small code i fix Desktop Report Multi-Line and WordWrap Don’t Change Row Height for now

If Rs.RecordCount > 0 Then
Dim fJobs As String
Dim sMoney As Currency
Dim i As Integer
// fill the history array
sMoney=10.00
Do
fJobs = Rs.Field(“jobs”).StringValue.Trim
If CountFields(fJobs,Chr(13)) > 0 then
Dim anArray(-1) as String
anArray=Split(fJobs,chr(13))
For i=0 to Ubound(anArray)
MyData.Append New vDataRep(anArray(i),sMoney)
sMoney=0
Next
Else
MyData.Append New vDataRep(fJobs,sMoney)
sMoney=0
End If
Rs.MoveNext
Loop until Rs.EOF=True

End If