Use CustomFunctionController to add Repository Custom Function to a reportclientdocument

<p class="ssiBODYCOPY">I would love to know how to add a Repository Custom Function to a reportclientdocument - If this is possible?<br />I need to know how to instantiate an object of type Custom Function from the enterprise repository or get a list of available custom functions. <br />The following code takes a "custom function object" from an existing report (which is a repository custom function) and I THINK adds it to the reportclientdocument - in fact the count of items in the customfunctioncontroller is 1 after I add the custom function but when I save the reportclientdocument they dissapear - I am not sure if I should be using ADD or INSERT method. I also was able use other controllers such as the DataDefController which works sucessfully. Please can someone help me figure out how to do this (btw where in CI_INFOOBJECTS is a custom function stored?)<br /><br />Thanks Nicole<br /><br />Dim rptClientDoc As ReportClientDocument<br />&#39;open the report<br />rptClientDoc = OpenReport("report1", ceInfoStore)<br /><br />Dim myCustomfunctions2 As CrystalDecisions.ReportAppServer.DataDefModel.CustomFunctions<br />Dim myCustomcontroller2 As CrystalDecisions.ReportAppServer.Controllers.CustomFunctionController<br />myCustomcontroller2 = rptClientDoc.CustomFunctionController()<br /><br />myCustomfunctions2 = myCustomcontroller2.GetCustomFunctions()<br />Dim cf As CustomFunction<br />cf = getfunction(ceInfoStore, ceSession) &#39; Gets valid custom function object in ANOTHER report<br />myCustomfunctions2.Add(cf)<br /><br /><br />Dim datacont As CrystalDecisions.ReportAppServer.Controllers.DataDefController<br />datacont = rptClientDoc.DataDefController<br />datacont.RecordFilterController.SetFormulaText("currentdate > month(testing)")<br /><br />SaveNewReport(ceInfoStore, rptClientDoc, "report1", "report2")</p>

Hello Nicole
please also use our diamond sample site to search for samples which might solve your problem.
Your need would be in CE managed samples which we publish for JAVA and NET.
Please use this link:
https://boc.sdn.sap.com/
Falk

