This content has been marked as final. Show 6 replies
Yes, that is possible. You can use the &ITEM_NAME. syntax. Your item value should not include HTML tags though. And it should already be set in session state.
DOOOhhhh !! It's SOOO Simple!
and it works!
Thanks a LOT!
I am trying to set a variable in a PDF Header.
If I use &APP_USER. the user is dispalyed correctly
However I am trying to set the value from a text item.
My Item is called P1_TEST
It is set to Text field Disabled (Saves State)
I have set both the source value and the default value to "test item in header"
I am using &P1_TEST. in the PDF Header
I'm using Apex 3.0.1 on XE running ApacheFop/O4J
I suspect I have a state issue. Anyone point me where I'm going wrong. Thanks
Well from reading around, it looks like we need to use application level items.
So I created an application level item for todays date and that worked perfectly, except the 7 in 2007 appeared to be subscripted!
What I'm looking for is to use page level items so that I can have for example the report name in the header.
Surely, it must be possible to put a page item into a header or footer.
OK Found the problem
Ah Ok. The page apparently needs to be submitted to pick up the item values in the PDF header/footer.
But Can I pick up the items without submitting the page???
Message was edited by:
If you want to use the value of page items in your PDF page header or footer, they need to be written to session state first. In order to do this, your form needs to be submitted. So a button that redirects to a URL or a report print links (that also redirects), won't do that. But submitting your form doesn't necessarily mean you'll have to leave or refresh your current page. All you would have to do is create a branch that points to your PDF document, and make that the target of your submit action. This way, your page doesn't refresh, and you'll get the open/save PDF dialog you would expect.
So to give you an example, if you have a regular reports region, enable PDF printing, but do not specify a link label. Then create your own print button, which needs to be a submit button (not redirect to URL). And then create a branch to the current page that is executed when pressing your print button. That branch also needs this request:
FLOW_XMLP_OUTPUT_R[Report Region ID]
so if your report region ID is 90104803966374878, then the request would be:
The same technique works for report queries, only in that case you would point to page 0 and use this request:
PRINT_REPORT=[your report query name]
So if your report query name is "myreport", this would be
Hope this helps,
Thanks Marc. I tried this out and it works quite well. I had to use the apex_views to get the Region_id but hey, thats what they are there for