Subsummary with dataset in Solution Model

I am using Solution model to :

create a form
create fields
create a leadingSubSummary part and its breaking field
assign a dataset as datasource of the form

everything is OK, except that, when doing a Preview, the SUbSummary does not appear.

I am using Servoy Developer 5.01 .

Are subsummaries supported in solution model ?

Thanks in advance!

Hi,

Did you also sort the data with the criteria used in the sub-summary?

Robert,

Did you also sort the data with the criteria used in the sub-summary?

Yes, the dataset is ordered with the criteria used in sub-summary.

achiary,

This should work.

Please create a small sample solution and file a case in our support system.

http://crm.servoy.com/servoy-webclient/ … oy_support

Rob

submitted to support: case id #279701

What you are trying to do in the solution is:

  1. Get a foundset from a table and sort it.
  2. Convert that foundset into a dataset.
  3. Sort the dataset.
  4. Create a datasource from that dataset.
  5. Create a form based on that datasource that contains subsummary part.
  6. Show and print this form.

This is why it doesn’t work:

  • at (2) the foundset’s sort information is lost (as datasets do not carry sort information with them)
  • at (3) the dataset’s data is sorted indeed, but only the data is sorted by given criteria. The criteria is then discarded because datasets do no carry sort information.
  • at (4) the new datasource’s foundsets will not contain sort information as the dataset doesn’t have any.
  • after creating the form, no sort is specified => form’s foundset is not sorted => subsummary printing doesn’t work.

Solution - sort the form after creating it using forms.p.controller.sort(…). It will then print as expected.

One thing that you might think to try and it will still not work in your situation is using something like:

jsform.namedFoundSet = "separate";
jsform.initialSort = "orderid asc";

instead of “forms.p.controller.sort(…)” - when creating the form with solution model. This will not work because the “separate” has no effect on datasources created with “ds.createDataSource(‘test’,types)”, as foundsets of this type of datasource are currently always shared. So the existing (non-sorted) foundset will be used for the form, thus ignoring “initialSort”.

Regards,