Group by Parameter

Is it possible to group by Parameter?  If so how?
What I'm trying to accomplish is the following:
  I have a main report that is basically a list of totals from many subreports
  The common denominator is the JobCode
  I'd like to run the main report for several JobCodes, which I've set up as a Dynamic, Multi-Select Parameter, which is the link between the subs and main.
The report works great if I select only one JobCode; however, whenever I select more than one JobCode, only the first one I select displays.  I've got the main report grouped by JobCode with the subreports in GH1 and the desired totals in the GF1.  I've tried a varied number of configurations none of which work as desired.
Any ideas or am I stuck running a separate report for each JobCode?
Thanks much in advance!

The data source is a database called NexGen with many tables. 
My main report's selection criteria is simply field = parameter (exactly ... {FMS_JOB_MASTER.JobCode} = {?Job Code}).  The Parameter is a multi-select, dynamic parameter.
The 5 fields on the main report are pulled from one table and one view and all the subreports are pulling also from tables/views ... some separate tables ... some same, but with different selections criteria.  Some of the subreports have more than one table so as to include the JobCode in order to tie with the main database. 
Main Report -- There's one field from a view displayed.  The view is joined to the main table as Left Outer Join.
SubReports -- Linked to Main Report by Job Code parameter and the select data in subreport bases on field is JobCode.  In each subreport I've placed the jobcode parameter in the report header and each subreport has ?jobcode in the selection criteria among potential other selection criteria necessary for a given subreport.
The other issue I'm having for some reason is that only one of my JobCodes will display ... even when I select just one different JobCode the next time I go to view the report.  Yes, all the JobCodes have data.
There was one time I was able to pull up two JobCodes at once like I'd like; however, the data was all messed up ... incorrect.
I may just resort to printing data for one JobCode per main report.
If there's a simple solution, please let me know ... otherwise I'll do just one per report.
Thanks!

