Trying DBReports but get error

I downloaded the DBReports demo which works fine. I tried to put the plugin into my database but I am getting an error (UnSupportedOperationException MemoryBlockSize must be > 0).

When the code rpt.Designer is reached, the report designer shows and is functional, but as soon as I click Preview button or DataSet button, I get this error.

If I click Resume button in Xojo, Preview shows a blank blue screen - DataSet shows my data.

Here is code in my button:

Dim f As FolderItem= SpecialFolder.Desktop.Child("DBReportExample1.xml")
Dim rs As RecordSet= app.myDbase.SQLSelect("SELECT * FROM Locations")
Dim rpt As New DBReport(f, rs)
rpt.Designer
rpt.SaveXML(f)

XML file exists and report shows OK in designer mode.
RecordSet exists and data shows in DataSet mode.

Tried one more thing and got the same error in the example program.

Went into dbExample.rsd and added one more record to the data file using MesaSQLite (by duplicating an existing record) - now same error (UnSupportedOperationException MemoryBlockSize must be > 0) occurs in the example program when it reaches the code:

rpt.Designer

If I click the “To PDF” button, the report is generated with the added data and no errors.

Only when I click the “DBreport” button and then click Preview or DataSet do I get this error.

Any ideas?

Hi, thanks for give a chance,
what version are you try? (the version is a read property of rpt named “Version”) try with this version (mirror)

Thank you. I did download this new version but I am getting the same error. Everything runs well until I add a couple of records to the datafile. I simply hit duplicate record (the auto increment does increase).

Not sure if this means anything, but I am working on a Mac OS 10.8.5 using Xojo 2013 Release 3.3.

[quote=63099:@David Schlam]Thank you. I did download this new version but I am getting the same error. Everything runs well until I add a couple of records to the datafile. I simply hit duplicate record (the auto increment does increase).

Not sure if this means anything, but I am working on a Mac OS 10.8.5 using Xojo 2013 Release 3.3.[/quote]
You’re right. The bug is when a Picture field have NULL (not empty). I add a check for this. Please try with this version (mirror)

Bernardo,

Thank you so much for fixing this error. DB Report is working now.

I have noticed that working with your Demo (and also with my data), the Group1 Footer does not show on Preview (and I am guessing does not print). I have tried placing fields, labels, or rectangles in the area, but nothing shows.

I am interested in having subtotals by group. Is it possible to have a field in the Detail area (for example, Price) that will be subtotaled in the Group 1 Footer and then totaled in the Report Footer?

[quote=63726:@David Schlam]Bernardo,

Thank you so much for fixing this error. DB Report is working now.

I have noticed that working with your Demo (and also with my data), the Group1 Footer does not show on Preview (and I am guessing does not print). I have tried placing fields, labels, or rectangles in the area, but nothing shows.

I am interested in having subtotals by group. Is it possible to have a field in the Detail area (for example, Price) that will be subtotaled in the Group 1 Footer and then totaled in the Report Footer?[/quote]

For the GroupFooter shows click on group band (or select from schema) click on Visible property checkbox.

For subtotals: Yes, you can subtotaled field, just change the property “Formula” to Sum, to select element click on it or select from Schema (the third button in up-right of designer)

Of course it was something simple. Not sure why when I deleted the Group then added it again, the properties for visible for footer did not revert back to visible. That’s ok, though, now that I know to look for that.