Report based on parameter values

Morning all,
I have to create a report which includes Account Number, Account Name, Sales prices. There has to be two optional parameters, Account number (Static) and Product Description (Dynamic).
I have setup the report with Account Number (Grouped), Account Name. The report works fine, when a user selects a particular account number, the report produces fine.
Things I would like to do and know about:
1: when it comes to sales price, it should reflect to what user has selected under Product Description parameter.
for example if the user has selected Supra, Supra KNT, Rimless, Metal etc from the description parameter, the report should only show those selected prices according to the account number (showing descriptive field value).
2: Additionally, if user chooses all of the options from the drop down menu (multiple selection dexcription parameter) then the report should show all the prices according to the description (showing the description field value).
The problem in this case which I think would be is because the description values are quite alot, I mean more than 25 values and if a user selects multiple values, lets say all, how would Crystal adjust that into a report?
Example of a report
Parameters
=============
Account Number:
Description: Supra, Supra KNT, Metal, Plastic, Rimless, Rimless KNT (multiple selection)
Report Layout
============
Account Number --- Account Name --- Supra - Supra KNT - Metal - Plastic - Rimless - Rimless KNT
(Where Supra to Rimless KNT options are chosen by Descriptive parameter value - if not chosen then report will only show account number and account name).
If however only Supra is selected then the report would look like this
Report Layout
============
Account Number --- Account Name --- Supra
Any ideas how to achieve this kind of report? I have setup the report in a landscape so that we can fit as many description values as possible but I only managed to show 9, rest goes over the page.
The report in the end has to be exported to excel so I don't mind if it goes over a page.
Regards
Jehanzeb

Jehanzeb,
You do want to use cross tabs...
Have your database query produce a table with the following columns:
Account Info (Number & Name)
Product Description
Sales
e.g.,
Select AcctNo + " - " + AcctName as AcctInfo,
   ProdDesc,
   sum(Sales) as Sales
from SalesTable
group by AcctNo, AcctName, ProdDesc
Then use record selection to limit the data to the selected products.
Yes, the layout of a cross tab is a bit strange, in that the design of the cross tab only shows one column for the data, but the table will expand with the underlying data.  If 4 products are selected, there will be 4 columns of sales numbers.  When setting up the cross tab, make the AcctInfo field the row header, and the ProdDesc field the column header, and the Sales field the table cell value.
HTH,
Carl