Similar Messages

  • GROUP SORT PARAMETER

    I have a report with a group sort of the "Top N" items based on profit.  I already have a parameter that allows the user to specify the "N", but I want to also give the option to change the group sort based on sales or units sold.  Is there a way to do that?

    hello all,
    actually Brian's solution is correct...i use this method all the time.
    add two more steps to his solution...you should have created a formula with syntax
    Select {?GroupField}
       Case "Sales" :{table.SALES}
       Case "Units Sold" :{table.UNITS_SOLD}
       Default :{table.SALES};
    1) now add this formula to the details section, right click on it, and add a Summary, type = Sum.
    2) now go to the Group Sort Expert and add the formula, removing any other sorts in there already.
    you can now sort the groups on this formula that he gave you.
    if you have crystal reports 2008 or 2011 you can also use Interactive Sorts instead of using a parameter / prompt.
    cheers,
    jamie

  • Group by parameter value

    Hi,
    How can I group by a parameter value?
    For instance, I have the following:
    <?for-each-group:Opportunity[there is a filter here];./ResponsibleDepartment?>
    This grouping works fine if I enter field values such as "ResponsibleDepartment" (as in the above exmaple), "Product", and "User". Each of these values refer to actual field names. I would like instead to use a parameter, but unable to use a parameter as in the following:
    <?for-each-group:Opportunity[there is a filter here];./$ParamGroupBy?>
    (the parameters that the user can choose are the actual field names).
    This results in error. Can I not use a parameter in this way in a group?

    Hey Sorry. Didnt test it.
    If its going to be a xdoxslt variable then you can do it as
    <?xdoxslt:set_variable($_XDOCTX,'grp', 'DEPT')?>
    <?for-each-group:/ROOT/EMPLOYEE; ./*[name()=xdoxslt:get_variable($_XDOCTX,'grp')]?>
    <?NAME?>
    <?SALARY?>
    <?end for-each-group?>
    For the sample xml
    <ROOT>
    <EMPLOYEE>
    <NAME>Name1</NAME>
    <DEPT>Sales</DEPT>
    <SALARY>1000</SALARY>
    </EMPLOYEE>
    <EMPLOYEE>
    <NAME>Name2</NAME>
    <DEPT>Development</DEPT>
    <SALARY>1200</SALARY>
    </EMPLOYEE>
    </ROOT>
    I am not sure how it can be done for xsl variables.
    You can refer http://blogs.oracle.com/xmlpublisher/2006/05/dynamic_sorting_or_sort_by_par_1.html for more details on its usage.
    The blog has usage details of xsl variables too in this context.

  • Hide/show groups via parameter

    Hi all,
    I am a new user to Crystal Reports 2008 and need some guidance. I have sorted a list by group and I want to show each part of the list by group selectively based on the value given to a parameter.
    Is this possible/how would I go about doing this in the formulas section?
    Thanks.
    Anjana Dasu

    I hope I am understanding correctly when I'm answering your question.
    You have fields, grouped by the status field.  And depending on whatever the parameter is selected, you want to display only the defined items on the parameter, correct?
    You can do this either as a dynamic prompt, or a static prompt.  Dynamic will read off the distinct values coming from your data source and allow choices from there.  Static parameter, you will have to define what the choices are.
    In a nutshell...
    For a static parameter, create a parameter, and type in your choices... (Closed, in-status, etc).  They will be the selection choices you will allow the report user.  You can also define the parameter to have multiple choices etc on the same parameter settings.
    Next thing you need to do is go to your Select Expert, and define the parameter to be the select criteria.  Once you're in Select Expert, you can click New -> Select the field you want to filter that will correspond with your parameter -> then have it go "equal to" your parameter name.  You can also do the same thing by going to the formula section in Select Expert and define it as follows:
    {datasource.StatusField} = {?Status}
    This essentially tells Crystal to prompt the report user for a parameter (which you defined previously) and only select records that match the criteria you set in the formula.  All the group formatting will be done by Crystal.
    Hope this helps.
    Edited by: Eric Choi on Jul 14, 2008 10:43 PM

  • DAM Search by Tag-- Group Tag parameter is excluded

    I Have Tag structured like below
    companyname:Topic
         companyname:Topic/Articles
         companyname:Topic/videos
         companyname:Topic/casestrudies
    On of the resource is taged as "companyname:Topic". In the DAM content finder. if i check the checkbox of companyname:Topic and do the search, query parameter is excluding the "companyname:Topic" but all its sub tags are passed in the search Query. Because of which i am getting Zero result.
    How to include Grouptagid also in the Query parameter?
    Appreciate your help

    Hello, I have the same problem. When I find a bookmark using the search in Organize bookmarks, it doesn't show its location. In this way I remember that there was a bookmark similar to the new one, but I cannot remember in which folder it was, so many bookmarks of one type go to different folders :(

  • WIB - Creating Selector of Parameter Groups via Text Element

    Hello,
    I am trying to code an HTML <Select> tag that will execute various Planning Functions upon selection. 
    I have created a Text Element and placed this below the Hidden Function Pushbuttons that define the Parameter Group to use. 
    I modeled the HTML code placed in the Text Element after HTML code generated when using a Function Selector object within the WIB.  Here is the code that I am using:
    <select name="tstFuncs" onChange="javascript:bspSubmit('tstFuncs'); return false;">     
    <option value="FuncPushButt1">CompNameofButton1</option>
    <option value="FuncPushButt2">CompNameofButton2</option>
    <option value="" selected>-- Select --</option>
    </select>
    I tried both the Javascript funciton bspSubmit() and bspSubmitDdl().  The Parameter Groups do not fire??
    The buttons work correctly with the following:
    javascript:bspSubmit('FuncPushButt2'); return false;
    <a href="#1" onclick="javascript:bspSubmit('FuncPushButt2'); return false;" class="sapBtnStd" OnMouseOver="javascript:window.status = 'Function Pushbutton 1'; return true;" title="Function Pushbutton1"><nobr>Function Pushbutton 1</nobr></a>
    Has anyone else accomplished something similar?

    Thanks Marc,
    Currently I can only use this for a group of parameter groups within the same planning function. 
    Would there be any way to use JavaScript to include functions (i.e. parameter groups) from different Planning Areas/Planning Levels/Planning Functions???
    Also, while I got your attention, did you find out if there is a limit on the lenght of the JavaScript that can be added to a Text Element? Awhile back I was trying to integrate a JavaScript/DHTML menu system within a Text Element.
    Thanks ATC

  • WBS element group  in Report Painter

    Hi,
    What is the procedure to insert WBS element group as parameter selection field in a report painter?
    I'm working in PS Information System / Hierachy Reports and we want to extract economic information
    Thanks!
    Sayaton

    Hi
    To create a Transaction Code for a Report Painter/report writer report
    Tcode for Report Painter
    To create a TCode, follow the steps below.
    1) Go to Transaction code SE93, Enter TCode Name and Press Create.
    2) Give short Description and select Parameter Transaction, Press Enter
    3) Select Transation Radio Button and write START_REPORT in the next text
    box Also Check the box Skip Initial Screen.
    4) On the bottom of Screen (default Values), Enter Parameters
    i) Name = D_SREPOVARI-REPORTTYPE. Value = RW
    ii) Name = D_SREPOVARI-REPORT Value = Your Report Group Name (Say 1SIP)
    5) Save and Execute.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to Change Value set Dynamically for a Parameter in Apps?

    Hi All,
    I have a requirement where i need to change the value set dynamically for a given Parameter. This goes as, I have a Concurrent Program with 4 parameters. First Parameter is mandatory Business group.Second Parameter is Warehouse. Based up on the First parameter the second parameters LoV's are displayed, the third and fourth parameters value sets are dependent up on the Second parameter value. Parameter 2,3,4 Value sets are Table type. So i Used .$FLEX$.Value_setname to retrive the LOV's
    The Requirment now is that if the User doesn't enter the Parameter 2 than the Third Parameter field must be Open and he must be able to enter the Free text. In my case it is an Order Number. If the User enters the paramter 2 value than LOV's for ORder number pertaining to that Warehouse must get displayed. I've figured that this can be possible only if i change the Valuesets Dyanamically. I'm not sure if that is possible or not.
    I have tried :
    Using a Dummy Parameter with a new valueset(Transactable Independent) and giving Y and N based up on Warehouse parameter input.
    SELECT (DECODE ( :$FLEX$.WAREHOUSE_NAMES,NULL,'Y','N')) from dual;
    The default type was SQL.
    Then in the 3rd Parameter i have used Case function to differentiate Y or N. The third parameter being ORder number, is a table type and derived from Oe_order_headers_all.
    In the Query section i tried using dummy parameter value set to retreive the values. I was terribly Unsuccessful in doing so.
    Does the above Case exists or is Doable? Please, Help me out if somone had worked on Similar thing or have any idea of standard report/program using it in Oracle.
    Thanks alot for the Help!

    You will probably have better luck on the eBusinesSuite forum. This is more of a setup issue when defining your LOV and program parameters than it is a SQL or PL/SQL issue.
    http://forums.oracle.com/forums/category.jspa?categoryID=3
    Good luck - this is an aggravating issue to work with and I wish I did have the answer for you!

  • Error while setting input parameter for dynamic process - GP

    Hi All,
    I am using CAF 7.1 GP.
    Here I have to start a process dynamically and it is working fine.
    But, when I tried to set value for input parameter of this process by
    IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
    params.setAttributeValue("Val","MyValue");
    ( <b>Val</b> is the name of grouped input parameter ), it is giving
    com.sap.caf.eu.gp.exception.api.GPInvocationException: Structure with name input and namespace http://wwww.sap.com/nw/eup/gp does not have an attribute with name Val and namespace null.
    But no where I have mentioned http://wwww.sap.com/nw/eup/gp.
    I dont have any structures in my input and output.
    Here is my full code
           try
                IGPProcess process = null;
                IUser tl_user =UMFactory.getUserFactory().getUserByLogonID("fahad");
                     IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(tl_user);//, user.getLocale());
                     process =GPProcessFactory.getDesigntimeManager().getActiveTemplate("F5D76840A56F11DC983B001966243CAD",userContext);
                     wdComponentAPI.getMessageManager().reportSuccess("Title of process is "+process.getTitle());
                     IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
                     IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
                     int rolenum = process.getRoleInfoCount();
                     wdComponentAPI.getMessageManager().reportSuccess("Number is "+rolenum);
                     IGPProcessRoleInstance roleInstance=null;
                     IUser ho_User=null;
                     for (int i = 0; i < rolenum; i++)
                             wdComponentAPI.getMessageManager().reportWarning("Role Text is "process.getRoleInfo(i).getText()"  Role Name is "+process.getRoleInfo(i).getRoleName());
                             if(i==1)
                                  ho_User = UMFactory.getUserFactory().getUserByLogonID("poornendu");
                                  roleInstance = roles. createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
                                  roleInstance.addRuntimeDefinedUser(ho_User);
                                  roles.addProcessRoleInstance(roleInstance);
                             if(i==2)
                                  ho_User = UMFactory.getUserFactory().getUserByLogonID("fahad");
                                  roleInstance = roles. createProcessRoleInstance(process.getRoleInfo(i).getRoleName());
                                  roleInstance.addUser(ho_User);
                                  roles.addProcessRoleInstance(roleInstance);
                     wdComponentAPI.getMessageManager().reportSuccess(""+process.getStructure().getItemCount());
                     IGPStructure params = GPStructureFactory.getStructure(process.getInputParameters());
                     wdComponentAPI.getMessageManager().reportSuccess("Title of process is "+process.getTitle());
                     <b>params.setAttributeValue("Val","MyValue");</b>                     
                     String pName=wdContext.currentContextElement().getProcessName();
                     IGPProcessInstance prInstance = rtm.startProcess(process,pName,"This process has been started using the GP public API",tl_user,roles,params,tl_user);
           catch(Exception e)
                wdComponentAPI.getMessageManager().reportException(""+e);
    Can anyone help me on this.
    Thanks,
    Fahad Hamsa

    Hi Experts,
    I solved it myself.
    The problem was, I have to make the input parameter as exposed. Thats all
    Anyway, thanks for the support.
    Regards,
    Fahad Hamsa

  • Sales Analysis query per item group summarized per BP Group

    Dear experts,
    My client is requiring me to create a query that when i select a certain item group it returns a sum/total of sold items in that group per BP group
    format:
    parameter: Item Group A
    BP Group A    1,000
    BP Group B    2,000
    BP Group C   1,000
    I have managed to get total sales per BP Group but i cant seem to figure how to break it down per Item Group
    here is my query:
    SELECT T2.[GroupCode], SUM(ISNULL(T0.Debit,0) - ISNULL(T0.Credit,0)) as "Amount(LC)" FROM JDT1 T0  INNER JOIN OJDT T1 ON T0.TransId = T1.TransId and T0.TransType IN (13,14)
    INNER JOIN OCRD T2 ON T2.CardCode = T0.ShortName
    WHERE T1.[RefDate]  BETWEEN [%0] and [%1]
    GROUP BY T2.[GroupCode]
    how can I link Item Groups to JDT1?

    Hi Carlo
    Try This
    SELECT t5.ItmsGrpNam AS ItemGroup,
       t7.GroupName AS BPGroup,
       SUM(ISNULL(T0.Debit,0) - ISNULL(T0.Credit,0)) AS "Amount(LC)"
    FROM JDT1 T0
    INNER  JOIN OINV T1 ON T0.transid = T1.transid
    LEFT OUTER JOIN INV1 T3 ON T1.docentry = T3.docentry
    LEFT OUTER JOIN oitm T4 ON t4.itemcode = T3.itemcode
    LEFT OUTER JOIN oitb T5 ON T4.ItmsGrpCod = T5.ItmsGrpCod
    INNER  JOIN ocrd T6 ON T0.ShortName = T6.CardCode
    INNER JOIN OCRG T7 ON t7.GroupCode=t6.GroupCode
    WHERE T1.DocDate BETWEEN [%0] AND [%1]
    GROUP BY t5.ItmsGrpNam,
       t7.GroupName
    Rgds

  • Grouping Based on Parameters

    Hi
    can anyone lease explain me how to create a group  based on the parameters entered by the user ?

    hmm, are your parameters set to dynamic? if yes here is the solution which might work - Direct from Crystal Report Help file
    Adding dynamic grouping using parameter fields
    You can design your report so that users can change the grouping presentation of the report without refreshing information from the database. For instance, users can move from a customer-focused view of the report to either a region-focused or an order-focused view. Dynamic grouping combines the use of group selection formulas and the Parameter Panel.
    To add dynamic grouping using parameter fields
    Create a report using the sample data, Xtreme.mdb, and place the following fields from left to right in the Details section:
    {Customer.Customer Name}
    {Customer.Country}
    {Orders.Order ID}
    {Orders.Order Date}
    {Orders.Order Amount}
    Create a new parameter field and call it GroupBy.
    Select String from the Type list.
    Add the following values to your parameter:
    Customer
    Country
    Order
    Select Editable from the Show on (Viewer) Panel list, and click
    OK.
    Create a new formula field and call it GroupField.
    Type the following formula into the Formula text box.
    If {?GroupBy} = 'Customer' then
    {Customer.Customer Name}
    Else if {?GroupBy} = 'Country' then
    {Customer.Country}
    Else if {?GroupBy} = 'Order' then
    *ToText({Orders.Order ID})
    Note: Crystal Reports formulas do not allow conditions to return different data types. Both the Customer Name and Country fields return strings, so the ToText function must be used to convert the
    Order ID from a number to a string as well.
    Save your formula and close the Formula Workshop.
    In the Group Expert, select the GroupField formula as your group field, and click OK.
    Customize summary fields and section formatting as you like.
    Users can now change the grouping presentation of the report by modifying the GroupBy parameter value on the Parameter Panel.
    Note: Changing parameter values will not cause a database refresh as long as the parameter is a non-data parameter.
    hope this helps
    Regards
    Jehanzeb

  • PARAMETER ID VALUE NOT DEFAULTED in CREATE MATERIAL MASTER (MM01)

    Hi,
    Currently when we create material master we like to defualt the field material group, using PARAMETER ID (MKL-Material group).
    I have defined the parameter ID for MKL(material group) and assigned a material group value, log off and log in again.
    When I create material master with MM01, the PARAMETER ID is not pickup, the field material group is not defaulted with value defiend for the parameter ID.
    Anyone know why it did not works, and how to make the material master field defualted with PARAMETER ID??
    best rgds,

    As suggested by Jurgen Parameter ID wont work for Data Maintenance screens.
    You can go for Transaction Variant SHD0 and Set the Field as Default.

  • View fails when grouping by RBS

    Hello:
    I have an environment that was upgraded from Project Server 2007 to 2010.  In the 2007 instance, I had a Resource Center view that grouped on the RBS column.  The grouping was configured within the Manage Views page (i.e., not something I applied
    as an end-user).  This view worked fine in 2007.  When I try to access this view in the 2010 instance, it gives me a message stating it failed to load.  After lots of filter deletion and view re-creation, we've pinpointed that the issue is caused
    by the RBS group by parameter on the view itself.  If I remove the grouping, the view loads.  When I add it, I get the view failure message.  I don't understand why the RBS grouping would cause these problems, as all the selection values are
    valid and every user I've reviewed has a valid RBS entered.
    The issue appears to only be related to grouping by RBS.  I can group by other fields just fine and the RBS grouping fails on other views.
    Any thoughts?  Thanks in advance for your help!

    Hello,
    I run into the same issue as you on an environment which was upgraded from Project Server 2007 to 2010. I found that the RBS lookup table was turned upside down. One value was existing twice in the same RBS level. The issue was solved by updating the RBS.
    Perhaps it could help you. 
    Best regards

  • Requisition import has grouped all the requisition lines in one requisition

    HI
    I need a help.
    Requisition import has grouped all the requisition lines (having sourcing supplier and inventory)in one requisition
    for whcih the type lookup code is 'Purchase'. the source of requisition was MRP. How the system can group the items having different sourcing(few are from supplier and few are from inventory) into one requisition.
    Is this the oracle standard functionality
    Thanks
    Payal

    See req import group by parameter is playing a role here..
    I think maybe it is considering ALL and clubbing together to one..not sure though
    See if these threads can help the cause
    Unable to avoid Autocreate PO grouping by different Supplier
    Autocreate PO - default requisition grouping
    Mahendra

  • RegEx: find() and group() issue...

    Hi,
    In the code below, I use the find() method to search the first occurence of a match and then group(1) to retrieve that match if the find() method returns true.
    The problem is that the find() method returns true and the group(1) throws an ArrayOutOfBoundException :(
    Here is the RegEx code I use:
      String value = "${local.production}\\makeresults\\repository";
      Matcher matcher = Pattern.compile("\\$\\{.*\\}").matcher(value);
      if (matcher.find()) {
        System.out.println(matcher.group(1));   // throws an ArrayOutOfBoundException
    Got this output:
    Exception in thread "main" java.lang.IndexOutOfBoundsException: No group 1
      at java.util.regex.Matcher.group(Matcher.java:463)
      at Test2.main(Test2.java:28)Have I made any mistakes?
    Thanks in advance for your help.
    Best regards,
    Serge.

    You shall use group() without parameter to get complete sequence.
    Only capturing groups (between parenthesis) are indexed (from left to right, starting at one.)
    Here you don't have capturing group (and that's why it says No group 1), and it seems that you need the entire pattern, so you need the group() method.
    Matcher
    Tim - Actually, you can also use group(0) ...

Maybe you are looking for