Function in report
Hi, i created a function in my report, in the ''program unit'' and called that function in the query in data model but getting an error <invalid identifier...>, do you have any idea why this error? any help would be appreciated...Thanks.
Tabit7 wrote:
Hi, i created a function in my report, in the ''program unit'' and called that function in the query in data model but getting an error <invalid identifier...>, do you have any idea why this error? any help would be appreciated...Thanks.so, u'r function is in reports not in database. and you want to use it in sql.
1. you can only use database function in sql coz sql operates only in database table or view.
solution
1. you can create database side function to use it in sql
or 2. select the column in u'r sql, which u want to use as function parameter. Then take a formula column in u'r sql at reports and use u'r function.
Like
function CF_1Formula return Number is
begin
return salcom(:empno); --where salcom is a report side function (program unit)
end;hope this will help you..
If someone's response is helpful or correct, please mark it accordingly.
Edited by: HamidHelal on Dec 18, 2011 11:55 PM
Similar Messages
-
What is function of report designer in BI 7.0
Hi
What is the function of REPORT DESIGNER in BI 7.0
Could you please explain me a bit using LIVE Scenario
Thanksrefer this elearning class:
BEx Analyzer Report Designer Integration
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/90b95f53-7c5c-2a10-f98d-cc78ec4ec12d -
OSB11g - using Concatenation function in report key - Xpath
Hi,
I am trying to use Concatenation function on Report key Xpath. For that i am using Following Xpath Expressions But this expressions not valid when trying to validate. But same expressions are valid under different scenarios in OSB.
1.fn:concat(./bpel:process/bpel:input, ./bpel:process/bpel:input)
error msg(when validate):_
error: XPath expression invalid, not a selection: declare namespace jca = 'http://www.bea.
com/wli/sb/transports/jca'; declare namespace wsp = 'http://schemas.xmlsoap.org/ws/2004/09/policy';
declare namespace jms = 'http://www.bea.com/wli/sb/transports/jms'; declare namespace tp = 'http:
//www.bea.com/wli/sb/transports'; declare namespace wsa05 = 'http://www.w3.
org/2005/08/addressing'; declare namespace jejb = 'http://www.bea.com/wli/sb/transports/jejb';
declare namespace xs = 'http://www.w3.org/2001/XMLSchema'; declare namespace sftp = 'http://www.
bea.com/wli/sb/transports/sftp'; declare namespace flow = 'http://www.bea.com/alsb/flow/transport';
declare namespace soap-env = 'http://schemas.xmlsoap.org/soap/envelope/'; declare namespace wsu
= 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'; declare
namespace dsp = 'http://www.bea.com/dsp/transport/sb'; declare namespace ejb = 'http://www.bea.
com/wli/sb/transports/ejb'; declare namespace bpel = 'http://xmlns.oracle.
com/Bpel_Actvities/Assign_Activity/BPELProcess'; declare namespace wsa = 'http://schemas.xmlsoap.
org/ws/2004/08/addressing'; declare namespace bpel-10g = 'http://www.bea.
com/wli/sb/transports/bpel10g'; declare namespace tuxedo = 'http://www.bea.
com/wli/sb/transports/tuxedo'; declare namespace file = 'http://www.bea.com/wli/sb/transports/file';
declare namespace ctx = 'http://www.bea.com/wli/sb/context'; declare namespace fn = 'http://www.w3.
org/2004/07/xpath-functions'; declare namespace soap12-enc = 'http://www.w3.org/2003/05/soap-
encoding'; declare namespace soap12-env = 'http://www.w3.org/2003/05/soap-envelope'; declare
namespace fn-bea = 'http://www.bea.com/xquery/xquery-functions'; declare namespace mq = 'http:
//www.bea.com/wli/sb/transports/mq'; declare namespace ws = 'http://www.bea.
com/wli/sb/transports/ws'; declare namespace http = 'http://www.bea.com/wli/sb/transports/http';
declare namespace soa-direct = 'http://www.bea.com/wli/sb/transports/soa'; declare namespace email
= 'http://www.bea.com/wli/sb/transports/email'; declare namespace sb = 'http://www.bea.
com/wli/sb/transports/sb'; declare namespace ftp = 'http://www.bea.com/wli/sb/transports/ftp';
declare namespace xsd = 'http://www.w3.org/2001/XMLSchema'; declare namespace soap-enc = 'http:
//schemas.xmlsoap.org/soap/encoding/'; declare namespace xsi = 'http://www.w3.
org/2001/XMLSchema-instance'; fn:concat(./bpel:process/bpel:input, ./bpel:process/bpel:input)
2. op:concatenate(./bpel:process/bpel:input, ./bpel:process/bpel:input)
While using this Xpath expression validation is sucessfull but concatenation operation is not working when checked in the message reports under operations tab.
Can any one help me on this.
Thanks in advance.can you try assign concatenated value to some xml element first, like
assign : <value>{fn:concat(a,b)}</value> to e.g. value
and then report key ./text() in variable $value
Edited by: AigarsP on Jun 12, 2012 4:12 AM -
Hello Friends,
Here i am having two BW reports, report 1 and report 2.
I am accessing report 2 with GO TO functionality in report 1.
In report 1, we have various fields such as characteristics, attributes, navigational attributes and Key figures.
<b>My question is:</b>
So on which field (Right click to use go to function) of the report 1 is suggested to use GO TO function. what is the reason please.
Hope i am clear.
Thanks in advance..
Tony
nullHi Maithili,
Yes, you r right we can use any field to use GO TO function.
<b>But the main question is</b>
The performance (Report 2 opening time) depends up on the field on which GO TO function is used. It varies from field to field.
I have observed this in my reports.
so, which field is best suggestable to use GO TO function and why??
Thanks
Tony -
PCA Functional Area Report Problem With Co-Product Settlements
I have built a profit center functional area report for use in a manufacturing client. The reason is because the factory cost centers flow to the product cost (via costing sheets) and the administrative cost centers are expensed monthly. However, SAP seems to have no other approach to handle the issue where common expense elements must be reported in these two separate sections. Anyway, here is my problem:
After creating the functional areas and matching them to each cost center appropriately and then applying a different functional area to orders, I see that settlement of co-products causes my report to zero out the functional area that should match the overhead cost centers. These obviously should not be impacted by settlement and I see that they are not impacted in the transactional data. However, the functional area report shows a different story. I believe it somehow has to do with the unusual way that co-product split up and settle versus other types of orders. I may need some sort of subtitution rule, but like I said, the raw transactional data looks correct and the report should bring in these values.
I used ledger 8A if that helps. I am sure I missed some small thing somewhere.
DavidIt looks to me like the New G/L may have taken care of some of my issue. The FI reconciliation G/L account (690000 usually) includes the secondary cost center postings as well as the secondary order postings. The cost center side of the secondary transaction reflects the functional area for cost centers (Factory Exp or Admin Exp in my case), whereas the order side of the secondary posting shows the functional area associated with order consumption (Net Consumption in our case).
This appears to mean that the standard report for Functional Areas from FI should work to break up the income statement for manufacturing purposes. This report is S_PLO_86000029. That report looks to me like it will replace my need for a PCA based Functional Area Report.
David -
hi sap gurus,
i would like to partner function wise reports.For ex i am creating Vendor with three type of partner function .
VN Vendor Partner schema: purchasing organization level
Z1 Organizer Partner schema at vendor sub-range level
Z3 owner Partner schema: plant level.
i would like to all transaction reports through partner function wiseCreate a Query using tables
LFA1--> Main vendor
LFB1--> Company code vendor
LFM1 --> Purchase vendor details
WYT3--> Partner functions
You might use LFM1 & WYT3 for this purpose as link is between purchase vendor and Partner function you will get there.
Hope this helps. -
Calling user defined stored FUNCTIONS in report
Post Author: fahimghauri
CA Forum: Data Connectivity and SQL
Hi,
I want to call database stored functions in report, but when I connect to database using DATABASE EXPERT it shows me tables,view and stored procedures not functions. How can I import/use functions defined in database into my report?
I am connected with DB2 v9.
Thanks in advancePost Author: Krison
CA Forum: Data Connectivity and SQL
other soluce:bring your function in a view and join this view on your request. (Work only for simple return) Sample:CREATE function fn_GetAge ( @i_Name char(10) ) returns SMALLINTBEGIN declare @o_Age smallint select @o_Age from Employ where Name = @i_Name return @o_Age ENDCREATE VIEW dbo.v_UserAgeasSELECT Table2.Username, ISNULL(dbo.fn_GetAge(Table2.Username),0) as Age FROM Table2 WITH (NOLOCK)GO -
DECODE Function In Reports 3.0
Hi,
When I use the decode function in a query (Reports 3.0.5.8.0) I receive an error message "Bind Variable Does Not Exist" (ORA-1006). When I remove the decode function from the query, the query compiles fine. All table and column references are existing.
Also, the same query runs perfectly fine from SQL*Plus. The OS is Win 2000, SP2
Any idea if this is a bug? Is there any way out? Do get back as this is very urgent.
The database is Oracle 8i Ent, 8.1.7 on AIX 4.3
The query is as follows:
SELECT NAM_CMP , COD_CMP , COD_CMP_REG ,
DECODE(FLG_CMP_SHP,'Y','S/',' /') || DECODE(FLG_CMP_AGT,'Y','A/',' /') || DECODE(FLG_CMP_CNE,'Y','C',' ') TYPE ,
DES_ADD_STT , DES_ADD_PLC , DES_ADD_STA , DES_ADD_POS , COD_CTY , COD_cou_iso ,
DAT_LST_AST , DAT_LST_UPD,
cod_dcl_box_num, decode(cod_imp_chg_way,'C','CASH','CREDIT') cod_imp_chg_way,
decode(cod_imp_cre_way,'W','WEEKLY','F','FIFTEEN DAYS','M','MONTHLY', NULL) cod_imp_cre_way,
decode(flg_imp_prn_inv, 'N', null, flg_imp_prn_inv) flg_imp_prn_inv,
cod_bro_box_num, decode(cod_exp_chg_way,'C','CASH','CREDIT') cod_exp_chg_way,
decode(cod_exp_cre_way,'W','WEEKLY','F','FIFTEEN DAYS','M','MONTHLY', NULL) cod_exp_cre_way,
decode(flg_exp_prn_inv, 'N', null, flg_exp_prn_inv) flg_exp_prn_inv
FROM CMP
where dat_can is nullTry TO_CHAR(NULL) instead of NULL in all DECODE functions.
For example:
decode(cod_imp_cre_way,'W','WEEKLY','F','FIFTEEN DAYS','M','MONTHLY', TO_CHAR(NULL))
instead of:
decode(cod_imp_cre_way,'W','WEEKLY','F','FIFTEEN DAYS','M','MONTHLY', NULL). -
Print/Export on toolbar no functionality in Report viewer - please help
I am not able to get any functionality out of the toolbar icons Print and Export on the crViewer built in toolbar. When I click on the buttons I get the Yellow Java triangle in the bottom left corner. The message details is "object does not support this action"
I am using: Crystal Reports XI with all service packs. visual studio 2005 with all service packs. This is a .NET application with visual basic as the language for a web based application.
Please let me know what I need to add to get this functioning. Thanks,
In my WEB config I have:
<httpHandlers>
~some others not related to crystal
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>
<assemblies>
~others not crystal
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Enterprise.Framework, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Shared, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Enterprise.InfoStore, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="CrystalDecisions.ReportSource, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
<add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies>
In order to get the icons working I copied apsnet_client\cyctem_web\2_0_50727\crystalreportviewers115 all files and folders to my project.
I have included the path in both:
GroupTreeImagesFolderUrl="/aspnet_client/System_Web/2_0_50727/crystalreportviewers115/images/tree/" ToolbarImagesFolderUrl="/aspnet_client/System_Web/2_0_50727/crystalreportviewers115/images/toolbar/" DisplayBottomToolbar="False" HasCrystalLogo="False" />Yes, that is good info. I am still not sure if you are using custom or default websites(?).
On your development computer, open IIS (Start | Run -> Inetmgr). Is your application installed under default websites or under a custom web site?
I suspect you are using custom web site and the aspnet_client folder and it's subfolders are not included under the custom website. E.g.; default web site will use files from c:inetpubwwrootaspnet_client. Ensure that the aspnet_client folder and it's subfolders are copied under the custom website. Also, have a look at [this|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50aa68c0-82dd-2b10-42bf-e5502b45cd3a] article. It explains the aspnet_client folder and it's subfolders in some detail.
Ludek -
Error while using user defined function in reports
Hi,
When I use the below user defined function in oracle reports I got the wrong number of arguments error
select test_function(id,a_number,v_date-14,b_number) from dual;
If I remove -14 from the argument it works. But iIneed to subtract 14 days from the date.
Thanks for your help.select test_function(id,a_number,v_date-14,b_number) from dual;
you have to give the command like this to_date(v_date,'dd-mon-yyyy')-14
because the v_Date you choose in the parameter form is not having the corrent date format
the format dd-mon-yyyy is the format in which v_date is passed by the user. -
I have written a function in one of my reports. I get the error message "Element ST_ADDR is undefined in ADDRESS." when I try to run the report. My funtion looks like:
<cfargument name="ss" required="yes"/>
<CFSET variables.BoxNo = ''>
<cfquery name="qmailbox" dbtype="ODBC" datasource='#session.ds#'>
SELECT address.st_addr, address.type
FROM address
WHERE address.type = 'Campus' and address.soc_sec = '#arguments.ss#'
</cfquery>
<cfif qmailbox.recordcount gt 0>
<cfset variables.BoxNo = address.st_addr>
</cfif>
<cfreturn variables.BoxNo>
It is possible that there might not be a address.type of 'Campus' for every record passed to this function, that hy I check recordcount. I am open to any suggestions you have.
ThanksI have written a function in one of my reports. I get the error message "Element ST_ADDR is undefined in ADDRESS." when I try to run the report. My funtion looks like:
<cfargument name="ss" required="yes"/>
<CFSET variables.BoxNo = ''>
<cfquery name="qmailbox" dbtype="ODBC" datasource='#session.ds#'>
SELECT address.st_addr, address.type
FROM address
WHERE address.type = 'Campus' and address.soc_sec = '#arguments.ss#'
</cfquery>
<cfif qmailbox.recordcount gt 0>
<cfset variables.BoxNo = address.st_addr>
</cfif>
<cfreturn variables.BoxNo>
It is possible that there might not be a address.type of 'Campus' for every record passed to this function, that hy I check recordcount. I am open to any suggestions you have.
Thanks -
Using PRE Function to report field changes
Hi Everyone,
As they reporting on audit trail is not available, I was wondering if there was a work around using the PRE function (or any other way) in analytics.
We're looking to track Revenue changes with respect to Opportunities (so, if Opp A's Revenue ever changed since the first time the $ amount was submitted) - we're especially interested in reporting on weekly changes. If the weekly isn't possible, tracking any change would be helpful.
Any suggestions?
Thanks!Why not create a workflow using the PRE() function to record the changes in a Task, you could then report on that task.
cheers
Alex -
Missing Function - Aging Report not match in System Currency in SBO 8.8
Dear all,
Version: (Please provide the current version)
SBO 8.8 Patch: 10
Description of requirements: (Please provide a detailed description)
In mentioned patch level, the result/outstanding balance of Aging Report in System Currency was difference when selected 'Display Reconcilied Transactions' or not. The outstanding balance should be be same on both selection.
Valid as of: (Date that this legal requirement is applicable)
N/A
Business needs: (Please describe the impact on your business, if the functionality is not realized)
If the Aging Report cannot disppay the outstanding documetns for reconcile with customer, they cannot check with customers.
Examples: (Please describe a typical example, how the functionality should work.)
Generate the Aging report in System Currency
selected 'Display Reconcilied Transactions' including all transactions and balance is same as Trail Balance
un-selected 'Display Receoncilied Transactions' does not inclding the transactions that Local Currency is zero amount, but System Currency is not zero. The outstanding balance is different to the result of the above selection and Trail Balance as well.
Current Workaround: (Please describe the workarounds you are using at the moment)
Print the Aging Report with selected ' Display Reconcilied Transactions' to show ALL transactions to reconcile the transactions.
Proposed solution: (Please suggest how the new functionality should work)
selected 'Display Reconciled Transactions' or not, the outstanding balance should be the same.
Best regards,
MichaelBapi's do not set sy-subrc. The only way to check if it was succesfull is to loop into the return table for error messages:
You have to use BAPI_TRANSACTION_COMMIT after calling BAPI_PO_CREATE1:
READ TABLE errmsg TRANSPORTING NO FIELDS
WITH KEY type = c_e.
IF NOT sy-subrc IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
ENDIF. -
Median function in report builder 3.0
I need to perform median calculation in MS Report Builder 3.0, could anyone explain how I could achieve it considering my original value are
Region - Etab - Value
Abc - Def - 10
Abc - Def - 12
Ged - Tae - 1
I need to group by Region and Etab.
I've already built a SQL query to get the Median, but I would like to be able to use Report Builder grouping for usability.I've managed to get the proper values using hashtable the following way :
Dim theHashTable As New System.Collections.Hashtable
Function AddValue(theRapport As String, theRegion As String, theEtab As String, theRow As String, theValue As String) As Integer
Dim num As Integer
num = 0
If (theHashTable Is Nothing) Then
theHashTable = New System.Collections.Hashtable
End If
If Integer.TryParse(theValue, num) Then
If (num >= 0) Then
If (theHashTable.ContainsKey(theRapport)) Then
Dim regionHT As New System.Collections.Hashtable
regionHT = theHashTable(theRapport)
If (regionHT.ContainsKey(theRegion)) Then
Dim etabHT As New System.Collections.Hashtable
etabHT = regionHT(theRegion)
If (etabHT.ContainsKey(theEtab)) Then
Dim valueHT As New System.Collections.Hashtable
valueHT = etabHT(theEtab)
If (Not valueHT.ContainsKey(theRow)) Then
valueHT.Add(theRow, theValue)
End If
etabHT(theEtab) = valueHT
Else
Dim valueHT As New System.Collections.Hashtable
valueHT.Add(theRow, theValue)
etabHT.Add(theEtab, valueHT)
End If
regionHT(theRegion) = etabHT
Else
Dim etabHT As New System.Collections.Hashtable
Dim valueHT As New System.Collections.Hashtable
valueHT.Add(theRow, theValue)
etabHT.Add(theEtab, valueHT)
regionHT.Add(theRegion, etabHT)
End If
theHashTable(theRapport) = regionHT
Else
Dim regionHT As New System.Collections.Hashtable
Dim etabHT As New System.Collections.Hashtable
Dim valueHT As New System.Collections.Hashtable
valueHT.Add(theRow, theValue)
etabHT.Add(theEtab, valueHT)
regionHT.Add(theRegion, etabHT)
theHashTable.Add(theRapport, regionHT)
End If
End If
End If
Return num
End Function
Function GetMedian(theRapport As String, theRegion As String, theEtab As String) As String
Dim arrayInt As New System.Collections.ArrayList
arrayInt = GetArray(theRapport, theRegion, theEtab)
arrayInt.Sort()
Dim mid As Double = (arrayInt.Count - 1) / 2.0
Dim midInt As Integer = mid
Dim mid2Int As Integer = mid + 0.5
If arrayInt.Count >= 2 Then
Return ((arrayInt(midInt) + arrayInt(mid2Int)) / 2).ToString()
ElseIf arrayInt.Count = 1 Then
Return arrayInt(0)
Else
Return ""
End If
End Function
Function GetQ1(theRapport As String, theRegion As String, theEtab As String) As String
Dim arrayInt As New System.Collections.ArrayList
arrayInt = GetArray(theRapport, theRegion, theEtab)
arrayInt.Sort()
Dim taille As Integer = arrayInt.Count
If (taille = 1) Then
Return arrayInt(0)
ElseIf ((taille Mod 2) = 0 And taille > 0) Then
Dim mid1 As Integer = taille / 2
Dim midmid As Integer = mid1 / 2
If (mid1 Mod 2 = 0) Then
Return ((arrayInt(midmid - 1) + arrayInt(midmid)) / 2).ToString()
Else
Return (arrayInt(midmid)).ToString()
End If
ElseIf (taille = 1) Then
Return arrayInt(1)
ElseIf ((taille - 1) Mod 4 = 0) Then
Dim n As Integer = (taille - 1) / 4
Return ((arrayInt(n - 1) * 0.25 + arrayInt(n) * 0.75)).ToString()
ElseIf ((taille - 3) Mod 4 = 0) Then
Dim n As Integer = (taille - 3) / 4
Return ((arrayInt(n) * 0.75 + arrayInt(n + 1) * 0.25)).ToString()
Else
Return ""
End If
End Function
Function GetQ3(theRapport As String, theRegion As String, theEtab As String) As String
Dim arrayInt As New System.Collections.ArrayList
arrayInt = GetArray(theRapport, theRegion, theEtab)
arrayInt.Sort()
Dim taille As Integer = arrayInt.Count
If (taille = 1) Then
Return arrayInt(0)
ElseIf ((taille Mod 2) = 0 And taille > 0) Then
Dim mid1 As Integer = taille / 2
Dim midmid As Integer = mid1 / 2
If (mid1 Mod 2 = 0) Then
Return ((arrayInt(mid1 + midmid - 1) + arrayInt(mid1 + midmid)) / 2).ToString()
Else
Return (arrayInt(mid1 + midmid)).ToString()
End If
ElseIf (taille = 1) Then
Return arrayInt(1)
ElseIf ((taille - 1) Mod 4 = 0) Then
Dim n As Integer = (taille - 1) / 4
Return ((arrayInt(3 * n) * 0.75 + arrayInt(3 * n + 1) * 0.25)).ToString()
ElseIf ((taille - 3) Mod 4 = 0) Then
Dim n As Integer = (taille - 3) / 4
Return ((arrayInt(3 * n + 1) * 0.25 + arrayInt(3 * n + 2) * 0.75)).ToString()
Else
Return ""
End If
End Function
Function GetArray(theRapport As String, theRegion As String, theEtab As String) As System.Collections.ArrayList
Dim arrayInt As New System.Collections.ArrayList
If (theHashTable Is Nothing Or theHashTable.Count = 0) Then
Return arrayInt
Else
If (theHashTable.ContainsKey(theRapport)) Then
Dim regionHT As System.Collections.Hashtable
regionHT = theHashTable(theRapport)
If (theRegion = "" And theEtab = "") Then
For Each value As System.Collections.Hashtable In regionHT.Values
For Each value2 As System.Collections.Hashtable In value.Values
For Each valeur As Integer In value2.Values
arrayInt.Add(valeur)
Next
Next
Next
ElseIf (regionHT.ContainsKey(theRegion) And theEtab = "") Then
Dim etabHT As System.Collections.Hashtable
etabHT = regionHT(theRegion)
For Each value As System.Collections.Hashtable In etabHT.Values
For Each valeur As Integer In value.Values
arrayInt.Add(valeur)
Next
Next
ElseIf (regionHT.ContainsKey(theRegion) And theEtab <> "") Then
Dim etabHT As System.Collections.Hashtable
etabHT = regionHT(theRegion)
If Not (etabHT Is Nothing Or etabHT.Count = 0) Then
If (etabHT.ContainsKey(theEtab)) Then
Dim valuesHT As System.Collections.Hashtable
valuesHT = etabHT(theEtab)
For Each value As Integer In valuesHT.Values
arrayInt.Add(value)
Next
End If
End If
End If
End If
Return arrayInt
End If
End Function
Function PrintArray(theRapport As String, theRegion As String, theEtab As String) As String
Dim arrayInt As New System.Collections.ArrayList
arrayInt = GetArray(theRapport, theRegion, theEtab)
Dim str As String = ""
If (arrayInt.Count > 0) Then
str = String.Join(" | ", arrayInt.ToArray)
Else
str = " "
End If
Return str
End Function
The first hashtable is for different tables of the report needing the median.
I then use the following command to add value
Code.AddValue("3_2",Fields!Region.Value,Fields!Etablissement.Value,Fields!rowNumber.Value,Fields!Value.Value)
Then I get the median using the expressions
=Code.GetMedian("3_2", Fields!Region.Value,Fields!Etablissement.Value)
=Code.GetMedian("3_2", Fields!Region.Value,"")
=Code.GetMedian("3_2", "","")
I've tried placing the AddValue fonction on a hidden table and in the summary row of the tables.
I get the proper value but as soon as I expand or collapse a row everything is change to blank. How can I keep the value or where could I put the AddValue function to make sure it is called on every action, for every table in the report ?
Thanks -
Function in report query builder
Hi,
It is possible to call a function in the select statement of a report query builder as followed :
select my_func()
from my_table
The function is defined as :
create or replace my_func() return vachar2 is
v_temp vachar2(100);
begin
v_temp := 'column_1, column_2, column_3';
return(v_temp);
end;
Therefore, the query should be interpreted as:
select column_1, column_2, column_3
from my_table
and the fields "column_1", "column_2" and "column_3" with the same alias name would be created for the report.
Thank you,
DSOk. Here is the way!
Create user parameter p_query. Datatype Character. Width 10000. Set initial value as
select RPAD('n',10) c1, RPAD('n',10) c2, RPAD('n',10) c3 from dual
** Suppose type of column 1, 2 and 3 is character and maximum length can be 10. So using this in above select statement.
Get value in After Parameter Form trigger
begin
:p_query := yourfuntion;
return(true);
end;
data model will have only this:
&p_query
Now you will see three columns in data model
c1
c2
c3
NOW error ORA-24333 can appear, when function/procedure doesn't return back anything for data model, I mean lexical parameter p_query is empty.
** You can replace whole select statement with lexical parameter.
Maybe you are looking for
-
What is the content type for a plain text document.
Hello :) I want to generate a plain text document for the user to either see, or to save to disk directly. What do I out for the setContentType MIME type for this? Thanks Jeff.
-
We want to deploy Firefox in our enterprise environment and need to figure out a way to have the install run silently, no user interaction. We use Novell's ZEN to centrally manage our desktops and how we've done this with other installs is to create
-
NotEditorException when undeploying applications
Very often when undeploying applications, we get the NotEditorException. It seems that the application is (correctly) undeployed. This only occurs when undeploying, at other actions we never get this problem.. What can be a reason for this? thx
-
This issue just began randomly. When I go to export a movie, the "Preparing Project" screen comes up, then iMovie crashes and after a good hour of searching none of the "solutions" worked. Here's the error log. A big thank you to anyone who can help.
-
Hi, I have a problem with my WLAN controller 4400 series. I've configured it, I can add access points etc. Problem is that i can't make a WLAN's works... I have created dynamic Interfaces, for example vlan 20 with IP address: 10.10.20.1 /24 and I can