Similar Messages

  • SSRS Matrix report to show or hide year column based on parameter value "Date" selected.

    Hey experts!
    I have a requirement an ssrs matrix report should display columns (year/s) based on parameter value (date/s). 
    My Dataset fileds are: Product, Year_name, Month_name, Date
    Currently my report output looks like this-
    Param Date: 2013-08-01 00:00:0.000
    Product +Calender2011      +Calender2012     -Calender 2013........                        +Calender2014
                             Total
                      Total Jan13  Feb 13  Mar13..  Dec13   Total           Total
    Abc                      100
                        220
    10      20         30.......  20       250              400
    Xyz 110
    200 50      80         40.......  30       450              600
    My requirement:  if I'm selecting Date parameter value as '2013-xx-xx' I should only able to see Year column 'Calender2013' and rest of the years should hide. Similarly If I'm selecting Date parameter value as '2014-xx-xx' I should only able to
    see Year column 'Calender2014' .
    Appreciate your kindly help. 
    Afan

    Hi Afan,
    According to your description, you want to only show the selected year on your report, right?
    In this case, you need to get the year from the date parameter using the expression below
    =Year(Parameters!Date.Value)
    And then use the expression below to get the year from Year_Name field.
    =Right(Fields!Year_Name.Value,4)
    Then add a filter to the dataset to filter the data like below
    Expression:=Year(Parameters!Date.Value)
    Operator:=
    Value:=Right(Fields!Year_Name.Value,4)
    Reference
    http://msdn.microsoft.com/en-IN/library/dd255287.aspx
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Retrieve All records and display in Report using CAML query in Report Builder if Parameter value is blank

    Hello Experts,
    i have created a report where i have one parameter field where user will pass parameter(e.g. EmpId). As per parameter record will fetched to report if no parameter is passed then it will display all records. I have done it by taking SqlServer Database as datasource.
    by using Following method
    Now i would like to do it by taking Sharepoint List as Datasource. For that what would be the CAML Query.
    Here is my existing CAML query.
    <RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ListName>Employees</ListName>
      <ViewFields>
        <FieldRef Name="Title" />
        <FieldRef Name="FirstName" />
        <FieldRef Name="LastName" />
        <FieldRef Name="FullName" />
        <FieldRef Name="UserName" />
        <FieldRef Name="Company" />
      </ViewFields>
      <Query>
        <Where>  
    <Eq> 
        <FieldRef Name="Title" />
      <Value Type="Text">    
       <Parameter Name="EmployeeId"/>    
    </Value>
    </Eq>                  
        </Where>
      </Query>
    </RSSharePointList>
    The above code is working if i am passing an employeeId to Parameter. If nothing is passed, it is Not retrieving any record.
    Please suggest
    Thank you
    saroj
    saroj

    Your problem follows the well-established pattern of using an "All" parameter filter in SSRS. There are a few approaches depending on the size of your data. The easiest one is to return all data from CAML and then filter it within SSRS, the following thread
    provides some examples,
    http://stackoverflow.com/questions/18203317/show-all-records-some-records-based-on-parameter-value.
    Other options include passing all of the possible values within the CAML query when "All" is selected, using multiple Report Files to distinguish between both CAML queries, or to use multiple datasets with some logic to show/hide the correct one.
    Dimitri Ayrapetov (MCSE: SharePoint)

  • F4 help for select options based on parameter value

    hi all,
    I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
    Regard's,
    Girija
    Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
    Edited by: Vinod Kumar on May 17, 2011 1:36 PM

    hi all,
    I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
    Regard's,
    Girija
    Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
    Edited by: Vinod Kumar on May 17, 2011 1:36 PM

  • How do I change the query based on parameter value

    hi,
    Based on parameter value I want to change my query. If paramter value is 'O' i want the 'order by depno' in query if the value is null i don't want the order by clause.
    How do I achieve this.
    Thanks
    Ram

    U can use lexical parameter
    i.e u create one user parameter and in query
    u use this parameter with &param_name
    ex.
    select val,prize from stock where sr_no > :srno
    orderby &ord_by
    here ord_by is lexical parameter
    and set its intial value to 'sr_no'
    so u can get result order by sr_no
    this parameter is set from form so u will give condition in form and depending
    on condition u will pass this parameter from form.

  • Display Report Field as Parameter value

     Hi All,
    Is it possible to show Programcode as a Parameter value on the report header, I am using ProgramID as a Parameter?
     Please let me know.
    Below is the SQl Code
    Declare @ProgramID int
    Select ProgramCode,Name,Abbrevation from Program
    where ID=@programID

    Hi NaveenCR,
    Per my  understanding that you want to  display the multiple value in the parameter dropdown list to display in the Report  header, right?
    I have tested on my local environment and details information below for your reference:
    You can create an multiple value parameter(ProgramID) based on the field "ProgramCode"
    Using the expression below in the report header to get the multiple value from the drop down list of parameter:
    =Join(Parameters!DateKey.Value,",")
    Or:
    =Join(Parameters!DateKey.Value," ")
    If your problem still exists, please tried to provide more details information about your requirement and snapshot of the layout you want.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • SSRS table report based on parameter

    Hi ,
    I have @EMP parameter in ssrs report, for every employee there are ticket numbers. For one one Employee there may be two or three tickets. When I select @EMP1 in parameter a table will be displayed and on top of table ticket number is coming.If there are
    2 tickets for the same employee , two tables( table1,Table2) should come and the ticket numbers come ticket1 on table1 and ticket2 on table2 should come ...means based on the parameter slection the ticket numbers are coming and as per the number
    of tickets the cout of tables are coming....please help me in this .......I am using SQl not MDX :)

    Hi,
    According to your description, every employee have different tickets. Now you want to set a parameter, when you select one value from parameter, tickets of employee will appears in different tables separately.
    In this scenario, we can’t create a textbox out of a list, which can make ticket numbers dynamically appear on top of table based on parameter selection. However, we can combined a matrix with a list. Then create two parameters to select different values
    to show different tickets for same employee in different tables separately. Please refer to steps below:
    1. Add DataSet1, fill in with Employee, Ticket and Number.
    2. Add Dataset2, use query like below:
           Select distinct Employee from tic
        Use query in Dataset3 like below:  
           Select distinct Ticket from tic
    3. Add parameter @Employee, open Report Parameter Properties. On General page, choose “Allow multiple values” box. On available Values page, choose Get values from a query, set Dataset as DataSet2, Value filed as Employee, Label filed as employee. Add
    parameter @Ticket in the same way.
    4. Create a table, right click [Employee], choose Add group->Row groups->Parent group. In Group by box, choose Employee. Choose Add group header and add group footer boxes.
    5. Delete original Employee column. Right click [Employee], choose Split cells. Delete second row and forth row.
    6. Create a matrix, fill in with Employee, Ticket and Number.
    7. Create a list, drop the matrix into list. Right click anywhere in list, choose Select->Tablix3 to select list. On Properties, set DataSetName  as DataSet1.
    8. On Row Groups, choose Add Group->Parent Group from drop-list of (Details1). On Tablix group, choose [Ticket] from drop-list of Group by box. Looks like below:
    9. Click Preview, select different value from drop-list of parameters. The results look like below:
    Reference: Lists (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • Configuration Manager 2012: Report -software 06B-Parameter Value

    Customer is deploying IE 9 and would like to run the report to show the status.
    However, when they run the report-software 06B, the Parameter Value only list IE7,  no IE 8 and IE 9.
    Please help to solve this question, thanks.

    Yes I know this is an old post, I’m just trying to clean up old posts.
    That report is based on AI (ARP) data and therefore if you didn’t install IE 8 or 9 on a PC it will not be listed.
    http://www.enhansoft.com/

  • Need to supress main report based on shared value comes from subreport

    Hi,
    I have a database that is used in both main report and subreport. On main report I have column a,b ,c, d,e,f to display in detail section, the subreport (column c, g,h etc) is also displayed on detail section, the link between main report and subreport is column a,b and a formula based on the value of c. So the link is within one database, some records link with other records  and display both matching records on one line(especially column c shows one value in main report and another value in subreport). That's why I need subreport and I can display the report correctly.
    Here is my question: if one record in main report couldn't find a match in subreport (subreport is blank), then I would like to show this record; if one record in main report does find a match in subreport, I don't want it to show(need to be supressed). I can define a shared variable to flag whether the subreport is blank or not, but this shared variable has to be placed under the section of subreport in main report and I don't know how to supress the upper detail section with subreport in it.
    Any help would be appreciated!
    Helen

    Hi
    In this case you need to insert the same sub report twise.
    Example :
    Detail a--Insert the sub report and go in sub report suppress all sections and using shared variables bring the value to main report.
    Detail b -- based on detail a sub report suppress the main report records
    Detail c-- Your actual sub report will display the values.
    Note : use the same links for your detail 'a' sub report which you are using for detail 'c' sub report.
    Thanks,
    Sastry

  • Hide column based on parameter value

    Hi All,
    I have requirement where i need to hide one column based on my input parameter value.per example
    if my parameter say DISPLAY is Yes then i need to hide the column AMOUNT..
    how to achieve this... Please help.
    Thanks
    Bharat

    Hi Bharat,
    You can do it following the steps explained in the documentation :
    http://docs.oracle.com/cd/E12844_01/doc/bip.1013/e12187/T421739T481157.htm#4535373
    regards
    Jorge
    p.s. If this answers your question then please grant the points and close the thread

  • Exception is thrown while launching report , after entering parameter value

    I have a cystal report, which prompts for parameter value to be entered. When I enter the value and hit okay, an exception is generated. The call stack of the exception :-
    at CrystalDecisions.Windows.Forms.ParameterFieldInfo.get_isDCP()
    at CrystalDecisions.Windows.Forms.ParameterValueEditControl.Start()
    at CrystalDecisions.Windows.Forms.ParameterUnit.AddEditControl(ParameterValue pv)
    at CrystalDecisions.Windows.Forms.ParameterUnit.UpdateControls()
    at CrystalDecisions.Windows.Forms.ParameterUnit.set_ParameterFieldInfo(ParameterFieldInfo value)
    at CrystalDecisions.Windows.Forms.InteractiveParameterPanel.ShowParameters()
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.ShowInteractiveParameters()
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.ShowReport()
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.OnPaint(PaintEventArgs evtArgs)
    at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
    at System.Windows.Forms.Control.WmPaint(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.ContainerControl.WndProc(Message& m)
    at System.Windows.Forms.UserControl.WndProc(Message& m)
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.WndProc(Message& msg)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    Can you please help me with this. Its strange that I do not have similar issue with other reports which prompt for parameter , However in this case the issue lies with show dialog box button in the parameter panel menu which throws an exception if the user clicks the show advanced dialog box button)

    Thank you . I used the MSI listed. Sorry to bother, but couple of questions ., firstly I cleaned up my system to make sure that I do not have any crystal reports assembly in GAC.
    Then I installed the msi per link suggested above and it did install crystal report 2008 sp3. After installing , I noticed that the gac contained 2 versions of assembly for CrystalDecisions.CrystalReports.Engine (Version - 12.0.1100.0 and File version 12.3.1101.684) and the other
    CrystalDecisions.CrystalReports.Engine (Version 12.0.2000.0 and File version 12.3.2001.684).
    I am little confused, why does it install 2 different version of assemblies.
    Also my application needs reference to the crystal reports assembly and since after installing the MSI, it was registered with GAC, I had to copy the content of GAC to a different folder (temp folder )and referenced the dll from temp folder.
    When I copied the contents of GAC, I could copy the Version 12.0.1100 only but not the other one. I want to use the version 12.0.2000.0 and see what happens, but how ?
    FYI - I tested with version 12.0.1100.o and file version 12.3.1101.684, the issue still exists.
    I hope you can help me
    Thanks.

  • Sub Query selection based on parameter value selected

    I have a parameter, and based on the value selected, I want to run one of two queries. I thought I could do either an IF THEN ELSE, or a CASE, but neither seem to be working.
    What I'm trying to do is this:
    IF parameter_value = 338 THEN
    (RUN THIS SELECT QUERY)
    ELSE
    (RUN THIS SELECT QUERY)
    END IF
    or
    SELECT CASE WHEN parameter_value = 338 THEN (RUN THIS SELECT QUERY)
    ELSE (RUN THIS SELECT QUERY)
    END X
    I'm getting errors with both. For the CASE statement, it says "too many values". For the IF statement, it just says "invalid SQL statement".
    Any suggestions would be appreciated.
    Thanks.

    Looks like this is what you want
    SQL> WITH T
      2       AS (SELECT LEVEL col
      3             FROM DUAL
      4           CONNECT BY LEVEL <= 5)
      5  SELECT *
      6    FROM T;
           COL
             1
             2
             3
             4
             5
    SQL>
    SQL> VARIABLE parameter_value    NUMBER
    SQL> EXEC    :parameter_value := 338;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> WITH T
      2       AS (SELECT LEVEL col
      3             FROM DUAL
      4           CONNECT BY LEVEL <= 5)
      5  SELECT col
      6    FROM T
      7   WHERE col = DECODE (:parameter_value, 338, col, :parameter_value);  --- If 338 then select all if not 338 select only the one with parameter_value.
           COL
             1
             2
             3
             4
             5
    SQL>
    SQL> EXEC :parameter_value := 2;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> WITH T
      2       AS (SELECT LEVEL col
      3             FROM DUAL
      4           CONNECT BY LEVEL <= 5)
      5  SELECT col
      6    FROM T
      7   WHERE col = DECODE (:parameter_value, 338, col, :parameter_value);
           COL
             2
    SQL>
    SQL> EXEC :parameter_value := 3;
    PL/SQL procedure successfully completed.
    SQL>
    SQL> WITH T
      2       AS (SELECT LEVEL col
      3             FROM DUAL
      4           CONNECT BY LEVEL <= 5)
      5  SELECT col
      6    FROM T
      7   WHERE col = DECODE (:parameter_value, 338, col, :parameter_value);
           COL
             3
    SQL> You need to use following where clause in your query
    WHERE column_name = DECODE (parameter_value, 338, col, parameter_value); -- replace the column_name with name of the column you are comparing against.G.
    Edited by: G. on Mar 8, 2011 3:36 PM
    formatted and added comments

  • Scheduling a Report with Dynamic Parameter Values

    Post Author: etlag
    CA Forum: Publishing
    I have created a report using a parameter that has dynamic values - meaning the user can choose a date from a specific field. It works fine once published in InfoView, but when I schedule the report, when I try to enter the parameter I get promted for a login for the database, even though I have already entered this in the CMC report properties.
    I have other reports that are using static values and they can be scheduled without entering the database login.
    Any ideas what I am missing?

    Post Author: amr_foci
    CA Forum: Publishing
    dear etlag
    its known issues, you've to set the default database connection to this report from the "CMC" web-bases appliaction , find this object click it go to "process" tab and then click the "database" tab,,, set your default database connection there and finally dont forget to set "Use same database logon as when report is run" at the end of the page
    and cilck ok
    try it ,, good luck
    Amr

  • Order by clause  based on parameter value

    hi,
    i am using reports 6i with 10 g db
    I have to create a report sorted in order of four fields. there is a parameter for selecting which field should come first in order by clause.
    ie the user has provision to view the report in selected sorted order
    suppose the four fields are emp_id, name, dept_id, desig .
    if the user select dept_id , then the order by clause should be in order of dept_id,emp_id,name,desig
    Please help to solve this scenario.
    Thanks

    Hi Rinz,
    Use the query as follows :
    select column_name1, column_name1, ....
    from  table_name
    &order_by_clauseNow in the AFTER-PARAMETER-FORM trigger set the order by clause as below depending upon requirements :
    if :sort_column = dept_id then
      :order_by_clause := 'order by dept_id,emp_id,name,desig';
    else
      :order_by_clause := 'order by emp_id, dept_id, name,desig';
    end if;
    Here sort_column is User parameter which will be selected by user, provide list of Values for it.
    Hope this helps
    Best Regards
    Arif Khadas

  • Display pass or fail in Report based on return value

    Hi,
    I'm trying to integrate TestStand with TestComplete using the ActiveX/COM server adapter.  I have the COM setup so that TestStand can call a test in TestComplete and have TestComplete return a string value (true|false) to TestStand.
    Now I need to get the TestStand report to display "pass" or "fail" text for this sequence call,  based on the return string from TestComplete.
    Is there someplace in Expressions or Post Actions that I can state and how:
    return value "True" = pass
    return value "false" = fail
    Thanks.
    Solved!
    Go to Solution.

    Hi,
    Option 1.) Use a String Value Test.   The Limits.String would be 'True'.  This would be the easiest because you already returning strings from your ActiveX call.   You could make your ActiveX calls a String Value Test.
    Option 2.) Use a Pass/Fail Step.   You could set the returned string to a local variable and then create another Pass/Fail step that would have the Pass/Fail criteria as Locals.StringReturned == 'True'
    These are two options that hopefully can get you started....
    Thanks,
    PH

