on 08-01-2006 11:49 AM
hi web dynrpo gurus,
I have created a application and it retrieves data from the back end R/3 system and I am creating a Interactive form based PDF to display that data.
Now my application involves two PDFs generated based on the selection of the user whether he wants to open an Invoice or a Credit Memo.
Now my problem is that the application would be configured on diffwerent protals which have different logos to be displayed.
Is there any option such that I could see that the logo is selected dynamically, based on the Portal in which it is configured.
Thanks and regards,
kris
Hi,
include the information about the used portal in the context of your interactive form. Then add a formcalc script inside the pdf form to display/ hide the required/ not required image.
Regards
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Sebastian Voss,
Thanks for the reply.
Can you be more brief on this, as I could not understand completely ur words, as how to go ahead.
I have four logos to be dispalyed in four different portals and I have one application that is being configured in all the portals.
Please guide me how to achieve that.
Thanks and regards,
kris
Kris,
1.
in your webdynpro application add all needed images to "src/mimes/Components/<component_name>".
2.
create a context attribute "imageUrl" in the value node which is used by the interactive form UI.
3.
in wdDoInit() add the following code:
try {
// determine the current portal and select the appropriate image
String logo = "xyz.gif";
String path =
WDURLGenerator.getAbsoluteWebResourceURL(
wdComponentAPI.getDeployableObjectPart(), logo);
wdContext.currentPdfSourceElement().setImageUrl(path);
} catch(WDURLException e1) {
}
4.
Add an image field to your form template and set the default binding to "None". Enter "$record.imageUrl" in the URL property field.
5.
Attach the following formcalc script to this image field:
Event: initialize
Language: FormCalc
Run At: Client
this.value.image.href = xfa.resolveNode(this.value.image.href).value;
ImageField1.access = "nonInteractive";
Regards
Sebastian
hi Sebastian,
I am getting the following error:
Script failed (language is formcalc;context is
xfa[0].form[0].BAPI_Input[0].#subform[0].ImageField1[0])
script=this.value.image.href=xfa.resolveNode(this.value.image.href).value;
ImageField1.access="nonInteractive";
Error:Argument mismatch in property or function argument
Do u have any idea how to resolve this.
Thanks and regards,
kris
Hi Experts
I was following the instructions given in the post, but unable to get desired result
I'm getting the following error:
<i>Script failed (language is formcalc;context is
xfa[0].form[0].Main[0].Session[0].Image[0])
script=this.value.image.href=xfa.resolveNode(this.value.image.href).value;
Image.access="nonInteractive";
Error:Malformed SOM Expression</i>
I've followed all steps, yet result doesn't come
I've even tried the following expression
<i>this.value.image.href=xfa.resolveNode(this.value.image.somExpression).value;</i>
Any pointers.
Thanks
Srikant
closing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.