on 10-03-2007 3:05 PM
Hi there,
I have a Web Dynpro Application and I am experiencing some difficulties in mapping the Web Dynpro Context to the PDF form to get the desired result. I hope you smart people can help me.
In the Web Dynpro Context I have the following structure:
- DataSource
-
Customer (0..n)
-
-
Name
-
-
Address (0..1)
-
-
-
some attributes like Street, City, etc.
-
-
Orders (0..n)
-
-
-
some attributes like description, amount, etc
On the PDF form I want to generate 1 PDF that displays all the order details for all the customers.
In other words a high-level layout for the PDF would be:
Heading
Customer 1
-- Name and Address
-- All Orders
Customer 2
-- Name and Address
-- All Orders
...
Customer n
-- Name and Address
-- All Orders
By using a SubForm and binding the context I can easily repeat the display of all Customers, but I cannot manage to display all the orders for just a specific Customer.
I believe that I am just not finding how to setup the binding for the PDF elements correctly. If I just drag-n-drop the Order elements onto the form I get a binding in the PDF form of $record.Customer[].Orders[].amount. This does not seem to be correct.
Can any one help me with a solution to my problem? Any advice or a more advanced tutorial than the ones I've found will be much appreciated.
Many thanks,
Albertus
Hello,
Design the layout as follows.
Customer Subform -> Binding - customer[*]
|----Orders Subform -> Binding - Orders[*]
|--Descrption -> Binding - Descrption
|--Amount -> Binding - Amount
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Unfortunately I get an exception on the Orders Subform when I try that.
The error message is "The SOM expression 'Orders[*]' for the dataRef specified on field 'Orders', resolved to an incompatible node value of 'dataValue'.
I followed the tutorial "Unit: Interactive Forms Integration into Web Dynpro for
Java, Topic: Dynamically generated forms" that suggested nesting Subforms. The structure I currently have:
Customer SubForm -> <b>Type:</b> Flow Content, <b>Flow Direction:</b> Table
|--- Customer Row SubForm -> <b>Type:</b> Position Content, <b>Binding:</b> $record.Customer[*], Repeat for Each Data Item
Up to here it works and it repeats for all Customers, but the next subform is the problem. After your reply I set it up as follows:
|--- Orders Subform -> <b>Type:</b> Position Content, <b>Binding:</b> Orders[*]
|--- Description -> <b>Binding:</b> Description
But I then get the exception above. Any ideas?
Thanks,
Albertus
Thank you for the interest and the quick replies. I managed to get lucky and resolve my issue.
Basically I had to bind the subforms to a binding of None.
I now have the following structure:
Customer SubForm -> <b>Type:</b> Flow Content, <b>Flow Direction:</b> Table
|--- Customer Row SubForm -> <b>Type:</b> Position Content, <b>Binding:</b> $record.Customer[*], Repeat for Each Data Item
|- |- Customer Name -> <b>Binding:</b> Name
|- |- Orders Subform -> <b>Type:</b> Flow Content, <b>Flow Direction:</b> Table, <b>Binding:</b> None
|- |- |--- OrderRow Subform -> <b>Type:</b> Flow Content, <b>Flow Direction:</b> TableRow, Repeat for Each Data Item, <b>Binding:</b> None
|- |- |- |- Description -> <b>Binding:</b> Orders[*].Description
I still have a problem with my layout as the Customer records are not below each other, but are overlapping to some extent and the page is also not extending to create more than one page for all of the data. This is something I will need to research a bit more.
Thanks again,
Albertus
Hi Albertus/Pavan,
I have a similar requirement. I am not seeing the flow type "Table".. Is it available Designer 7.1? I am using Designer 7.1 and Adobe Reader 7.08. I am seeing all the orders of all customer against each customer. I maintained context structure and binding similar to yours. What version of designer you have used?
Thanks
Ram
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.