Ecrion Software Inc. Homepage
Forum Home Forum Home > XF Designer > Generic Support
  New Posts New Posts RSS Feed: Help required in FO !!!!
  FAQ FAQ  Forum Search   Register Register  Login Login

Help required in FO !!!!

 Post Reply Post Reply
Author
Message / View First Unread Post
vijju View Drop Down
Newbie
Newbie
Avatar

Joined: 19 Apr 2011
Location: India
Posts: 22
Post Options Post Options   Quote vijju Quote  Post ReplyReply Direct Link To This Post Topic: Help required in FO !!!!
    Posted: 14 Sep 2011 at 6:14am

<xsl:if test="IsTopper='Y'">

 <fo:block>                                                                                                                                                                                                              <xfd:subdocument-content xfd:src="url(.\StudentGrades..xfc)" xf:dt-height="0.146in">                                                       <xfd:subdocument-parameter name="SName" value="StudentName"/>                                          </xfd:subdocument-content>                                

</fo:block>                                                                                                                                             

</xsl:if>  

<xsl:if test="IsTopper='N'">

 <fo:block>                                                                                                                                                                                                              <xfd:subdocument-content xfd:src="url(.\StudentGrades.xfc)" xf:dt-height="0.146in">                                                    <xfd:subdocument-parameter name="SName" value="StudentName"/>                                          </xfd:subdocument-content>                                

</fo:block>                                                                                                                                             

</xsl:if>  

 

The Output of the above is:

John Thomas One

John Thomas Two

But we want the output to be as follows (adding Student as prefix and appending string   , Topper for top student and  ,Non-Topper for other students):

Student  John Thomas One, Topper

Student  John Thomas Two, Non-Topper

Could someone please suggest how to modify the above code to achieve the desired output?

 Thanks in Advance !!!!

Back to Top
radup View Drop Down
Admin Group
Admin Group
Avatar
Adminstrator

Joined: 19 May 2008
Posts: 90
Post Options Post Options   Quote radup Quote  Post ReplyReply Direct Link To This Post Posted: 14 Sep 2011 at 7:35am
Hi vijju,

You can pass IsTopper as parameter to the component. You nee just to modify your component to write if is "Topper"  or not. And you will have something like this:
<fo:block>
<xfd:subdocument-content xfd:src="url(.\StudentGrades..xfc)" xf:dt-height="0.146in">
<xfd:subdocument-parameter name="SName" value="StudentName"/>
<xfd:subdocument-parameter name="IsTopper" value="IsTopper"/>
</xfd:subdocument-content>
</fo:block>


Back to Top
vijju View Drop Down
Newbie
Newbie
Avatar

Joined: 19 Apr 2011
Location: India
Posts: 22
Post Options Post Options   Quote vijju Quote  Post ReplyReply Direct Link To This Post Posted: 14 Sep 2011 at 7:59am
Hi Radup,
 
Thanks for the prompt reply.
 
Is it not possible to concatinate the required strings in the block itself, i.e.,without modifying the component?
 
Thanks !!!
Back to Top
radup View Drop Down
Admin Group
Admin Group
Avatar
Adminstrator

Joined: 19 May 2008
Posts: 90
Post Options Post Options   Quote radup Quote  Post ReplyReply Direct Link To This Post Posted: 14 Sep 2011 at 8:17am
No because the component generates a paragraph break.
Back to Top
vijju View Drop Down
Newbie
Newbie
Avatar

Joined: 19 Apr 2011
Location: India
Posts: 22
Post Options Post Options   Quote vijju Quote  Post ReplyReply Direct Link To This Post Posted: 14 Sep 2011 at 8:38am
Thanks Radup.
 
I will get back to you in case of any queries.
 
Thanks a ton :)
Back to Top
vijju View Drop Down
Newbie
Newbie
Avatar

Joined: 19 Apr 2011
Location: India
Posts: 22
Post Options Post Options   Quote vijju Quote  Post ReplyReply Direct Link To This Post Posted: 15 Sep 2011 at 7:38am
Hi Radup,

Your suggestion worked. Thanks!!!

Now i can see the output in the following format (the way i required):
 
John - Topper
Mike - Topper
John Kennedy - Non Topper
 
Is there any way to display the above result in the following way (the above three results as a single string separated by ,) by modifying the component or block from which we are calling the component?
 
John - Topper, Mike - Topper, John Kennedy - Non Topper
Back to Top
radup View Drop Down
Admin Group
Admin Group
Avatar
Adminstrator

Joined: 19 May 2008
Posts: 90
Post Options Post Options   Quote radup Quote  Post ReplyReply Direct Link To This Post Posted: 15 Sep 2011 at 7:46am
Hi Vijju,

In order to  do this you need to move the repeating logic in your component, and use an "inline repeat". 


Edited by admin - 17 Sep 2011 at 7:22am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz

This page was generated in 0.141 seconds.