cancel
Showing results for 
Search instead for 
Did you mean: 

How to start the Print function in webdynpro

Former Member
0 Kudos

How to start the Print Function in webdyn pro

if anybody knows explain to me one by one

i.e from the beginning.

B'cos i want to take the print

already i posted this Q?

so for i didn't get clear idea about the print

Regards

Dhinakar

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos
Dheerendra
Participant
0 Kudos

HI dhinakar jechandran ,

I think prior ans will help u most. Bust first of all u must aware of some basic Basic Concept's.

That in WebDynPro for using the Print Functionality u must use "IFRAME". Also if u have worked on JSP,Servlet or even Core Java then after seeing the following Code-Snippet u can Simple Understand what u will do for Print-Functionality in ur application......

-


1. Place IFrame UI control on WD View (we will use it to display formatted text).

2. Create in context attribute AttrContent of type binary

3. Setup binary attribute in view controller wdDoInit:

final ISimpleTypeModifiable mtype = attr.getModifiableSimpleType();

final IWDModifiableBinaryType btype = (IWDModifiableBinaryType)mtype;

btype.setFileName( attr.getName() + ".html" );

btype.setMimeType( WDWebResourceType.HTML );

5. Save reference to mtype in private controller variable, say _contentType;

6. Create string attribute AttrUrl in context, and bind IFrame source property to it.

7. Whenever you need to update content use the following:

final String formattedStr = ...; /* Get it from backend */

wdContext.currentContextElement().setAttrUrl

(

_contentType.format

(

(

"<html><head /><body><pre>" +

formattedStr +

"</pre></body></html>"

).getBytes("UTF-8")

)

);

-


Hope So it will solve ur problem 'n' don't forget to go thrgh WebDynPro API when u r developing application.

Best Regard's

Dheerendra Shukla

former_member205624
Contributor
0 Kudos

hi, dhinakar

Printing in webdynpro is not so simple

one way (not the simplest one, however) described here

Read thread down from this message.

Or you may use Adobe Form for printing.

To view the thread, visit:

regards,

jitender kumar

Former Member
0 Kudos

jitender,

I'm glad that you are refereing my answer to the very same question.

But if you found it usefull yourself why not to mention this is your own thread (at least, via reply ;)? This way other users will know that solution/advise contains something useful.

To view the thread, visit:

VS