cancel
Showing results for 
Search instead for 
Did you mean: 

Empty rows in Adobe Offline Form

Former Member
0 Kudos

Experts,

I generated a adobe offline interactive form.

It has got a dynamic table with pre loaded data.

My problem is the pdf is getting generated with data but I am seeing additional two empty rows getting displayed.

Can anyone suggest me a way to avoid it.

thanks

Vijai

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Omkar & Otto,

I was busy with some other work so I was not able to reply to your responses.

Actually I have changed the layout of the screen as well as I have deleted the Text Box and inserted a new one and did the binding.

Now it works fine. I think it is a problem with the binding. There was 2 bindings for that particular textbox which I could not see.

Now after inserting a new text box control, it works fine.

Thanks to you for your valuable time

Regards

Vijai

Former Member
0 Kudos

Hi,

Few possiblilites:

1. The rows might be coming while you preload the data.

2. Same data view field is binded to 2 different fields in a single row of the table.

I know the second case is weird .. But I have seen it happen.

Thanks & Regards,

Omkar Mirvankar.

Former Member
0 Kudos

Omkar,

Thanks for the reply.

I checked the internal table before calling interactive forms. There are only 3 records, but when the interactive form gets generated it comes as 6 rows, 3 filled with data and 3 empty rows at the end.

I deleted the bindings and rebinded them, but it did not help.

Regards,

Vijai

Former Member
0 Kudos

Hi,

What about the second possibility , i.e.

Say you want to have country dropdown in the table row for both Starting country and destination country .. You are bound to use the same binding in the the 2 dropdowns to get the country dropdown.

This results in adding a extra row to the table.

I hope I am clear else do let me know.

Please check and revert.

Former Member
0 Kudos

Omkar,

No I am not binding any object tiwce.

regards

vijai

Former Member
0 Kudos

Hi Vijay,

Write a simple script..check where Field.ramValue = null then hide it.i think this will work

Thanks,

Madhukar

Former Member
0 Kudos

Hello,

Then we have to go about by checking if any mandatory field is initial or not and delete the row accordingly.

Thanks & Regards,

Omkar Mirvankar.

Former Member
0 Kudos

Madhukar,

I tried it. But it did not help me.


if (this.rawValue == null	) 

So I thought of giving a message box to check what value is really coming.


xfa.host.messageBox("Length : " + this.rawValue )

It displayed only 3 times, for the rows that had data. It is not triggering the init event for the empty rows.

Can there be any issue with the driver program. Because the form was working fine, but when I added few more fieds to my driver program and binded it to objects in the form, this problem started to come.

Any clue?

Regards,

Vijai

Former Member
0 Kudos

Hi,

I have found the reason, but does not know how to solve it.

Actually I am passing a internal table to the form.


TYPES: BEGIN OF st_questions,
       seqnr       LIKE grpcsquestions-seqnr,
       question_id LIKE grpcqlibrary-question_id,
       question_tx TYPE GRPC_TEXT_STR,
       ans_rem     LIKE grpcqlibrary-isactive,
       answer      TYPE GRPC_TEXT_STR,
*       ans_text    TYPE GRPC_TEXT_STR,
*       ans_per     LIKE grpcqlibrary-acomment,
*       ans_amt     LIKE grpcqlibrary-acomment,
*       ans_com     TYPE GRPC_TEXT_STR,
       qcategory   LIKE grpcqlibrary-qcategory,
       isactive    LIKE grpcqlibrary-isactive,
       atype       LIKE grpcqlibrary-atype,
       END OF st_questions.

I get this error when I pass all the 12 fields. If there are 3 rows in the internal table, it first displays the 3 rows with data and displays 3 empty rows.

When I remove these 4 fields (as shown above) then it works fine. The form does not display the empty rows.

Any clue?

Regards

Vijai

Former Member
0 Kudos

Hey Vijai,

Are there any dropdowns in these 4 fields ?

Also try changing the types of those fields in the internal table.

Thanks & Regards,

Omkar Mirvankar.

Edited by: Omkar Mirvankar on May 10, 2010 4:47 PM

Former Member
0 Kudos

Omkar,

These 4 fields do not involve any dropdowns.

However the field 'answer' in the internal table is mapped to a dropdown.

I was debugging the code, till the following code, I do not see any problem.


CALL FUNCTION fm_name
    EXPORTING
      /1bcdwb/docparams  = fp_docparams
      z_grpc_header      = it_header
      Z_grpc_qtable      = it_questions
      Z_GRPC_NAME        = w_taskplan_grp_nam
    IMPORTING
      /1bcdwb/FORMOUTPUT = fp_formoutput
    EXCEPTIONS
      cancel             = 1
      usage_error        = 2
      system_error       = 3
      internal_error     = 4.

Here if I open fp_formoutput, I can see the XML with only 3 rows.

But I am not sure if there is any issue when the following code is executed.


CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
  EXPORTING
    buffer     = fp_formoutput-PDF "PDF file from function module
  TABLES
    binary_tab = lt_att_content_hex.

Is there any limitation with this FM.

Regards

Vijai

OttoGold
Active Contributor
0 Kudos

Then that is probably a binding issue. The mentioned FMs cannot cause any problem regarding the content (if the content is okay before asking the first mentioned FM). Otto

Former Member
0 Kudos

Omkar & Otto:

Yes, It is a binding issue.

When I removed the Binding om the data field 'ans_com TYPE GRPC_TEXT_STR' with the corresponding text field in the layout, it works fine. No empty rows are displayed.

But I could not see anything unusual in the binding.

Thanks,

Vijai

Edited by: Thomson VijaiAnand on May 10, 2010 9:59 PM

OttoGold
Active Contributor
0 Kudos

Could you describe the binding? And both the backend and the form data structure? I cannot imagine what we deal with here. Otto

Former Member
0 Kudos

Hello,

Try changing the type of the field "'ans_com" from "GRPC_TEXT_STR" to only STRING or CHAR255( assuming this to be a long text field)

OttoGold
Active Contributor
0 Kudos

I don´t know why is that but during the years of Adobe forms development I have faced some really weird problems with the DDIC data types. For example some FI types didn´t work at all (for me) - the form could not be generated. If you don´t need any special feature connected with the type (like currency formatting etc.), I would recommend to use a simple string as mentioned. That can simplify things a lot!

Otto

Former Member
0 Kudos

Thanks Omkar & Otto,

I was busy with some other work so I was not able to reply to your responses.

Actually I have changed the layout of the screen as well as I have deleted the Text Box and inserted a new one and did the binding.

Now it works fine. I think it is a problem with the binding. There was 2 bindings for that particular textbox which I could not see.

Now after inserting a new text box control, it works fine.

Thanks to you for your valuable time

Regards

Vijai

Edited by: Thomson VijaiAnand on May 13, 2010 11:23 PM

Edited by: Thomson VijaiAnand on May 13, 2010 11:25 PM