cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional Break / FormCalc help needed

AlexGiguere
Contributor
0 Kudos

Hi, I have very simple print based forms to do. I have to display a table with 4 columns, columns A to D by example.

My context looks something like this

Table1(0:N)

-A

-B

-C

-D

My table is already sorted by column A. I would like to do a contional break at each change of the column A. But I would like to display the column A as a header field for the breakdown instead of a column.

A1

B C D

B C D

A2

B C D

B C D

instead of

A1 B C D

A1 B C D

A2 B C D

A2 B C D

Any idea of how I can achieve this?

thanks

Alexandre Giguere

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Hello,

in most cases you can solve the problem with a simple change of your data structure (passed from backend).

If you want to have a header for each item group, why don´t you create a table of tables in ABAP and pass this into the form, where you will always see the header and the items which belong to the header (and break here if you want) etc.

If you change your data structure/ form structure/ way of thinking about the problem, it can simplify your problem a lot.

Regards Otto

AlexGiguere
Contributor
0 Kudos

Thanks guys, I will test all that today and I'll get back to you!

I'll start by the approch of Otto, if I could do it on the ABAP side I think it will be easier!

Alex

AlexGiguere
Contributor
0 Kudos

Thanks guys, I'm getting close but I still need help.

I just change my context node to now have nested table!

Actually, I am creating a reception form, this will tells what's has been shipped to your store!

I just include you some screenshots that I upload to my flickr account!

Basically, the form will contain the following information

Shipping Date (Breakdown by Shipping Date)

Store Number (store where the package came from)

Store Name

Package ID (Box) -> Handling Unit in SAP terms

Content -> Description of the Package Content

Form design

http://www.flickr.com/photos/34819919@N06/4425546374/

Form context

http://www.flickr.com/photos/34819919@N06/4424780869/

Form preview

http://www.flickr.com/photos/34819919@N06/4425546062/

What I would like!

1 - Instead of having a grouping by shipping date, I would like to only diplay the shipping date has a header for my grouping.

2 - For each breakdown of shipping date, I would like to have some space between my breakdown, I just find a way of doing it, you will see it in the screenshot of my form preview, but I still have the side line of the table from the left & right side.

On the first DataRow node, I did a conditional break on the shipping date & on the layout tab, I just add 0.3 in for the margins

Alex

thanks again

Former Member
0 Kudos

Hi Alex

Well done for changing it to this point - I think it is easier to manipulate as it is now.

However, (in my limited experience ) I find that, when working with tables in AdobeForms, the system makes certain assumptions for you, and they can be rather hard to manipulate.

I suggest chaging the 'outside' table (Table 1 in your Hierarchy) to not be a table at all... rather remove the table and replace it with a subform (not the main subform for the page - make one specifically to hold your table) and then drag or place the SHIPPING DATE field onto this subform. then, on the subform properties, set it to repeat for each data item. Then, onto this subform, place or drag the table (Table 2). This should give you what you need.

Kind regards,

Casper

OttoGold
Active Contributor
0 Kudos

Great job, will be a piece of cake from here:))

Uhm...I don´t understand 1)

about 2) you should play with the subforms structure and with the borders. I hope you have found the border tab already:)) You can use tab border and play with the inner and outer subform borders (for example use borders for your items, but not for the whole block/ date break), i think you use layout margins here. Or... you can create a blank subform, set fixed height for it and use it to do the gap for you, this one would not have any border, so there will be any border on the sides and will be the borders up and down (from the subforms with border and some content).

Regards Otto

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Having not done this, I am not sure what I am about to suggest will work... but give it a try?

For the table, set up a subform that repeats for each data item, with Positioned content. Place the 'header' that you want in the top left of this subform.

Set up another 'row' of the other fields below this (but not as a table) to look like a table, but as individual fields - rmemeber that they are on a postioned subform, so you might have to drag and drop a bit to make it look like a row.

If you leave it like that, the form should always print the header... so you will get something like

A

line 1 for A

A

line 2 for A

A

line 3 for A

etc...

Now, the tricky bit... I prefer Javascript over Formcalc (personal preference though!), and I have used code to hide fields before (thanks to some help from Otto Gold) when they ere empty:

if (this.rawValue == null || this.rawValue == "" )
	{
	this.presence = "hidden";
	}

What you could possibly do next, is in the 'Initialize' event for the form, declare a variable, maybe called lastValue (should be visible everywhere then).

Then, in the 'initialize' event of the field you put on the form for the first column (your header), adapt the above code to look something like this:

if (this.rawValue == lastValue )
	{
	this.presence = "hidden";
	}

lastValue = this.rawValue;

Who knows - may just work.

Kind regards,

Casper