Multiple "main" data objects on one report

In our project we are dealing with what we call a “Sample” object. This Sample holds testing data that is reported in a data grid. In 99% of scenarios we will only pass 1 sample object into the report and print using that. However, there is a 1% scenario where we will pass in 2 sample objects (in the picture the report starts at “TEST REPORT” and what we expect is for 2 reports to be generated in one PDF but what we are getting is a report of both sample objects mixed together


Red : Sample 1
Blue: Sample 2

Layout of the project. Do I need to put the Sample Details inside something?
image

Assuming that the table “ICombitSampleData” is the master table of the sample objects and the tables “Data Provided by Costumer” and “Lab Information” are sub-tables (Relation) of it, one could proceed as follows. Set the table “ICombitSampleData” as master table:

LL.SetDataBinding(“myDataGrid”, “ICombitSampleData”);

And set the “AutoMasterMode” to “AsVariables”:

LL.AutoMasterMode = LlAutoMasterMode.AsVariables

The master data is then declared as variables and the detail data as fields. The variables of the master table can then be placed within a table with free content. The project is reset internally according to each master data record. In this manner, you can print several identical reports with different data one after the other, in a single print job, e.g. multiple invoices – see also Variables, Fields and Datatypes

For more information:

Yes you are correct, ICombitSampleData is the master table. This makes sense and I will try out your suggestion later today.

Many Thanks

I have created a little test report template to try your suggestion out and it works, but also not work at the same time.


This is what prints out now. Both “ICombitSampleData” objects are printed on one report BUT 2 reports are generated in this PDF, both identical where as the red one should be on page 1 and the blue one should be on page 2.

image

Hope i have understood you correctly here. I think the master table “ICombitSampleData” has one record “PI2305…” and two records (StageName) in “ICombitSampleDataTestStages” (1:n relation). In this case you would need a grouping for the table “ICombitSampleDataTestStages”. To do this, create a “Group Header” in the table. The properties here should be:

Group By → StageName

Break Before → Yes

If this does not help, i’d suggest to open a support case via our support portal at My acccount: Login, user registration, product registration. Please copy any pertinent information from this thread into the case description. Maybe you can create a small sample or give us the data source as an xml file

The data coming in is a List of ICombitSampleData but your suggestion does make sense. Will try it out