Maybe you are looking for

  • Dunning printout

    Dear gurus While running the dunning through F150 It generate the dunning data but while prinout the dunning data in the form F150_DUNN_01 it shows the following message. I have checked the table T047E the details are avialble in the table. Dunning n

  • Connecting SAP BI 4.1 to BPC 10

    Hi, I am looking to connect SAP BI 4.1 to BPC 10 and want to understand the best way to connect to the system. We were SAP BPC 7.5 and the ODBO connector was bad...very bad... So we had to export data out of BPC to BW. I know these is a XMLA connecto

  • Where to maintain Turksih translation for customer specific status?

    HI gurus, How was your New Year? I am kindaa of stuck at maintaining translations from English to Turkish. To maintain translation e.g. For Ee grp I go to Table T501 > on the menu GOTO > Translate > select the language > enter Turkish words. but for

  • Phone app improvement suggestion

    For what it's worth, I thought I'd put this out there.  Perhaps someone else has found a simliar awkward experience.  about the phone app, which could easily be improved. After launching the Phone app, when searching a Contact would it not make sense

  • Rebuilding databases

    Hi, The question below is on rebuilding databases. I have the intermedia to index xml documents .The encoding of the xml documents is UTF-8. The Oracle database has a character set as "WE8ISO8859P1". The tokens do not get indexed for 2-byte character