Encryption of a parameter field

How can i encrypt parameter field as password?
Thanks
Puneet Chopra

Hi,
check following code:
PARAMETERS:
   p_pass TYPE char30.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name = 'P_PASS'.
      screen-invisible = 1.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
start-of-selection.
    write:/ p_pass.
Thanks & Regards,
Navneeth K.

Similar Messages

  • Report using Parameter Field

    Hi,
    I have designed one report using Parameter Field which is Cost Code (string).
    When I run my report, I ask to enter cost code. When I enter cost code 30, I get report for all transaction of cost code 30 and 300.
    How could I avoid this problem.
    Thanks
    Mithani

    Try with this
    {Project_cost.EXPENSES_Code} IN {?Cost Code}
    and also
    Check the query formed after giving the input parameter. Goto Database --> Show Sql Query.

  • Pass the results from a selection formula to the default values for a parameter field

    Post Author: kevans
    CA Forum: General
    Crystal 10 u2013 SQL 2000
    I want to create a parameter field that will display all of our IT Departments so the end user can select the one they want to run the report against, such as IT-Security, IT-Network, etc. about 40 in all.  BUT I donu2019t want this to be a static list where I type in all 40 depts in the default list, I was hoping I could do something more dynamic such a formula field that says u201C if {group.name startswith u2018ITu2019 then {group.name}u201D and then have the parameter field pull from this source.
    Iu2019m sure this has been answered in a previous post but Iu2019m not finding it.  I see stuff on creating a record selection formula such as u2018if {?group} like u2018IT-Secur*u2019 thenu2026u201D  but this leaves too much room for error if people donu2019t type the name correctly.  Maybe Iu2019m not using the record selection formula correctly?  Sorry if I offend anyone but I just upgraded from 8 to 10 and thought for sure this option would be in 10, perhaps built right into the parameter default value page where you can place in select criteria but NOTHING has changed.

    Post Author: sharonmtowler
    CA Forum: General
    if you are creating the parameters in the rpt file, it will only pull values you enter, or directly from the database
    in the record selection you can do something like this, so if they only enter the first 2 characters it should pick up only the IT etc.
    (if eft(,2)={?parameter} then true else ={?parameter})

  • Parameter Field Value returns "no records"

    I am using Crystal 11 and am new to Crystal but not to other Reportwriters.  I have a Crystal report that has 2 parameter fields, one is "Enter Date" that prompts for the start and end date, the other "Select Items" prompts for the supply Item Numbers to be included in the report.  In the "Edit Parameter: Select Items:" edit/create parameter dialog, the Select Item parameter has "Allow Multiple values" and "Allow discrete values" set to true. The report runs fine and returns any items entered in the "Select Items" prompt that has usage during the start & end date.  My problem is ... if the entered Item Number for the Select Items parameter returns no records, I cannot report that Item Number as having zero usage.  I cannot find a way at the time of report running to identify and report the "not found" items.  I would also like to report the Start and End Dates parameters requested, but cannot, the Enter Date parameter returns an empty parameter field across the whole report.  I'm sure other users have had this problem of reporting the requested parameter values.   Need assistance.  

    Jeff's answer is one way to do it.  There are others:
    If you want the items with no data interspersed with the other items (say, in item number order), then you'd change the report to use your item master table and do a left join from that to the usage data.  If a field from the usage table is null, then there was no usage, and you can condition a message based on that.
    Or, if your parameter selects item numbers without some type of "ALL" option, then you can use arrays to keep track of which if the selected items printed.  Then in the report footer, compare the list of items reported to the parameter items, and show which item numbers had no usage.  (This might run a tad faster than the separate subreport that Jeff suggested - but maybe not...)
    HTH,
    Carl

  • Passing a value to a Parameter Field From a VB Form

    Post Author: as1971
    CA Forum: General
    Hello everyone
    I'm using Visual Basic 6.0 and Crystal Report 9.0
    I built a report using Crystal Report and named it Player_Statement.rpt. I then included it to my VB project and named it Player_Statement.Dsr
    In this report I have a Parameter Field called P_Player_ID which I'm using in Record Selection Formula.
    I'm using the following code to pass a value to the parameter:
    Dim Report As CRAXDRT.ReportSet Report = New Player_StatementReport.ParameterFields.GetItemByName("P_Player_ID").AddCurrentValue CLng(cmbPlayerNB.BoundText)
    When I execute the application I get the error message "The value or range you are adding has already existed" at the last line of code (Where I'm assigning the parameter a value)
    Could anybody help me please

    Post Author: VinoTinto
    CA Forum: General
    Dim Report As CRAXDRT.ReportSet Report = New Player_StatementReport.GetItemByName("P_Player_ID").ClearCurrentValueAndRange                                               Report.ParameterFields.GetItemByName("P_Player_ID").AddCurrentValue = CLng(cmbPlayerNB.Boundtext)

  • Filtering report data based on user login and Parameter fields

    Post Author: mronquillo
    CA Forum: General
    Hi,I am running a report that filters data based on the user login. To do this, I created a formula called @user that compares the login name (using the CurrentCEUserName field) and returns the user's name. If the user login is not a login specified in the if statements, it returns the parameter field "user_name":For example: if CurrentCEUserName = "loginname1" then "User's Name 1"else if CurrentCEUserName = "loginname2" then "User's Name 2" else if CurrentCEUserName = "loginname3" then "User's Name 3"  else if CurrentCEUserName = "loginname4" then "User's Name 4".. .else {?user_name}   In select expert, I have a condition which filters data based on the string returned from that formula:{Table.Name} = {@user}  This works fine and when the users run the report they only their own data. However, they are still prompted to choose a parameter field regardless if of the value returned by the @user formula. Oddly enough, regardless of what parameter field they choose, they will still only see their own data (i.e. if John chooses "Bob" from the parameter list, he will still only see John's data.)If I remove the "else {?user_name}" line from the @user formula, then the users are not prompted anymore. However, if they are not a "valid" user - that is, if any of the if statements in the formula are not true for their login name - then they will see no data. What I want to do is make the report ONLY prompt the user to choose a parameter field if their login name is not "valid". That is, if the @user formula is able to return a string value for their login name, then they will jump right into the report without being prompted to choose a parameter - otherwise, the user will be prompted to choose a name from the parameter list. I thought my formula would allow this (hence the "else" clause), but it seems that if a parameter field is present in any formula, then the report automatically prompts the user to choose a parameter. Is what I am trying to accomplish possible in CR (I'm using CR v10.0) or is there a better way to do what I am trying to do?Thanks in advance.

    Post Author: sharonmtowler
    CA Forum: General
    try, or something like that
    (if CurrentCEUserName ={?user_name} then true else ({Table.Name} = {@user}) )

  • How to use a parameter field value as a substring in a "like" statement?

    Hi all,
    I'm trying to use a parameter field in a Record selection formula where the parameter field value would be a substring of the data stored in the field.
    My parameter field (SlctResearcher) is constructed as follows:
    Type: string
    List of Values: static
    Value Field: (Reports) RptAuthors
    (in Value Options) Allow custom values?: True
    {Reports.PubDate} in DateTime (2009, 04, 01, 00, 00, 00) to DateTime (2010, 03, 31, 23, 59, 59) and
    {Reports.RptAuthors} like "*{?SlctResearcher}*"
    When I hit F5 to generate the data, I get no results (and the parameter prompt field does not even come up...)
    If I modify the formula to put a hard-coded string, like
    "*Jones*"
    after the 'like', I get results (all the reports where "Jones" is a substring in the RptAuthors string.) If I modify the formula to just use the parameter field without the quotes/stars like:
    {Reports.PubDate} in DateTime (2009, 04, 01, 00, 00, 00) to DateTime (2010, 03, 31, 23, 59, 59) and
    {Reports.RptAuthors} like {?SlctResearcher}
    I do get the parameter prompt field, but still no results even if I put in a valid substring value (since it is not searching for a substring anymore...)
    How can I do this?
    Thanks,
    Will

    1st thing... Make a copy of your report before doing anything!!!
    To use a SQL Command, you'll want to open the Database Expert and look at the Current Connections. Expand the data source and the 1st option you see is the Add Command option.
    To find the SQL That CR is currently using, choose Database from the menu bar and select Show SQL Query...
    You can copy this and paste it directly into the command window. (If you you can write your own SQL you don't need copy CR's, it's just an option.)
    You'll also want to take not of any parameters that you have, you'll need to add them the the Parameter List of the command as well... be sure to spell them EXACTLY as they are in the design pane.
    Anyway, once the SQL statement is in the Command window you'll be able to alter the WHERE clause to use the wild cards.
    For future reference... What type of database are you reporting against???
    Jason

  • Error while adding Parameter Field to CrossTab report in CR 2008

    Hello Experts,
    I'm getting an error - "Not supported" while I'm trying to add a paremeter to the Crosstab report. It is a simple report with no further complications.
    Is there any special way to add a parameter field to Crosstab? Any help appreciated.
    TIA
    arjun

    Hi,
    What version of Crystal Report are you using? 
    Kindly refer SAP Note 1376117 & 1454192  and verify if you are on the approriate patch.
    Regards,
    Nakul

  • Get the parameter fields defined in crystal report

    I am porting my application from crystal 8.5 written in C++ to crystal 2008 in .net.
    Here I am not making use of crystal report viewer neither I am creating .rpt in .net code.
    I have a set of already created .rpt files.
    I have written a function in .net to export the crystal report.
    Its a generic function and will be called for multiple crystal reports.
    I am passing the parameter values to the report by making use of the following function :
         ReportDocument repDoc;
         repDoc.SetParameterValue(APPTYPE, strNextToken[0]);
         repDoc.SetParameterValue(COMPORROLETYPE, strNextToken[1]);
    Similarly I are setting other parameter values.
    The problem here is that, all the reports do not have parameter fields defined that I am trying to set.
    They may be present for one report and absent for another. In this case , if the report does not have a particular parameter
    field, then it gives error on setting parameters and subsequently fails.
    Now I want to find out through code what all parameter fields are defined in the report. Then I will only set those
    parameter fields?
    Please guide how can this be done.
    Thanks
    Sonam

    Not as trivial as you might think. You will have to loop through all the sections of the report looking for the objects you need. I don't have a code specific to parameters, but looping through al the sections would be something like the code below. But... this will only show you parameters in a section. It will not show you parameters used in a formula, record selection formula, group selection formula, text field or a conditional formula. In order to get those parameters, you's have to parse out each of those objects looking for parameters. And this is probably not an exhaustive list of places to look for a parameter in the report.  I get a headache just thinking about this...
    Dim crSections As Sections
    Dim crSection As Section
    Dim crSubreportObject As SubreportObject
    'set the crSections object to the current report's sections
    crSections = crReportDocument.ReportDefinition.Sections
    'loop through all the sections to find all the report objects
    For Each crSection In crSections
    crReportObjects = crSection.ReportObjects
    'loop through all the report objects to find all the subreports
    For Each crReportObject In crReportObjects
    If crReportObject.Kind = ReportObjectKind.SubreportObject Then
    'you will need to typecast the reportobject to a subreport
    'object once you find it (***you'd go to setting the parameter here - or not...)
    crSubreportObject = CType(crReportObject, SubreportObject)
    'open the subreport object
    crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
    'set the database and tables objects to work with the subreport
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Parameter Field Value Elimination Based on Another Parameter

    I'd like to make 3 grouping parameters with static values to produce 3 drop downs in the user prompt.  The problem is, I'd like for the second drop down to eliminate the choice made from the first drop down and the third drop down to have been eliminated to only one choice.  Is there a way to edit the parameter field values from the formula workshop?...Or maybe this would be better handled in the group selection formula area.  Any help would be very much appreciated.

    Can't be done unless you use one of the 3rd-party Crystal viewers listed at http://kenhamady.com/bookmarks.html
    A simpler approach is to have a record selection formula that causes no records to be retrieved if 2 parameters have the same selected value.  You can then unsuppress a text object telling the user their parameter selections can't be the same.

  • Formatting a Date Parameter Field

    I created a Date/Time Parameter because the column is date/time.  However, I only want the used to have to input the date portion. I know I can create the parameter as a Date but it returns a negative records even though there are records that meets the criteria.  I know I have done this before, but for the life of me I cannot remember how I did it.
    Can someone refresh my memory.
    Thanks.
    Herbie

    I found a way to get round this, here goes.
    Create a new Parameter
    Change Type to Date Time
    Select Expert
    Select your date time field and set it equal to parameter
    In the parameter fields right click on parameter and select edit.
    Change the type from Date Time to Date
    Select any range values etc at this point because they will reset when you change from date time to date.

  • How to change heading text  for parameter field of type date

    Hi,
        After creating a parameter field with the type " Date Time" when I open the report for entering the parameter then it displays  the given parameter with the following text:
    " Please enter Date in format "yyyy-mm-dd". "
    I want to change it to some other text like as:
    " You have to enter the date and time in format yyyy-mm-dd . "
    Is there any way by which I can change this given header to some other text.
    Let me know if anyone needs some more information in this regard so as to solve my given query soon.

    Hi Garrett,
                  Well first of all I can change only the prompt text that is user defined. I cannot change any parameter as of now whose type is let suppose Date. Since in this case the Business Object itself shows the text which is something like this " Please enter Date in format "yyyy-mm-dd". " .
       Here I want to change this given text to some other format like " You have to enter the date in the format yyyy-mm-dd" or in any other manner.
    Also the current Crystal Report version which I am using is 11.0.0.1282.

  • How do I create a Parameter Field From a Formula?

    I am new to Crystal Reports 2008.  IN version 8.5, I used to easiuly create a formula, and then a dynamic parameter field based upon that forumla.
    In version 2008, thus far, I create a formula field, then I try to create the parameter field, but it won;t give me the optioin of choosing the formula I have created.
    Is this a bug or is this a featuer they removed from version 2008?  I am using Crystal Reports 2008 12.3.0.601.
    Thanks in Advance!
    Travis

    Sure.
    I want to use a Full Name as a Dynamic Parameter.  The DB stores the name in FirstName in one columns, LastName in another.
    Formula:
    FirstName" "LastName
    Then I usually make this the dynamic parameter field, as I am doing with older version of 8.5.
    What am I missing?

  • Modify default value for static parameter field programmatically

    Hi,
    I have my Crystal Reports stored in a BO Enterprise system. I have written a java programm that scans the repository, loads the CR reports one by one into a ReportClientDocument, modifies the data source and then stores the updated report back to repository (it overwrites the existing objects).
    I was even able to modify the default values for the parameters, which are used for scheduling of each report.
    But what I am trying to do know is to overwrite the default value used when invoking the report interactively. This should be the value found under the Default Value field, when the Properties window of the parameter is opened in the CR designer.
    This is what I have tried so far:
    Option 1: First I tried to set the default values using com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.getDataDefinition().getParameterFieldController().getField(...).getDefaultValues() . The only thing I have managed to do using this approach is to modify the static LOVs that are associated to static parameters. The actual selected value (shown under Default Value in the Properties window for the given parameter field) remained unchanged, when invoking the report in the InfoView or opening it in the CR designer.
    Option 2: I have used com.crystaldecisions.sdk.plugin.desktop.report.IReport.getReportParameters().get(ik).getDefaultValues() to change the default values. I was able to see my changes in the BO repository (using a query on CI_INFOOBJECTS), still the changes did not really have an impact to what is displayed as default value when invoking the report in the InfoView.
    Any help will be appreciated.
    It would be great to know if someone of you has already implemented successfully such a use-case.
    Regards,
    Stratos
    Edited by: Efstratios Karaivazoglou on Dec 9, 2009 8:52 AM
    Edited by: Efstratios Karaivazoglou on Dec 15, 2009 11:33 PM

    Hi,
    For Crystal Design related queries, close this thread and start the thread in the [SAP Crystal Reports Design forums|http://forums.sdn.sap.com/forum.jspa?forumID=300&start=0]
    - Bhushan

  • Getting Error with date parameter field -"Invalid DATE"

    Hi
    I created a report with 9.2 version. And  i created 2 date parameter fields in it. And within crystal reports it works fine.
    But If, I call from the VS2005 crystalreport.net(report document) SDK , i am getting error as Invalid Date" enter a Date Value". Actually it is a dtp control. how can i modify it.

    <p>There&#39;s not enough details to get a good understanding of your scenario, but it sounds like you&#39;re using some kind of date control to retrieve the date value and pass it to the report&#39;s parameter field at runtime. </p><p>If this is correct, it sounds like the format of the date value from the control may not be what the report is expecting. To debug, I would first use hardcoded values when you set the report parameter fields to see what works. Then compare that to what the return value is from the control to see if they match. I suspect the formats differ. </p><p>I did a quick search on the BOBJ kbase and found a couple of articles that may help you. I recommend searching as there are lots of information on how to set parameter fields at runtime. </p><p><span style="margin-left: 5px"><a href="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2010247&sliceId=&dialogID=8582434&stateId=1 0 8584068" target="_blank">c2010247</a></span><span style="margin-left: 5px"><span style="margin-left: 5px"><a href="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2010251&sliceId=&dialogID=8582434&stateId=1 0 8584068" target="_blank">c2010251</a></span></span></p><p>-MJ</p>

Maybe you are looking for