I am working with a PeopleSoft BI Publisher RTF template and will be working with an XML document that has multiple rows, similar to below:
<?xml version='1.0'?>
<query numrows="3" queryname="GH3_HRS_OFFER_DS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="">
<row rownumber="1">
<A.ERNCD/>
<A.EARNS_AMT>0</A.EARNS_AMT>
<A.OFFER_COMPONENT><![CDATA[BASSAL]]></A.OFFER_COMPONENT>
</row>
<row rownumber="2">
<A.ERNCD/>
<A.EARNS_AMT>0</A.EARNS_AMT>
<A.OFFER_COMPONENT><![CDATA[PROB]]></A.OFFER_COMPONENT>
</row>
<row rownumber="3">
<A.ERNCD/>
<A.EARNS_AMT>0</A.EARNS_AMT>
<A.OFFER_COMPONENT><![CDATA[SIGNON]]></A.OFFER_COMPONENT>
</row>
</query>
What I need to do is display the 1st paragraph if the data has a row with OFFER_COMPONENT = 'PROB' and I think this is working ok as-is for the first paragraph.
However I want this to function so that either the 1st paragraph above displays, or the 2nd paragraph (<?if#inlines:A.OFFER_COMPONENT<>'PROB'?>) displays, but not both.
I don't think the way I have the 2nd paragraph coded <?if#inlines:A.OFFER_COMPONENT<>'PROB'?>) will prevent this paragraph from displaying, as once it encounters a row with a value other than 'PROB' it will display this paragraph also. I want to be able to essentially test for the existence within a group (multiple rows) whether the field A.OFFER_COMPONENT ='PROB'. If one of the rows for this field does contain 'PROB' then I do NOT want the 2nd paragraph to display.
I looked online and did not readily see a way of checking for the existence of a value of a field on multiple rows, so if anyone knows a way of doing this I would appreciated it. Thanks in advance!
So you are able to check if the first paragraph needs to be printed. Nice. Now just after you print that first paragraph, you could set a global variable to true. Check xdoxslt:set_variable.
Now you only need to print the second paragraph if the value of this global variable is false.
First, for the paragraph selection, use <?if#inlines:A.OFFER_COMPONENT='PROB'?> for the first paragraph, and <?if#inlines:A.OFFER_COMPONENT<>'PROB'?> for the second paragraph. Making sure to end each if condition with an end-if
Second, I see is that you are using a lot of for-each statements for sections that will not, or should not, contain multiple rows. For example, you have this:
...only will be $for-each0.00end per hour,...
for-each is for multiple records. You are already in the row level, so there's no need to go into the row again with a for-each. Otherwise, if you need to navigate the XML Path, just use row/A.OFFER_AMT.
for-each should be used for something like an invoice or packing list lines where you want to display the same thing multiple times, like for all of the items on the invoice or packing list.
Related
I have a DataTable that I'm passing to a FlexCel report. It contains a variable number of columns, so I'm using the Full Dataset feature (e.g. <#table_name.*>).
However, only a subset of the fields are dynamically generated (I have a variable number of attachments). The column name for each attachment field starts with a common word (e.g. "Attachment0", "Attachment1", etc).
What I would like to do is output the known finite set of fields and then the variable number of attachments. It would be nice if I could write something like <#table_name.Attachment*> (and <#table_name.Attachment**>). Is there any way in FlexCel Reports I can achieve the same result?
A side benefit to such a solution means that I could keep the formatting for the known/finite set of fields.
Update
I added place holder columns to the document, each with a <#delete column> tag, so that the un-wanted columns/data are removed.
Although this works, it's not ideal. For example, if I want to see how the columns fit in the page width (in print preview), then I need to hide the columns. Then I have to remember to un-hide them again, so other developers can see/understand my handy work.
It would be much more straight forward if I could filter the fields before they're output to the document.
I realised there's an alternate way around this problem. I broke up the data into two sets of data - <#table_name.*> and <#table_name_attachments.*>.
The fixed set of fields are in the first table and the variable set of fields is in the second table (all the "Attachment*" fields). When the report is run, I place them next to each other (in the same order) in the same worksheet. This means I have two table ranges - "_table_name_" and "_table_name_attachments_" on the one sheet.
Now I'm able to run my print preview without hiding/re-showing the columns-to-be-deleted. I've also eliminated human error - it was all to easy to accidentally set the wrong number of padded/delete columns.
Hopefully someone has done this - I need a 3 column page (side-by-side) with a two column table (with the headers) to fill the three columns. The table is fairly long and I need it to wrap/continue from the first column on the page to the second column and on to the third and then continue to the next page in the same fashion. Right now I can only get the table to show in one column on the page and it continues on the next page. The final output is a printed PDF page.
Using span="all" is the way to cause some in flow content to span all the columns of a multi-column document. For brevity in answering, I am posting a picture of the XSL FO for something like this.
I don't know if its possible or not, but thought I'd ask. Many times reports need data grouping to have anchored to the bottom of the report some summary information, such as invoices. You don't want the totals shifting UPwards based on only 2 detail lines vs another with 20. I've tried working with using the Tablix bound to the data source for the output but couldn't get it quite right... It would either shift up, or force break and appear at top of following page.
So, if anyone has some ideas to help resolve that, that too would be great.
My second approach was to just use a simple report page footer. However, the overall "Report" page is not technically "BOUND" to any datasource. So, if I put a textbox in the footer and want it to show something, I can't pick "the most recent row from the datasource associated with the Tablix", it always requires an aggregate, such as
=First(Fields!SomeField.Value, "SomeDataSource" )
=Sum( ...
=Last( ...
etc...
I just want it to have whatever was the most recent... so I tried to use report variables to create one and was thinking to have it get updated per row being processed, so it always had whatever the "latest" value was and I could just dump that value at the bottom of the report.
Any suggestions to either would be great. Thanks.
I know this is an old question, but I had a very similar problem and came up with a unique solution. I had a statement that needed to have the payment slip print at the bottom of the page even if the statement line items wrapped over to another page. I solved it by:
Making all rows in the report a uniform height.
Calculating how many rows were required to fill the page (minus the height of my payment slip.
Getting the number of line items in the statement.
Calculating the remaining number of rows needed to push my payment slip to the bottom of the page.
Adding a sub-report with the calculated number of blank rows to pad out the necessary space between the line items and the payment slip.
The advantage of that approach was that I could generate bills for multiple customers, and since the padding is part of the group it would be customized for each customer's bill and bottom-justify the pay slip for each of them.
You can use a similar approach to push your "footer" info to the bottom of your page. Since it is still inside of your data group you'll have access to the data values you need as well.
In the footer you can refer to report item from report body, like this:
=ReportItems!myFooterValueTextBox.Value
The catch is that you can refer to only one report item in your footer, so you may need to add invisible footer row in your table and concatenate all your totals into one cell (myFooterValueTextBox) in that row:
=First(Fields!SomeField.Value, "SomeDataSource") + "|" +
Sum(...) + "|" + .... +
Last(...)
I used pipe as deliminator in my example, so then in the footer, I would split the string and place values in appropriate containers, like this:
=Split(ReportItems!myFooterValueTextBox.Value,"|")(0)
How to search every word separated by comma in textbox
Please refer above post
Its Working perfectly...But i have small issues.. when i enter in text box like c,c++,4-5 yrs it have to check in database like either c,c++ skills and 4-5 yrs experiecne and then the reult has to be shown... Burt as per ur query it just show results whether any one of keyword satisfy database ...I want to compare year also how? –
If you want that behavior, you have to program that behavior. One design is to have multiple input boxes: one where you check if any of the words exist, another where you check that all of the words exist. (Perhaps even another for an exact phrase match.) Another design possibility would be for you to develop a syntax to indicate optional and required words all within a single input box. The point is it is up to you.
After you've decided on a design, then you could write code that builds your query based on or matches on the optional words and and matches on the required. Something like this pseudocode
Select * From Table Where
(Field Like OptionalWord1 Or Field Like OptionalWord2 Or Field Like OptionalWord3)
And Field Like RequiredWord1
And Field Like RequiredWord2
(etc.)
Is there a way to add more than one filter on a column programmatically?
Tables("TYPE").AddFilter("Code", "<>", "OP") -- Works until then next line.
Tables("TYPE").AddFilter("Code", "<>", "MP") -- The first filter is removed.
.... I'm not cool enough to add a SatelliteForms tag.
Here is a link to the SatelliteForms.
Let me put out the disclaimer that I have no experience with SatelliteForms. However, I did comb through the SF_MobileAppGuide and based on the how the AddFilter, RemoveFilter and RemoveAllFilters methods are called, it appears that you can only have one filter per column.
This explains why when you add the second line, it merely replaces your filter instead of adding it.