Skip to Content
0
Former Member
Apr 05, 2006 at 08:29 AM

Smartform New-Page and different table content

576 Views

Hello,

I should do a report with smartforms, that shows table data of materials and stuff. After every materialgroup change (prodh), I should accumulate the amounts of the materials in this group and show a special line with the totals.

The table of data, I give to smartforms, has also a field for the customer. When a customer changes, I should print another page and show the materials for this customer.

I have done it like that:

I have selected all data in my program and deliver the table to my smartform. In my smartform, I have added a table in my main window to show the data.

Before every line output inside the table node, I check, if the material group (prodh) has changed. If not, I´m accumulating, else I´m showing the totals in a special line. After my table I´m showing the totals for the last material group.

That is all working fine....

But now, I have tried to print only the materials for each customer, and for each, it should be processed a new page.

Therefore I have copied my first page. In the initialization, I have filled a table, which contains an entry for each customer. The field "line" is something like a key and the field "kunnr" contains the customerkey.

In my main window, I´m now selecting(before the table node) the customernumber from this table with the page-number as the key. So, on the first page, I have then the key (kunnr) of customer 1 and on the second the customer 2 and so on.....

In my table node, I´m now looping over my data table where the customer key = the customer key I get for that page.

I hope, it´s not too complicated to understand! ;o) Sorry, but it´s hard to explain.

The problem now is... it shows the data for the first customer on the first page, and I also get a second page. But on the second page, there isn´t any data shown in the table. And if I have more customers, I also get only 2 pages....

My table, I set in the initialization, is correct, I think. I´ve tested it in the program, before I´ve called the form.

Maybe somebody can see my mistake? Is it possible to debug the form? I can´t see, why it is working on the first page, but after that, it´s going worse... :o(

Thank You all for your help!

Cheers Michael