Similar Messages

  • Query for create manual tabular form using apex collection add row button functionality

    Hello everyone
    My requirement is i created a tabular form manually using apex collection but if i click on add row button then previously selected data refreshed and added new row in this form it is fine.but i don't want to refreshed previously selected data and click on add row button then add new row .how it is possible? plz help
    Thanks & Regards,
    Ujwala

    Ujwala
    Instead of starting a new thread with the same question as Query for create manual tabular form using apex collection add row button functionality.
    Could you answer the question about what you see while debug the javascript code.
    If you don't understand the question or have trouble debug javascript let us know.
    Nicolette

  • Using Variables in a "Report Custom Functions"

    Hi!
    I created a custom function using Basic Syntax where I am trying to declare/use variables.  I keep getting syntax errors and don't know why.  Here is my code so far:
    Function cdQSIPeriod () As String
    YY = Year(CurrentDate)
    MM = Month(CurrentDate)
    If MM = 1 then
        MM = 12
        YY = YY - 1
    else
        MM = MM - 1
    cdQSIPeriod = String(MM)& String(YY)
    End Function
    Any help you can provide will be appreciated.

    You need to add
    dim YY as number
    dim MM as number
    HTH,
    Carl

  • Repository custom function refresh

    We have some custom functions that we store in our BO XI R2 repository, we use these for creating reports and then publishing them to the Enterprise server.  When we update any of the custom functions in the repository the changes do not automatically update into the reports that are published on the Enterprise server, we either have to republish the reports or go to the CMC and click on the refresh option.  Is there any way to get the custom functions in the repository to automatically update in all reports that are published to the Enterprise server?

    Here is what I found:
    The existing reports used to have a sub-report which was passing back a shared variable with the same name as the custom function.  Even when the sub-report was deleted from the report, for some reason Crystal still had the shared variable name referenced somewhere and therefore would not allow adding of a custom object with the same name.  Strange!!!

  • How to use ADD_METADEF to add a custom metadata field

    Hi All,
    I am trying to add a custom metadata field to check in profile, and this I want to do using RIDC library through my java program. I have tried the following code, but some how I could not see its getting added to Information Fields and also to Standard check in profile.
    Can you let me know what am I missing?
                myIdcClient = myIdcClientManager.createClient("idc://XXXX:4444"); // just commented out
                IdcContext myIdcContext = new IdcContext("weblogic", "weblogic1");
                ServiceResponse myServiceResponse = null;
                  DataBinder myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "UPDATE_OPTION_LIST");
                    myRequestDataBinder.putLocal("dKey", "xLocationList123");
                  myRequestDataBinder.putLocal("OptionListString", "Madrid\nTokyo\nLondon\nWashington");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "ADD_METADEF");
                    myRequestDataBinder.putLocal("dName", "xLocations123123");
                    myRequestDataBinder.putLocal("dIsRequired", "0");
                    myRequestDataBinder.putLocal("dOptionListKey", "xLocationList123");
                    myRequestDataBinder.putLocal("dOptionListType", "choice");
                    myRequestDataBinder.putLocal("dIsOptionList", "1");                    
                    myRequestDataBinder.putLocal("dIsSearchable", "1");
                    myRequestDataBinder.putLocal("dIsEnabled", "1");
                    myRequestDataBinder.putLocal("dType", "Text");
                    myRequestDataBinder.putLocal("FieldName", "xLocations123123");
                    myRequestDataBinder.putLocal("dCaption", "Locations");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    //IdcService=UPDATE_META_TABLE
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "UPDATE_META_TABLE");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "START_SEARCH_INDEX");
                    myRequestDataBinder.putLocal("IsRebuild", "1");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
                    myRequestDataBinder = myIdcClient.createBinder();
                    myRequestDataBinder.putLocal("IdcService", "PUBLISH_SCHEMA");
                    myServiceResponse = myIdcClient.sendRequest(myIdcContext, myRequestDataBinder);
    Thanks in advance.

    Try calling the following code:
    import static intradoc.shared.MetaFieldUtils.hasDocMetaDef;
    import static intradoc.shared.MetaFieldUtils.updateMetaDataFromProps;
    import intradoc.common.ServiceException;
    import intradoc.data.DataBinder;
    import intradoc.data.DataException;
    import intradoc.data.Workspace;
        protected static void addMetadataFields(final Workspace workspace, final DataBinder binder) {
            traceVerbose("Start addMetadataFields");
            // Parameters for metadata field
            final String[] parameters = new String[] { "dsdComponentName", "dComponentName", "dsdVersion", "dType", "dIsRequired", "dIsEnabled", "dIsSearchable", "dIsOptionList", "dOptionListKey", "dOptionListType", "dDefaultValue", "dOrder", "dIsPlaceholderField", "dsdCheckFlag",
                    "dsdDisableOnUninstall" };
            // Common values for primary and alternate field values
            final String[] values = new String[] { "ComponentName", ComponentName, "build_1_20131206", "BigText", "0", "1", "1", "0", "", "", "", "2500", "0", "", "" };
            // Primary file checksum field parameters and values
            final Properties field = new Properties();
            for (int i = 0; i < parameters.length; i++) {
                field.put(parameters[i], values[i]);
            // Setup primary file specific parameters
            field.put("dName", "Metadata field name");
            field.put("dCaption", "Metadata field caption");
            try {
                // Name of metadata field
                final String fieldName = field.getProperty("dName");
                trace("dName: " + fieldName);
                if (fieldName != null && fieldName.length() > 0 && !hasDocMetaDef(fieldName)) {
                    try {
                        updateMetaDataFromProps(workspace, null, field, fieldName, true);
                        trace("Successfully added metadata field " + fieldName);
                    } catch (final ServiceException e) {
                        warn("Metadata field " + fieldName + " was not installed.", e);
                    } catch (final DataException e) {
                        warn("Metadata field " + fieldName + " was not installed.", e);
                } else {
                    trace("Metadata field already exists; will not modify");
            } finally {
                traceVerbose("End addMetadataFields");
    Jonathan
    http://jonathanhult.com

  • SP 2013 - Use PowerShell to Add a Custom Web Part to a Page

    Hello Community,
    I need to add a custom web part to a page using PowerShell - has anyone done this and if so please provide guidance and code examples.
    Thanks!
    Tom
    Tom Molskow - Senior SharePoint Architect - Microsoft Community Contributor 2011 and 2012 Award -
    Linked-In - SharePoint Gypsy

    BTW, here is my current code:
    #$web= Get-SPWeb -Identity "http://c4968397007/sites/BRE"
    $Url = "http://c4968397007/sites/BRE"
    $pageUrl = "/SitePages/Home"
    $webpartzone = 2
    $index = 0
    $fileName = "wp_DistrictHomePage_VisualWebPart1.webpart"
    $web = Get-SPWeb $Url
    $web.AllowUnsafeUpdates=$true
     $webPartGallery = $web.Lists["Web Part Gallery"]
     Write-Host "Searching webpart $fileName in web part gallery"
      if($webPartGallery -eq $null)
       Write-Host("Unable to retrieve Webpartgallery");
     $webpart = $null;
     $webpart=$webPartGallery.Items | ? { $_.Title -eq $fileName}
      if($webpart -eq $null) {
       Write-Host("Unable to retrieve webpart: $fileName") -ForegroundColor Red
     else {
      Write-Host("----------Adding Webpart--------")-ForegroundColor Yellow
      $webpartmanager=$web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
      $errorMsg = "";
      $xmlReader = New-Object System.Xml.XmlTextReader($webpart.File.OpenBinaryStream());
      $webpart = $webpartmanager.ImportWebPart($xmlReader,[ref]"Error")
      $webpartmanager.AddWebPart($webpart, $webpartzone, $index);
      Write-Host("Webpart is added successfully") -ForegroundColor Green ;
    $SiteURL =$Url
    #---------------Test Page----------------------------
    $PageName="Test.aspx"
    $page=$web.lists["Pages"].Items | ? {$_.Name -eq $PageName}
    $page.File.CheckOut();
    Add-WebPartToPage "$SiteURL/Pages/$PageName" "Header" 0 "My Custom WebPart"
    $page.File.CheckIn("Added Web part to a page");
    $page.File.Approve("Added Web part to a page");
    Tom Molskow - Senior SharePoint Architect - Microsoft Community Contributor 2011 and 2012 Award -
    Linked-In - SharePoint Gypsy

  • Report custom function and repository custom function

    Hi Guru:
    We have some repository functions.
    When using them in the report, in design time, we will choose Add to report for the functions and then we could use it.
    Then the repository functions are updated, and I found the report function, which comes from the repository function, is not updated, I need to add the repository function to the report again to update it.
    As we will have more and more reports using the repository function, in the long run, is there a way to automatically update the report function from the repository for all the reports?
    Thanks.
    Eric

    From Crystal's online help:
    Repository objects that are used in a report and are connected to that report's repository can be updated automatically when opening the report in Crystal Reports. This behavior is controlled by an Options setting and is global for all reports.
    Note:    Objects that are used in a report but are disconnected from the repository are not automatically updated when the report is opened.
    To set the update option
    On the File menu, click Options.
    The Options dialog box appears.
    Click the Reporting tab.
    Select the Update Connected Repository Objects on Open check box.
    Click OK.
    If you don't want to use this global option, you can also update a report's repository objects by selecting the Update Repository Objects option on the Open dialog box for an individual report.
    Note:    When you open a report that contains a command that is stored in the repository, and you have specified that you want to Update Connected Repository Objects on Open, only the definition of the command is automatically refreshed; the data that the command returns is not updated until you click the Refresh button in the report.
    HTH,
    Carl

  • SIT on SSHR using custom function

    Dear Group,
    I am implementing SSHR for a customer, the customer needs to have some special request that need to be entered from SSHR then follow an approval path.
    So I have created a SIT and copy the original process using workflow and create a custom function in SSHR with different parameter for process and pCalledfrom.
    My problem is that the with I try to display my segment only it’s not getting displayed
    For example:
    SIT: XX_Ticket_Request
    Segments:
    No_Ticket_Request
    Ticket_Type
    In the personalization:
    In the segment field I wrote:
    XX_Ticket_Request|SEGMENT1| SEGMENT2| SEGMENT3|
    Nothing is displayed only start date and new date if I try to insert a new line the required segment are displayed.
    How I can display the required fields only. before insert mode.

    You need to use the name of the flex segments, not the columns, e.g.,:
    XX_Ticket_Request|No_Ticket_Request|Ticket_Type|
    Let us know if that works!

  • Custom Function Help

    Post Author: edy80y
    CA Forum: Formula
    I have a report with many subreports which all contain the same formula to group teams.When a new team is added i need to update all instances of the formula so they are all up to date.I know of Custom Function so i created one out of the formula in the main report.  The problem im finding is that im unable to use that custom function in the sub reports.Am i wring in thinking that a custom function created in a main report can be used in its sub reports??Am i creating the custom function incorrectly? Heres what i have done:
    Our database has team names that have a prefix of the State they are in such as: Perth - Team Orange Perth - Team Apple Sydney - Team Grape Sydney - Team Pineapple
    At one stage the Teams in Perth had been split into Perth1 and Perth2 resulting in the following records in the database:
    Perth1 - Team Orange Perth - Team Orange
    Because of this i have created a formula that groups teams into sites:
    select Trimleft(mid({team.name},instr({team.name},'-')+1))case 'Team Orange', 'Team Apple': 'Perth'case 'Team Grape', 'Team Pineapple': 'Sydney'default:''
    I use this formula in all reports and subreports and i link by them as well, so if a new team is created (for example Perth - Team Pear) i need toupdate all instances of the formula by adding 'Team Pear' to the Perth case.
    To fix the problem i created a custom function (called 'site') out of the formula above and it created this:
    Funtion (stringvar v1)select Trimleft(mid(v1,instr(v1,'-')+1))case 'Team Orange', 'Team Apple': 'Perth'case 'Team Grape', 'Team Pineapple': 'Sydney'default:''
    Now within that main report i am able to go to the formula editor and when i type site() then wording becomes blue but when i go into a sub report to do the same it doesnt react.
    I hope i have explained my self well enough for you to understand my predicament without boring you.
    Thanks in advance for your help!

    Post Author: edy80y
    CA Forum: Formula
    Hi,
    Thanks for the reply.  Unfortunately it does make things easy for me.  If i add the custom function in the subreport then i will have to updae that as well whenever a new team is created.  I'm looking for a solution where i only have to update the custom function in the main report only and not in the 7 or 8 subreports within it.
    Unless i am doing something wrong.  I basically copied the contecnt of the Custom Function in the main report and then went into the sub report and created a new Custom Function and pasted the code in it.
    Regards,
    Eddie S

  • Adding custom functionality sub screen in transaction IW51

    HI,
    Bussiness needs to add a custom functionality sub screen in header tab of transaction code IW51.
    Please suggest if anybody worked on this issue.
    Provide me if any screen exits are available in IW51 and how to implement the screen exits.
    Thanks,
    Radhakrishna

    hi,
    i dont think for this application SAP has good solution, we went for Z developments on this modules.
    any how checkout....
    SPRO>Quality management>Notification --> Overview of notification types --> Select the notification & 90 give the customer specific screen area
    Subscreen Number for Customer Screen Area "Notif. Header"
    Specifies the customer screen area that you can activate on the main notification screen using the SAP enhancement if you are working with the screen area '090' (customer subscreen (one screen/NTyp)).
    If you want to use more than one customer subscreen in your notification type, use the screen area '091' (customer subscreen (>1 screen/NTyp)). Assign the screens directly to the tab pages.
    Thanks,
    Shailaja Ainala.

  • Smartview 11.1.2.1 toolbar-Add new/modify functionality without VBA

    Please help me with below questions
    1. Is it possible to add new custom functionality (like add new button/modify the existing functionality) in Smart view 11.1.2.1 toolbar or anywhere in Smart view main menu without using VBA?
    2. Can above mentioned changes brought on the server side, which would reflect on client; in other words, maintain code on server side; no need of installation.
    3. Is JAVA code supported by Smartview 11.1.2.1 as VBA; if yes then how it can be achieved?
    Product version:
    11.1.2.1.000

    Hi Anku,
    1. Is it possible to add new custom functionality (like add new button/modify the existing functionality) in Smart view 11.1.2.1 toolbar or anywhere in Smart view main menu without using VBA?With a little research, you can expose the Smartview menus and functionality using a .net project in Visual Studio.
    2. Can above mentioned changes brought on the server side, which would reflect on client; in other words, maintain code on server side; no need of installation.The Smartview client UI elements are derived from local msoffice APIs, and not managed at the server. The server is a web service and the only thing it knows is how to dispatch requests in the form of XML to the appropriate API (E.g. Essbase) and return the results to the client as an xml stream.
    3. Is JAVA code supported by Smartview 11.1.2.1 as VBA; if yes then how it can be achieved?No.
    Regards,
    Robb Salzmann

  • Custom functionality to the telephony buttons which can trigger calls

    Hi everyone,
    I need to add a custom functionality to the telephony buttons which can trigger calls. This will be added to the telephony buttons consult, transfer, warm transfer, dial pad, conference.
    Any idea as to how to proceed with this?
    Thank you in advance.
    Binno Don Thomas

    Hi,
    The buttons are controlled by ToolBar profile in your webclinet profile.
    For creation of the toolbar profile go to
    SPRO >> Customer Relationship Management >> Interaction Center WebClient >> Basic Functions >> Communication Channels >> Define Toolbar Profiles
    If you want to create the button itself for use in the toolbar profile you can go to
    SPRO >> Customer Relationship Management >> Interaction Center WebClient >> Customer-Specific System Modifications >> Define Toolbar Buttons
    Hope this Helps.
    Regards,
    Rajiv

  • User exit call customer function 002 is not getting trigerred

    Hi
    I am using the user exit call customer function 002 in the function module idoc_input_proact to trigger and idoc.my problem is that the user exit is not geting triggered.
    please help me gurus as this the last day for finishing thw work.
    regards,
    Asish dash

    it means tthat, u are applying a wrong exit in the pgm.
    try to once again search for the suitable exits for your program.
    try this:
    how to find the customer exits for a particular transaction
    check out the pgm in this thread:
    Re: Find User Exits
    regards,
    padma

  • Upgrade to 4.2 SP4 corrupted custom functions in central repository

    I recently upgraded a repository from 4.2 SP1 to 4.2 SP4 and all the custom functions in the central repository (after being upgraded with repository manager) are no longer able to be check-out, can't get latest version, can't even export them...  nothing.  Each time I interact with anything dependent on these functions I get the following error:
    I've logged out completely, refreshed multiple times and nothing is solving the issue.  The functions correctly show up, but cannot be edited in any way.  Please help.
    both local and central repos are on MS SQL Server 2008 R2.

    Hi Matthew,
    Did the upgrade process from 4.2 SP1 to 4.2 SP4 complete successfully when you upgraded using Repository Manager.
    If you have a backup of 4.2 SP1 repository version can you please upgrade the repository to 4.2 SP4 and check the Latest version after upgrade is finished successfully.
    It seems that you are directly doing a Check in of dependent objects first.
    Try the below steps:
    1) First add only the object without dependents
    2) Add only the custom function to the central repository see if that works
    Please note the following points
    You can add a single object to the central repository, or you can add an object with all of its dependents to the central repository. When you add a single object, such as a data flow, you add only that object. No dependent objects are added.
    The error message suggests that dependent objects is missing.
    Please refer to Advanced DS reference Guide
    Refer to section
    To add an object and its dependent objects to the central repository
    https://help.sap.com/businessobject/product_guides/boexir32SP2/en/xi321_ds_adv_dev_en.pdf
    Regards
    Arun Sasi

  • BAPI to add additional partner functions in customer master(KNA1)

    Hello All,
    I wanted to add additional partner functions(2) to the list of partner functions which gets added by default while creating a customer. I am currently using BAPI_CUSTOMER_CREATEDATA1 to create the customer master. There i do not find any option to add my partner functions.
    NOTE: I need to update KUNN2 field as well while adding my partner functions.
    Could anyone please help here?
    Regards,
    Jay

    Hi,
    No you should not feel confident with SD_CUSTOMER_MAINTAIN_ALL.
    It is used for only one very special case. The maintenance of consumer. And this should only be true from the transaction itself.
    There exists other cases, one of the oldest one is the BAPI_CUSTOMER_CREATEFROMDATA1. But is is exclusively reserved for SAP Online store.
    Despite the fact CMD_EI_API is quite difficult to use, it has the main benefit that is it supported if being triggered directly.
    For the maintenance of customers, there is NO BAPI and NO direct function module.
    There are some functions modules like the one above where the name is looking nice. But these should not be used.
    The only valid solutions are :
    Below ECC 2005 (6.00), the only solution was batch input and DEBMAS idocs. See note 384462
    Starting with ECC 2005 (6.00) and above: a synchronisation tool has been introduce. See class CMD_EI_API and VMD_EI_API
    Hope this helps
    BR
    Alain

Maybe you are looking for

  • File History not Working in Windows 8.1

    Ever since I upgraded from 8.0 to 8.1, File History has not worked. I've progressed from Event 202 to Event 204, but no resolution. Using an external Seagate backup drive - have scanned and reformatted that drive. Still no back ups. Seems File Histor

  • Acrobat 8 shows in the dock but won't open

    I have a new installation of Acrobat Pro, along with PS5. Computer is a mac w/snow leopard. Question is Acrobat 8 shows in the dock but won't open - says PS must be open for it to work - but PS is open(and functioning fine). So how do I get Acrobat w

  • PCMCIA-CAN/2 Series 2 works on windowa Vista?

    Hey ,           We are using the PCMCIA-CAN/2 Series 2 CAN Card for our application.We are moving to Windows Vista very soon.I was not sure if I can use the same CAN card for the vista operating system?           I've seen some post about PCMCIA DAQ

  • Index slow

    Hi All, An Index existed on a table, if we are performing DML operations why DML operations are slow. Please explain me. Thanks Ramesh

  • Start working with adobe premiere pro cs 5.5 in german

    It doensn' make fun to start working with adobe pro cs 5.5. I dont find do kuse the programm window. I cut one scene and after that I did'nt hear the audio.