Approval Query on multi-level line discounts
Hi Experts,
I have this query that is attached in the A/R Reserve Invoice> free text field that triggers different values corresponding to the to approval levels of the management. The query is triggered when a discount is manually change. Also, the free text returns a null value, if the item chosen is defined in period & volume discounts table (OSPP & SPP1).
However, the issue arises when the client creates first a Sales Quotation which has an item defined in OSPP (promo item), upon copying to RI, the FMS returns a value instead of null, especially if the item copied is a promo item.
I need help to modify this query to consider also if the item (promo) is copied from a base document.
Thanks,
Don
If CONVERT(real,$[$38.15.11]) > 0.00 AND
NOT EXISTS (
SELECT DISTINCT ItemCode FROM OSPP WHERE ItemCode = $[$38.1.11] AND ListNum=1
AND Discount <> 0.00)
OR
NOT EXISTS (
SELECT DISTINCT ItemCode FROM SPP1 WHERE ItemCode = $[$38.1.11] AND ListNum=1
AND Discount <> 0.00 AND (CONVERT(smalldatetime,$[$10.0.Date],101) >= CONVERT(smalldatetime,FromDate,101))
AND (ToDate IS NULL OR CONVERT(smalldatetime,$[$10.0.Date],101) <= CONVERT(smalldatetime,ToDate,101)))
Begin
DECLARE @discprct1 as real, @discprct2 as real
SELECT @discprct1 = 0.00, @discprct2 = 0.00
SELECT @discprct1 = ISNULL(OITM.U_DiscLimit1,0.00) FROM OITM WHERE OITM.ItemCode = $[$38.1.11]
SELECT @discprct2 = ISNULL(OITM.U_DiscLimit2,0.00) FROM OITM WHERE OITM.ItemCode = $[$38.1.11]
If @discprct2 <> 0
Begin
If CONVERT(real,$[$38.15.11]) > @discprct2 SELECT 'Level3 Approval'
ELSE
SELECT CASE WHEN (CONVERT(real,$[$38.15.11]) <= @discprct2) AND
((@discprct1 = 0.00) OR (CONVERT(real,$[$38.15.11]) > @discprct1))
THEN 'Level2 Approval' ELSE
(SELECT CASE WHEN (CONVERT(real,$[$38.15.11]) <= @discprct1) AND @discprct1 <> 0.00 THEN 'Level1 Approval' ELSE '' END)
END
End
Else
If @discprct1 <> 0
SELECT CASE WHEN CONVERT(real,$[$38.15.11]) > @discprct1 THEN 'Level2 Approval' ELSE 'Level1Approval' END
ELSE SELECT 'Level1 Approval'
End
ELSE SELECT ''
Hi Ravi,
The users don't want to restrict the whole report on a specific customer or material. The only user input variable that will be available is the customer order date.
The restriction has to be on the value of caracteristics coming from each individual sales orders that appear on the report.
Exemple: I ask for sales order for a specific date and it gives me 2 sales orders with different customers and materials:
Customer order list:
- Ord# 1000241, Cust#100, Mat #A01, $100, <b>128$, 95$</b>
- Ord# 1000244, Cust#115, Mat #B02, $100, <b>119$, 118$</b>
The amount 128$ is restricted by date, and customer #100
The amount 95$ is restricted by date, and material #A01
The amount 119$ is restricted by date, and customer #115
The amount 118$ is restricted by date, and material #B02
Thanks in advance,
Regards,
Similar Messages
-
Approval procedure in line discount
Hi Experts,
I would to ask if we can create an approval procedure when there are line discounts? If not, do we have any workaround query for this?
Thanks,
DonHi Deepak,
Thanks for the reply, but I assume that the terms and condition of the discount is only applicable to the discount footer and not on the line discounts. Can you check me on this if I'm correct?
Hi Yeni,
I am working on the query 'distinct true' however, the quey seems to be more advance since you have to capture all row discount % if any of the rows is not null. Do you have any specific query on this where I can also test?
Thanks.
Domn -
Rounding data on an approval query
Hello everyone...
As You know, taxes have increased in Mexico so we created new tax codes and accounts, and since I can't block any of the old taxcodes/acounts until all previous documents have ben closed/paid the only option I could think of was creating an approval process for all documents using the previous tax codes, since I can't create an approval query based on document lines/rows, I created it comparing the document's tax vs the document's total ($$). The old taxes were 10% and 15% these are the percentages I want to "block" using the approval process.
Here's the query I created
IF (($($27.0.number) = $($22.0.number).15) OR ($($27.0.number) = $($22.0.number).1) ) SELECT 'TRUE'
The query/approval works, but there is a problem: SBO rounds to 2 decimals, so for a $ 124.15 sale the 15% tas would be 18.6225 but the tax ammount field would show 18.62 only which by being different in 0.0025 passes the criteria...
How can I make this query work with rounded data?, I tried using round($($22.0.number)) but when then I always get a "Cannot comit transaction" error..
Thanks in advance
HugoHugo,
I am glad my suggested solution worked. I try to answer only questions that I know will work.
It does not help in answering on a trail and error basis which unfortunately happens a lot of times as the enthusiasm in answering keeps away the focus.
Depending on your decimal places definition in General Setting the numbers would be rounded.
Using CAST to Varchar will also preserve the decimals but the numeric value will get converted.
Best wishes
Suda -
For a parent item, I require all the child items that are there in multi - level BOM
Hi Hema
This query not give you exactly what you need, but can give you an idea of who to get the result you want.
select S0.ItemCode, S0.ItemName, isnull(sum(S5.Quantity * S6.AvgPrice), isnull(sum(S2.Quantity * S3.AvgPrice), S0.AvgPrice)) 'Costo del artículo'
from OITM S0 left join OITT S1 on S0.ItemCode = S1.Code
left join ITT1 S2 on S1.Code = S2.Father
left join OITM S3 on S2.Code = S3.ItemCode
left join OITT S4 on S3.ItemCode = S4.Code
left join ITT1 S5 on S4.Code = S5.Father
left join OITM S6 on S5.Code = S6.ItemCode
group by S0.ItemCode, S0.ItemName, S0.AvgPrice
order by S0.ItemCode
Hope this help you
Slds.,
Esteban -
Approval of Working Time & Multi Level CATS approval
Hi experts,
We have implemented CATS multi level approval as below.
1. In the CATS user exit we call a Workflow which is a multi level
workflow.
2. We are using the standard Webdynpro for CATS entry and approval.
Problem:
Once the first level manager(Say A) approves the timesheet work item
gets triggered for the next level approver(Say B). Since approval is a
standard webdynpro, the status of the CATS record immediately changes
from 20 to 30. So in the workflow, before sending the work item to
second level approver, we change the status of the time record back to
20 (Since it is yet to go through all approvals).
Now in the Team--> Approve working time section of the MSS, manager 'A'
still sees the record for approval, even though now the approval is
pending from 'B'. Moreover 'A' can approve this item as well (which
should not be the case).
Please provide a solution so that 'A' will not have the working time
item in his 'Working time section' after the A approves it in the UWL.
Thanks
KrishnaSolved it myself.
My solution is documented here.
http://learnhrabap.blogspot.com/2010/09/cats-multiple-level-approval.html
Please leave your comments if you have any better solution for multi level approval.
Thanks in advance,
Krishna -
Project Workflow Extension for Multi level approval
Hi,
We have a requirement of 2 or 3 level of approval on Project Workflow for Project Status Change. We are planning to use the Seeded extension provided by Oracle to get the Approver for Project Status Change.
The extension procedure provided pa_client_extn_project_wf . select_project_approver has only one out parameter that is Approver id. This means it's only possible 1 level of approval.
Please help me to find out the way how can i make this work for multi level Approval.
Regards,
RamHi Paul,
Thanks for your suggestion.
By comments field I'm assuming OfficeTask.Comments field. Problem is, this field is always null. I tried accessing this field in CheckExitCondition activity as well as in OnTaskCompleted but in both the cases, it was null only(I wrote comments while approving
the task).
I used a code activity within OnTaskCompleted activity and following code for accessing Comments and Description fields:
public string officeComments;
public string officeDescription;
private void TaskCOmplete(object sender, EventArgs e)
CodeActivity Sender = (CodeActivity)sender;
Microsoft.Office.Workflow.Actions.OfficeTask ofctask1 = ((CompositeActivity)Sender.Parent).Parent as Microsoft.Office.Workflow.Actions.OfficeTask;
officeComments = ofctask1.Comments;
officeDescription = ofctask1.Description;
Please tell me if I'm doing anything wrong here, I'm very new to Workflows. Also, do I need to set any specific property of officeTask for retriving comments?
Thank you -
Converting WF to Multi level approval.
Hi,
I want to convert my standard WF to go Multi Level. I dont want to make any changes in standard. How can I achieve this and make my WF approvals n rejection go Multi level Approval.
Himanshu.Hi...
What workflow are you talking about. Can you be more clear on your requirement.
If you dont want to make any changes in the workflow, but still you want mutliple approvals then i guess it will be difficult. For some workflows standard SAP has provided configuration in SAP IMG which will handle multiple approvals with a single workflow design.
Please let us know what scenario are you talking about.
Regards,
Gautham Paspala -
Escalation in multi-level approval
Hi all,
I have created a release workflow for an RFQ.I have used a rule to send mails for approval to different release levels
The escalation scenario follows :
If an L1 doesn't respond to the approval mail in 5 days, I need to send it to the next level(i.e L2) for release level L1 + L2 approval.
How do I proceed further for the escalation scenario.
Any input would be helpful
Thanks,
nsp.Hi
Thanks for the reply.
What is the rule which i need to use in deadline monitoring to send the escalation mail to the L2 approver if L1 doesn't respond
Regards,
nsp. -
Query on FI AP:Line item Cube
Hi bw guys i have one query on FI AP:Line item cube(ZFIAP_C03).The cube is customised and it resembles the business content cube 0FIAP_C03.I would like to know that what is the use of the customised cube (ZFIAP_C03).What does the cube analyse and what are the fields that are based on the factor that the cube analyses.
for example the cube 0SD_C03 is a sales overview cube and it is used to analyse actual sales at the following levels
company code
sales org
sales district
region
sales office
sales employee.
i would like to know that what does a FI AP:Line item cube(ZFIAP_C03) analyses and what are the levels that the cube analyses
the characteristics in the cube ZFIAP_C03 are
Company code
Branch
Dunning area
Dunning level
Last dunned
Clearing
Payment method
Reason code
Terms of Payment
Cash discount 1
Cash discount 2
Net due date
Net due date
Chart of accounts
G/L Account
Document Date
Document no.
Document type
Item
Item Status
Posting date
Posting key
The keyfigures are
Amount
Cash discount amount
Credit amt in FC
Credit amt in LC
Debit amt in FC
Debit amt in LC
Debit/Credit Amount
Discount amt
Discount base
Thank You.It looks almost identical to the std content AP cibe and s used to analyse vendor payables
Ie creditors balances and the ageing of them and the dat aoriginates from BSIK and BSAK inside R3 -
Dear all,
I want to set an approval for purchase order document. but there is one condition, the purchase order should only go for approval when they are belonging two item groups (kitchen and crockery item groups).
Please help me in writing the query.
Thanks & Reagrds
Tavargeri GaneshDear Tavargeri Ganesh,
Unfortunately, your required query can not be created because that info is not on the header but in the row level. The possibility could be if your approval depend only the first line item.
Thanks,
Gordon -
LightSwitch HTML multi-level tile navigation menu
I am working on a multi-level tile navigation system for the LS HTML client. The idea is to have tiles on the home screen that when tapped navigate to a lower-level screen with more tiles that eventually lead to browse screens with the actual LS data.
Here is what I have so far (simplified of course). Looking for suggestions on how to improve this. TIA!
Home navigation tiles (these tiles appear on the application Home Screen)
-Orders - tap goes to Orders Home screen with additional tiles.
-Customers - tap goes to Customers Home screen with additional tiles.
-Lookups - tap goes to Lookups Home screen with additional tiles.
Order Navigation Tiles (these tiles appear on the Order home screen)
-Orders (search/browse Orders)
-Returns (screen based on a modeled query of Orders)
-other tiles for screens based on modeled queries of Orders
Customer Navigation Tiles (these tiles appear on a Customers home screen)
-Customers (search/browse Customers)
-other tiles based on modeled queries of Customers
Lookup Navigation Tiles
- Each tile links to a browse screen for one of the lookup tables.
>>>>
(didn't create an image/icon for this yet)
>>> ItemTap leads to a browse screen for "Test Records".
To power this menu system, there is a database table MenuTiles.
MenuTiles:
Title
Description
ScreenId
MenuGroup choicelist
-HomeGroup
-OrderGroup
-CustomerGroup
ImageFileName (contains the name of the static image file for the tile)
I have three modelled queries to get the tiles associated with each group. The Home Screen gets its tiles from a modelled query selecting the tiles with MenuGroup == HomeGroup. The other screens work the same way respectively.
The Home screen has the following js. The other screens have similar methods.
myapp.Home.ImageFileName_render = function (element, contentItem) {
contentItem.dataBind("value", function (newValue) {
var newFileName = newValue;
if (newFileName !== null && newFileName !== undefined) {
element.innerHTML = "<image src='Content/Images/Tiles/" + newFileName + ".png'>";
myapp.Home.MenuTilesHomeGroup_ItemTap_execute = function (screen) {
var entity = screen.MenuTilesHomeGroup.selectedItem;
var modelItem = entity.details.properties["ScreenId"].value;
if (modelItem !== null && modelItem !== undefined) {
myapp.showScreen('Browse' + modelItem);
This all seems to work well. The databind on the ImageFileName keeps the images updated on the screen if they are added or changed. The ItemTap_execute function correctly navigates to a lower level navigation screen or a browse screen for the
appropriate entity collection.
The problem I have with it is it seems to rely on magic strings and that sort of thing. For example, if the ScreenId does not match the name of a screen it will error. If the ImageFileName does not match an image in the folder, it shows the default
placeholder. Is there a better way to do this?Nice Job Hessc! I also like Dales tile menu that Dave mentioned.
For a look at another example, albeit not multi-level, see how
syncfusion does tiles in this demo:
Javascript
myapp.Home.ScreenContent_render = function (element, contentItem) {
TileCreation(element, contentItem);
$(".tile-li").on("click", function (args) {
var screen = args.currentTarget ? $(args.currentTarget).attr('data') : "";
myapp.showScreen(screen);
function TileCreation(element, contentItem) {
var SampleList = [
{ imgClass: "Editor", sampleName: "Editors", screenName: "BrowseEmployeeInfo" },
{ imgClass: "DatePicker", sampleName: "DatePicker", screenName: "DatePicker" },
{ imgClass: "DateTimePicker", sampleName: "DateTimePicker", screenName: "DateTimePicker" },
{ imgClass: "TimePicker", sampleName: "TimePicker", screenName: "TimePicker" },
{ imgClass: "Editor", sampleName: "TextBoxes", screenName: "TextBoxes" },
{ imgClass: "RichTextBox", sampleName: "RichTextEditor", screenName: "RichTextEditor" },
{ imgClass: "AutoComplete", sampleName: "AutoComplete", screenName: "AutoComplete" },
{ imgClass: "DropDownList", sampleName: "DropDownList", screenName: "DropDownList" },
{ imgClass: "Slider", sampleName: "Slider", screenName: "Slider" },
{ imgClass: "ProgressBar", sampleName: "ProgressBar", screenName: "ProgressBar" },
{ imgClass: "grid", sampleName: "Grid", screenName: "Grid" },
{ imgClass: "Chart", sampleName: "Chart", screenName: "Chart" },
{ imgClass: "CircularGauge", sampleName: "CircularGauge", screenName: "CircularGauge" },
{ imgClass: "LinearGauge", sampleName: "LinearGauge", screenName: "LinearGauge" },
{ imgClass: "DigitalGauge", sampleName: "DigitalGauge", screenName: "DigitalGauge" },
{ imgClass: "TreeMap", sampleName: "TreeMap", screenName: "TreeMapFlatCollection" },
{ imgClass: "Maps", sampleName: "Maps", screenName: "Maps" },
{ imgClass: "RangeNavigator", sampleName: "RangeNavigator", screenName: "RangeNavigator" },
{ imgClass: "BulletGraph", sampleName: "BulletGraph", screenName: "BulletGraph" },
{ imgClass: "ReportViewer", sampleName: "ReportViewer", screenName: "ReportViewer" }
var root = $('<ul class="tile-ul"></ul>'), content = "";
$(element).append(root);
$(SampleList).each(function (i, val) {
content = "<li class='tile-li' data='" + val.screenName + "'> " +
"<div><span class= 'innerList tile-img " + val.imgClass + "'>" + "</span>"
+ "<span class= 'innerList tile-txt'>" + val.sampleName + "</span></div>"
+ "</li>"
$(root).append(content);
// to remove screen display name in layout
$(".msls-label").remove();
CSS:
/*Sample Layout design CSS*/
ul.tile-ul {
list-style-type: none;
margin: 30px 0;
padding: 0;
li.tile-li {
float: left;
font-size: 16px;
height: 157px;
width: 157px;
li.charttile-li {
float: left;
font-size: 16px;
height: 157px;
width: 157px;
li.charttile-li span.tile-img {
border: 1px solid #606161;
display: block;
height: 100px;
margin: 0 auto;
width: 100px;
background- center;
background-repeat: no-repeat;
background-color: #282827;
.charttile-li > div {
text-align: center;
li.charttile-li span.tile-img:hover {
border: 1px solid #606161;
background-color: #474747;
li.charttile-li span.tile-img:active {
border: 1px solid #606161;
background-color: #191818;
li.charttile-li span.tile-img.Chart {
background-image: url("SampleImg/Chart.png");
li.gridtile-li {
float: left;
font-size: 16px;
height: 157px;
width: 157px;
li.gridtile-li span.tile-img {
border: 1px solid #606161;
display: block;
height: 100px;
margin: 0 auto;
width: 100px;
background- center;
background-repeat: no-repeat;
background-color: #282827;
.gridtile-li > div {
text-align: center;
li.gridtile-li span.tile-img:hover {
border: 1px solid #606161;
background-color: #474747;
li.gridtile-li span.tile-img:active {
border: 1px solid #606161;
background-color: #191818;
li.gridtile-li span.tile-img.grid {
background-image: url("SampleImg/grid.png");
.tile-li > div {
text-align: center;
li.tile-li span.tile-img {
border: 1px solid #606161;
display: block;
height: 100px;
margin: 0 auto;
width: 100px;
background- center;
background-repeat: no-repeat;
background-color: #282827;
li.tile-li span.tile-img:hover {
border: 1px solid #606161;
background-color: #474747;
li.tile-li span.tile-img:active {
border: 1px solid #606161;
background-color: #191818;
li.tile-li span.tile-img.Editor {
background-image: url("SampleImg/Editor.png");
li.tile-li span.tile-img.grid {
background-image: url("SampleImg/grid.png");
li.tile-li span.tile-img.Employee {
background-image: url("SampleImg/EmpManage.png");
li.tile-li span.tile-img.CircularGauge {
background-image: url("SampleImg/Radial Gauge.png");
li.tile-li span.tile-img.DigitalGauge {
background-image: url("SampleImg/Digital Gauge.png");
li.tile-li span.tile-img.LinearGauge {
background-image: url("SampleImg/Linear Gauge.png");
li.tile-li span.tile-img.Chart {
background-image: url("SampleImg/Chart.png");
li.tile-li span.tile-img.RangeNavigator {
background-image: url("SampleImg/RangeNavigator.png");
li.tile-li span.tile-img.BulletGraph {
background-image: url("SampleImg/BulletGraph.png");
li.tile-li span.tile-img.TreeMap {
background-image: url("SampleImg/TreeMap.png");
li.tile-li span.tile-img.Maps {
background-image: url("SampleImg/Maps.png");
li.tile-li span.tile-img.ReportViewer {
background-image: url("SampleImg/ReportViewer.png");
li.charttile-li span.tile-img.MultipleAxes {
background-image: url("SampleImg/MultipleAxes.png");
li.charttile-li span.tile-img.Chart3D {
background-image: url("SampleImg/Chart3D.png");
li.charttile-li span.tile-img.LiveChart{
background-image: url("SampleImg/LiveChart.png");
li.charttile-li span.tile-img.CombinationChart {
background-image: url("SampleImg/CombinationChart.png");
li.charttile-li span.tile-img.DrillDown {
background-image: url("SampleImg/DrillDown.png");
li.gridtile-li span.tile-img.FlatGrid {
background-image: url("SampleImg/FlatGrid.png");
li.gridtile-li span.tile-img.Exporting {
background-image: url("SampleImg/Exporting.png");
li.gridtile-li span.tile-img.Summary {
background-image: url("SampleImg/Summary.png");
li.gridtile-li span.tile-img.ColumnTemplate{
background-image: url("SampleImg/ColumnTemplate.png");
li.tile-li span.tile-img.DatePicker {
background-image: url("SampleImg/DatePicker.png");
li.tile-li span.tile-img.DateTimePicker {
background-image: url("SampleImg/DateTimePicker.png");
li.tile-li span.tile-img.TimePicker {
background-image: url("SampleImg/TimePicker.png");
li.tile-li span.tile-img.RichTextBox {
background-image: url("SampleImg/RichTextBox.png");
li.tile-li span.tile-img.AutoComplete {
background-image: url("SampleImg/AutoComplete.png");
li.tile-li span.tile-img.DropDownList {
background-image: url("SampleImg/DropDownList.png");
li.tile-li span.tile-img.Slider {
background-image: url("SampleImg/Slider.png");
li.tile-li span.tile-img.ProgressBar {
background-image: url("SampleImg/ProgressBar.png");
.e-handle.e-select.ui-link {
margin: 0 0 0 -16px !important;
width: 28px !important;
height:17px !important;
.msls-label {
margin-bottom: 8px;
.innerList.tile-txt {
display: block;
word-wrap: break-word;
font-family: 'Segoe UI';
font-size: 14px;
color: #cececd;
margin-top:5px;
.innerList.tile-txt:hover {
color: #bababa;
.innerList.tile-txt:active {
color: #eaeaea;
.msls-header .msls-header-area {
padding: 2px 25px;
.msls-title-container .msls-title{
padding-top:2px;
h1.msls-title .msls-text-container, .msls-control-header .msls-text-container {
letter-spacing: 1px;
white-space: pre-line;
.ui-body-a, .ui-overlay-a {
background: none repeat scroll 0 0 #111111 !important;
.msls-dialog-inner-frame.ui-body-a.msls-rows-layout {
background: none repeat scroll 0 0 #111111 !important;
.msls-footer.ui-footer.ui-bar-a {
background-color: black !important;
.msls-dialog-inner-frame {
border-color:#484848 !important ;
.ui-header-fixed, .ui-footer-fixed {
z-index:0;
.msls-content {
padding-top:8px;
#msls-id-app-loading {
border-top-width:1px;
.msls-label.msls-label-align-left {
padding-top:7px;
.msls-tabs-container.ui-corner-all.ui-controlgroup.ui-controlgroup-horizontal {
padding-top: 12px;
@media (min-width: 320px) and (max-width:470px) {
li.tile-li, li.gridtile-li, li.charttile-li{
height: 150px;
width: 140px;
.msls-header .ui-title {
color: #eee;
font-family: "Segoe UI";
font-size: 13px;
@media (min-width: 480px) {
li.tile-li, li.gridtile-li, li.charttile-li{
height: 150px;
width: 147px;
Some things to notice are CSS classes are used to assign images and since it renders straight <UL> in a custom control, it prevents rendering all the extra DOM elements that LS tile list has - might make some customizations of look & feel
easier.
HTH,
Josh -
Approval Query for AP Invoices Containing Budget Related GL Account
Hi Experts,
I would like to create a approval template for all AP invoices that include a GL account that is related to the budget. Can you please help me with the approval query?
Thank you!
JaneHello Gordon Du,
"B1 approval will only apply to document level. If you want to check line level, only the first line can be subjected to."
I was thinking to trigger the approval process based on a document (AP invoice) containing relevant cost centres on a line by line basis as entered via one of the enabled dim fields.
Writing a trigger query for each cost centre effected? This does not appear to be a good solution, what is a better direction. Is there another way? (PO are not yet used via SAPB1)
Currently my invoices add, but do not trigger the approval process based on my attempts thus far.
Can the originator manually choose an approval pathway?
If this is against posting etiquette delete and advise.
I am a relative newbie to SAP B1, so am happy to be pointed to relevant help files. I arrived via google searching and arrived here.
Thankyou. -
Need a multi-level control break report displaying a cross-tab for each ...
I need a multi-level control break report that displays a cross-tab report for each
detail and subtotal. The individual cross-tabs are no problem. There are two issues:
1) How to get many cross-tabs (thousands) to appear in one report.
2) How to provide cross-tabs in-line on the multi-level subtotal lines.
Here is a concrete example.
Suppose the data base contains this table:
road (
id_number number, -- this is an artificial PK
city varchar2,
county varchar2,
state varchar2,
length number,
owner varchar2, -- roads may be owned by cities, counties, states, and others
surface_type varchar2 -- the surface type may be gravel, asphalt, concrete, and others
The table is populated with several million records that include every
length of road in a US city.
It is OK to suppose that all the attributes in all the records are not null.
Without the PK, there would be millions of duplicates,
which should all contribute to the summed lengths.
The report I need is like a control break report with a detail line for each
city together with subtotals for each county and state and
a grand total for the US at the end.
However, each detail and total line needs to be a cross-tab report
summing the length over the city, county, state or US
(whichever is called for at that location)
for each combination of owner and surface_type.
so the report would have the following structure:
a city cross-tab for the first city in county 1/state 1
a city cross tab for the last city in county 1/state 1
a cross-tab for count 1
a city cross tab for the first city in county 2/state 1
a city cross tab for the last city in county 2/state 1
a cross tab for state 1
a cross-tab for the US
Any suggestions will be appreciated.
This problem comes up because my client's legacy system,
which is being replaced,
already has such a report (in COBOL).
Thanks!!!
Steve
PS, I know one ugly way to do it. Namely, make a variable for each
possible combination of owner and surface. Then code an ordinary control
break report. However, I am looking for something better.Hi Jenna_Fire,
According to your description, you have a matrix contains total for each group on each level. Now your requirement is, when you click on any number (data field or total), it will go to the detail report which returns all the detail information of the people
within the group scope. For example, if you click on the total of Active users in United States, it will return the detail information of Active users in New York and Texas. Right?
In this scenario, we should set the parameter (@Country, @State, @City) allow multiple values in both main and detail report. And in Default Value (@Country, @State, @City), query out all distinct values. In the textbox which contains
those total values, when set use these parameters to run the report, we only need to pass the parameters of parent groups. For example, if we click on the total of Active users in New York, we only need to pass Country, State, Status to detail report, and
in the detail report, the City parameter will use all distinct values (Default Values) because we don't pass the City parameter. We have tested this case with sample data in our local environment. Here are steps and screenshots for your reference:
1. Create parameter Country, State, City and Status in both main report and detail report. Set both Available Value and Default Value get values from query (Create a dataset for each parameter, use "select distinct [column] from [table]" as query). Set allow
multiple values for parameter Country, State and City in both reports.
2. In corresponding textbox, pass appropriate parameters in go to report Action.
4. Filter data in detail report (in where clause or using filters).
5. Save and preview. It looks like below:
Reference:
Using Parameters to Connect to Other Reports
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Issues passing drillthrough parameters from a multi-level tablix in SSRS 2008 R2
Hello,
I am really struggling with trying creating a drillthrough report that starts with a matrix (tablix) and passing those parameters. I am using SSRS 2008 R2.
Here's my scenario:
I have a matrix that has mulitple levels where you can drill down. Here an example with all the levels open:
Active
Term
Leave
Total
128
88
121
United States
110
80
85
New York
65
30
57
Manhattan
10
6
9
Buffalo
20
23
4
Albany
35
1
44
Texas
45
50
28
Dallas
40
30
22
Houston
5
20
6
France
18
8
36
Centre
18
8
36
Blois
7
2
8
Druex
6
1
15
Tours
5
5
13
I want to drillthrough to another report - Detail Report. As I understand it, I would click the 65 for New York and I would see the detail for the 65 Active people. If I click the 2 under Blois, I would see the 2 terminated people in Blois. My understanding
for this to work, the Detail Report would need a a parameter for each of the level possibilities in the matrix that I could click: Country, State, City as well as the Status (Active, Term, Leave).
While I understand about passing parameters, what I don't understand is how to pass the parameters if they are blank. Let's say I clicked 65 for New York, I would need to pass State = New York Status = Active. But the remaining parameters (Country
and City would be null). I know Country doesn't need to be Null in this case.
My Detail Report has the parameters defaulted to Null, but whether I put the parameters in a Filter for the dataset or in the query itself, I cannot get it to ignore the Nulls.
As a crazy work-around (I think) I can put in the Where of the query something along the lines of: this:
and (a.Country in (@paramCountryCode) or NULL in (@paramCountryCode) )
and I would need to do that for each parameter. Usually I have to use 'ALL' instead of NULL, I'm note sure why.
Additionally, in the Report Action of the Main Report, I need to pass those parameters for each level and their Status. I am also not clear whether or not I need to put in all the parameters on each of the levels (Country, State, City) of the matrix. And if
I do, do I need to make the expressions an IIF statement stating whether or not they are In Scope?
All the examples I was able to find, only showed one or maybe two parameters being passed. Doing the way I am trying, seems convoluted, error-prone and tedious. I really hope that I am wrong.
Is there a better way to approach drilltrough reports from a matrix when there are multiple levels?
Thank you for the help.
~JHi Jenna_Fire,
According to your description, you have a matrix contains total for each group on each level. Now your requirement is, when you click on any number (data field or total), it will go to the detail report which returns all the detail information of the people
within the group scope. For example, if you click on the total of Active users in United States, it will return the detail information of Active users in New York and Texas. Right?
In this scenario, we should set the parameter (@Country, @State, @City) allow multiple values in both main and detail report. And in Default Value (@Country, @State, @City), query out all distinct values. In the textbox which contains
those total values, when set use these parameters to run the report, we only need to pass the parameters of parent groups. For example, if we click on the total of Active users in New York, we only need to pass Country, State, Status to detail report, and
in the detail report, the City parameter will use all distinct values (Default Values) because we don't pass the City parameter. We have tested this case with sample data in our local environment. Here are steps and screenshots for your reference:
1. Create parameter Country, State, City and Status in both main report and detail report. Set both Available Value and Default Value get values from query (Create a dataset for each parameter, use "select distinct [column] from [table]" as query). Set allow
multiple values for parameter Country, State and City in both reports.
2. In corresponding textbox, pass appropriate parameters in go to report Action.
4. Filter data in detail report (in where clause or using filters).
5. Save and preview. It looks like below:
Reference:
Using Parameters to Connect to Other Reports
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Multi level attribute form LDAP
multi level attribute form LDAP
I am trying to write an custom mapping to use to retrieve a value from a multialued field in LDAP (nsRole). Has anyone done this before?
Rigth now all my mappings are 1:1. However the goal is to get a 1 : M and parse thru it till i get the desied value (1:1)Darwin Hammons - Assurant
2:44pm, May 17
Great conversation. I have a very similar question about the use of the custom JAVA mappings with the LDAP Login process. I want to include an additional (event) step in the login process. Does anyone have an example or experience with a custom Java Class mapping that can use an LDAP attribute (location) queriing the data to execute an event that populates an RequestCenter OU or Group if the person login location equal say " Argentina" ? Looking for a way to manage / build catalog entitlements during login. Suggestions ?
Great conversation. I have a very similar question about the use of the custom JAVA mappings with the LDAP Login process. I want to include an additional (event) step in the login process. Does anyone have an example or experience with a custom Java Class mapping that can use an LDAP attribute (location) queriing the data to execute an event that populates an RequestCenter OU or Group if the person login location equal say " Argentina" ? Looking for a way to manage / build catalog entitlements during login. Suggestions ?
Anthony Erickson
2:52pm, May 18
Hi Darwin,
We're about to embark on a piece of work with newScale which would be similar to this to support our Multilingual catalogue. I'll provide any updates I'm able.
Thanks,
Ant
Darwin Hammons - Assurant
3:25pm, May 18
Great, Thanks Anthony ! I hope our bringing up this topic will spark a bit of interest. The Custom Java Mapping / Directory integration is documented more with RC 9.1. It will be good to hear more about your project and use of Java mappings with LDAP Directories.
Maybe you are looking for
-
Can you import songs from an Ipod to a library in iTunes?
and, if so, how? Thanks a lot!
-
Follow-on documents are not visible in MIRO in TEST server, awsys = PRD300.
Dear Experts , The Test Server was refreshed around mid-June 2011 with data of Production Server. The follow-on documents are not visible for the invoice documents in MIRO in TEST server due to value in tables BKPF,RBKP : field : AWSYS = PRD300 . The
-
Hi all!Well i have connected my macbook pro with hdmi cable to my TV Samsung LED 26 but the screen does fit properly!Is there any solution or i have to run it i a clamshell mode to fit properly!please help me!Thanks!
-
I have a notebook and a tower PC, both running XP Professional SP3. Both run Firefox 16.0.1. I prefer Firefox to any other browser I have tried and have had very few problems. However, the Firefox on the notebook will only download .pdf files. I chec
-
A fake security program claimed corruption, and when it was deleted it left both FF and IE with the Proxy Server enabled. When the Proxy was disabled, IE works but FF is failing to display many page components. Warning in the Error Console have probl