Does anyone know of examples of custom dataset interfaces use that are a bit more helpful than whats in the doc? Theres also a .Run constructor that shows a (dataset, PDF) that would be great to know more about or have an example. I want to use some json objects that contain data I want in a report form so I made a report with about 8-9 string and number fields in the body section and some headings in the report form. Then I folowed the docs for “Displaying Reports” using text as a dataset. I combined that with the example, “Report preview with container control” and I set up a dummy array of values to feed into the report form. I set up the custom class using the Reports.dataset interface and implimented the methods as shown adapting to the array I send in in the constructor. It iterates through the number of items i have in teh array calling the run method first, then the EOF, then the Field(name) method but theres no name in the name argument coming in.
I cant figure out how it iterates through the custom data set and how im supposed to fill the fields in. I *think it calls the run method and then its maybe up to me to do the rest with the NexRecord? Its hard to tell what gets called, what/how i can reference the report items like header pics and fields, and how I can fill in the body field values. I am expecting to set up header and footer values in the run method maybe and then use an array of string arrays as the data to put into the fields i want to populate the body lines and then advance through the array…the data is quite convenient in json objects so I can configure it pretty much any way needed.
2 posts - 1 participant