This content has been marked as final. Show 12 replies
Tim Dexter has an excellent Blogs on subtemplates here (where you can also download example code):
I have used the example code on the Conditional Subtemplates, found here:
If you have an RTF file with just the following in:
Then have an XML file with the following in:
Then create another RTF file with the following in:
<?import:file:///E:\Example Oracle Code\TCTemplates\TCTemplates.rtf?>
(With BI Publisher, you don't even need the end call tag here) If you then load the XML in in BI Publisher and Review, you should get the word 'HELLO' displayed. With the import file string, make sure there are no blank spaces between the '\' and check by cut and pasting the directory string in Windows explorer that the RFT file is opened so you have the correct string. While developing, this import file is best on your local machine. With regard the 'inlines' syntax, I don't know - is it if you are passing in a parameter to the subtemplate?
I hope this helps, let me know if I can assist in any further way,
I am not sure, but my imports (when I use rtf files) look like: *<?import:file:C:/SUBTEMPLATES/SUBTEMPLATENAME.rtf?>*
It appears to me like BIP is simply having difficulty with your path.
I still didnot get the idea of subtemplate.
I will let you people know what i am doing.
I have two rtfs,one for subtemplate(Subtemplate.rtf) and the other for main template(main.rtf).
In Subtemplate.rtf,I have the following:
In main.rtf I have the following:-
In the header part, I have the following commands:-
In the body part,I have a command to import this:-
Now when i run this report,I get a warning saying that file is not found.
should i register this Subtemplate?If so how?
Assuming my main template(main.rtf) is under the Application Human Resources,tell me how should i register the subtemplate?
Moreever while registering this subtemplate,it asks for code-which code should i give here?
If i give the same code as my main template code ,then it says i am trying to create a duplicate?
please let me know where i am going wrong.
I presume you are just running this from BI Publisher and not running it through the Oracle Applications, so you don't need to upload the template in the XML Publisher Administrator responsibility? Therefore, try the following:
1) In the template: where you have:
change this to:
You are not passing any values to the subtemplate, so remove the 'inline' and BI Publisher can implicitley close your 'call' tag from my understanding.
2) check that when you cut and paste the directory string 'C:\Users\qewq\Desktop\Subtemplate.rtf' in Windows explorer that the RFT file is opened so you have the correct string.
Note that when actually running the Template in the application, you need to do the following:
"...In this case the subtemplate is in the c:/temp directory. Very useful when you want to test. For EBS developers, remember to change this to the 'xdo:' URI format prior to deploying".
Is that of any help?
I am running it through Oracle Applications.
So I need to upload the template right?
If I try to register that subtemplate,it asks for code.Which code should i give here?can i give any random code?
By "code" do you mean the data define short name? If so you need 'something' so I created a generic (empty) data define and use it for all my subtemplates.1 person found this helpful
Then after you get them reg on Oracle Apps you call them with:
<!-- ********** START EBS IMPORTS **************** -->
<!-- *********** END EBS IMPORTS *************** -->
Now, please note if you want to run the preview locally, or use the BIP template viewer you will need to alter your import to look more like the below statement (you will need to match your local path to the subtemplate of course):
<!-- *********** START LOCAL IMPORTS *************
*********** END LOCAL IMPORTS ************** -->
This is all covered in the Blog. I strongly suggest you read the entries on subtemplates and it should start to make more sense.
I have read both the blog on sub-templates and your reply also.
Based on this knowledge,I tried to call the sub-template from the main template and i am getting the above-mentioned error.
The code in the main template is as follows:-
This is in the header part of the main template.
In the body,I am declaring like this :- <xsl:import href="xdo://Subtemplate.en.US"/>
where "Subtemplate" is the .rtf file where the "Header" template is defined.
Please tell me where i am going wrong?
Finally my subtemplate issue is resolved.
The reason for the error was the incorrect syntax with "import" satement in the template body.
I found the correct syntax from the metalink document (DocId 420645.1)
The correct syntax to "import" a file is
Here PRODUCT_SHORT_NAME is the application short name in which the Subtemplate is registered.
Thanks a lot to you all for your prompt responses.
I have the same error:
XML-22049: (Error) Template 'hdrall' invoked but not defined
only difference is that i do not use subtemplates...
I only have 1 template (rtf) and 1 data template both registered and linked in Oracle Applications.
hdrall ... don't have a template called like that...
Regards and thanks in advance
Upload your template and xml here
we people can have look at the error :)
Thanks for the proposal vetsrini!
But in the meantime the issue is resolved.
It hadn't anything to do with my development.
The client provides us with .rtf with just empty formfields and preview text. So they can shape their documents and we provide coding logic etc.
But the customer saved the document first as an .doc and changed it afterwards to an .rtf
This produces the issue.
I just copied everything to a new document that I directly saved as an .rtf and no issue anymore.
I am working on subtemplate in XML Publisher reports. I have subtemplate.rtf which will be called in maintemplate.rtf.
1.Could you tell me how to register subtemplate.rtf in oracle applications? If yes, what is code while creating data definition and template in XML PUBLISHER ADMINISTRATOR responsibility since i can't use code of maintemplate.rtf.
2. To import the subtemplate.rtf in maintemplate.rtf, i found the following the syntax to be used in maintemplate.rtf
What is TEMPLATE_CODE in above syntax? Is it the templatename of subtemplate.rtf in Oracle Applications or subtemplate.rtf name?
It's very helpful if you can explain to me the complete procedure?
Awaiting your reply!
Thanks in advance.