Formula for comparing string and setting text object to visable?

I have a report that is pulling data from a database and listing multiple records, one on each page. I am wanting to compare a value that is stored in a database field for each record and setting a text object visible based on the text.
I'm very new to Crystal Reports and not quite sure on the type of syntax needed to perform what I'd like below and can't find much information online about it. The type of formula I want would be something like:
if (vDetailReport.BoardAction = "Board Action w/Committee Action")
    txtBox1.Visible = True;
else if (vDetailReport.BoardAction = "Board Action w/o Committee Action")
    txtBox2.Visible = True;
else if (vDetailReport.BoardAction = "Committee Discussion Only")
    txtBo3.Visible = True;
etc.
The txtBoxes are text objects with an "X" as the string that are inside the boxes to appear as a checkbox. I'm wanting this to work for every record in the report.
Example:
http://img.photobucket.com/albums/v57/kaje103/boardaction.png
Any help would be much appreciated!

I believe that what you want to do here is place an text item consisting of an "X" at each location you want. Then select "Format Text", go to the Common Tab, and click on the button next to "Suppress". That allows you to put in a formula such as:
{vDetailReport.BoardAction} <> "Board Action w/Committee Action"
that will suppress the X unless it's the value you want checked.

Similar Messages

  • Formula for comparing dates and display data

    I have 3 objects on my query: Date, Product name and Quantity sold
    I have a table on my reports showing the top 3 products by quantity sold, and I want to add the quantity sold today on the same table.
    I am looking for a formula that compares de dates provided by the query with current date and only displays on the cell the quantity for the current day.
    Any ideas are welcome!

    As per my understanding, you want to display the today's sale of the product while the ranking is aaplied on the total quantity
    sold.
    You can create a new variable with either of the following two definitions:
    Today's Date = CurrentDate()
    Today's Sale = Sum([Quantity Sold]) where ([Date]=[Today's Date])
    or
    Today's Sale = If(([Date]=[Today's Date]) Then Sum([Quantity Sold])
    Note: The two date formats should be same.
    For getting the top three products you can use the hidden column(font, border and background white) and apply the ranking on
    the total sale coming from the DB.
    Regards,
    Rohit

  • In DeskI, what's the maximum for "Limit size of long text objects"? 2000?

    In Universe Designer, we have a setting which is "Limit size of long text objects", it can control how many characters can be displayed for long text objects.
    The problem is that in DeskI, we can only display 2000 characters even we set 2500 or more in Universe Designer by "Limit size of long text objects". But if we use the same Universe & same Database, WebI can show 2500 or more characters for long text objects.
    So does it mean in DeskI the maximum value for "Limit size of long text objects" is 2000?

    Hi Jason,
    Check that the object in the universe is set to data type "long text".
    Also check that the object itself is not limiting the length of the string, as well as that the entire string is actually in the database... the data type here could also be the issue.
    Hope this helps
    Jacques

  • Searching for a string in given text file

    Hi,
    I have two strings and i need to search the entire file for the strings and highlight the lines between the strings
    say, for example,
    hi this is xyz
    i am a begineer in java
    can i have some help in this issue please
    i gave 'hi' and 'can' i need the three lines to be highlighted
    can you give me an idea about this.
    how to proceed
    thanks all in advance
    Edited by: anub on Feb 6, 2009 3:24 AM

    Here's an idea. Find a link to the java API. Create a utility class with a method to read a file and a method to write a file. Look in java.io for this. That should keep you busy for a while and give you something specific to ask questions about. Next, create a GUI class and put a button on it. Figure out how to make a button click open a "FileChooser" or "JFileChooser" (Look in the api for that) Imagine that these need to talk to each other so figure out what parameters are needed. After you've done that then figure out how the user is going to enter the two search criteria (something that acts like a text field). Choose a GUI class that supports text highlighting. Display all the information that the user would like to know e.g. The name of the file selected to parse, the name of the file to write, and whether the strings were found successfully.
    kr
    walker

  • Validation For Date,String and Date in a reports Region

    Apex 4
    Good day to all apex users How do I validate a apex_item.text if the value is string the user can only input a string value if it is number then the user can input numbers only and if it is a date the user can only input a date values?

    APEX_ITEMS are not part of the default apex gui... In fact they are just functions which returns html.
    You can however do some stuff with the attributes parameters. You can find some cool stuff over here: Re: Validation For Date,String and Date in a reports Region
    If you want apex validation you need to create a page validation and loop over your apex_items with apex_application.g_f0x
    Br,
    Nico

  • Setting Up IIS 5.1 for ColdFusion 9 and Setting Up ColdFusion 9 for IIS 5.1

    Can someone point me in the direction of instructions for setting up IIS 5.1 for ColdFusion 9 and setting up ColdFusion 9 for IIS 5.1

    I Googled "coldfusion 9 iis 5" and the first result is a detailed set of instructions on how to do it.

  • Convert String and set as displayname for mailbox in bulk

    Hi All,
    Need a favor to convert the existing displaynames to right format and then set the displayname for bulk mailboxes.
    Current Displayname - "Ranji Rock MBA\DBA\RISK\FIN"
    I need a script to convert the above text to "Ranji Rock MbaDbaRiskFin" and set it as displayname. Could someone help me to remove those slashs in the text and adding the first letter in caps??
    Never giveup till you get what to want.

    This should work, or give you a direction to head to, but please test it on a test OU first!!!
    $users = Get-ADUser -SearchBase "OU=Users,OU=To,OU=Path,DC=Here,DC=Company,DC=your" -Filter * | select sAMAccountName, Name, Displayname, 
    ForEach ($User in Users){
    $ExistingDisplayName = $User.Displayname
    $Newdisplayname = $ExistingDisplayName -replace "\\","" #Need the \\ as \ is an escape Charactor
    Set-ADUser -Identity $User.sAMAccountName -Displayname $Newdisplayname
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. If you find an answer helpful
    then please "Vote As Helpful"
    Adam - the OP is looking to rename the displayname of mailboxes, not the AD accounts.
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • Need help getting information out of array and into text/object files

    Im having alot of trouble with this i have the classes for the array, text reader and writer, and object reader and writer mostly done. I originally had a getInfo method in my object and text classes to input the data needed, but that wasnt how the instructor wanted. So my question is how do i take the infomation in the array in class studentarray and send that information to the text and object classes? I have looked online for an example and cant seem to find one that looks like it would work. I am pretty sure what i need will be put in the class StudentArray
    here is requirements i havent figured out how to implement
    - read student records from a �text� file
    - write student records into a �text� file (new data after sorting)
    - read student records from an �object� file
    - write student records into an �object� file (new data after sorting)
    I have sorting methods below in StudentArray just didnt post them
    public class StudentArray {
    private static Scanner input = new Scanner(System.in);
    private static student sArray[] = new student[5];
    public static void insert() throws NegativeIDException
    for(int i = 0; i < 5; i++)
    System.out.println("Please enter firstname:");
    String Fname = input.next();
    System.out.println("Please enter lastname:");
    String Lname = input.next();
    System.out.println("Please enter id:");
    int Id = 0;
    try
    Id = input.nextInt();
    NegativeIDException nide = new NegativeIDException("No negative number for id.");
    if(Id < 0)
    throw nide;
    scanner.nextLine();
    System.out.println("you must enter a positive number try again");
    catch(InputMismatchException ime)
    System.err.printf("\nException: %s\n", ime);
    scanner.nextLine();
    System.out.println("you must enter an integer try again");
    System.out.println("Please enter year admitted:");
    int Admitted = 0;
    try
    Admitted = input.nextInt();
    NegativeIDException nide = new NegativeIDException("No negative number for id.");
    if(Admitted < 0)
    throw nide;
    scanner.nextLine();
    System.out.println("you must enter an integer try again");
    catch(InputMismatchException ime)
    System.err.printf("\nException: %s\n", ime);
    scanner.nextLine();
    System.out.println("you must enter an integer try again");
    System.out.println("Please enter Gpa:");
    double Gpa = input.nextDouble();
    int t = 0;
              int q = 0;
              System.out.println("Please select your track");
                   System.out.println("1 for doctoral student");
                   System.out.println("2 for graduate student");
                   System.out.println("3 for major student");
                   System.out.println("4 for minor student");
                   t = input.nextInt();
                   if (t == 1)
                             System.out.println( "Please select your doctoral topic");
                             System.out.println("1 for Video Games");     
                             System.out.println("2 for CPU History");     
                             System.out.println("3 for Other");     
                             int c = input.nextInt();                         
                             String diss = "";
                             if (c == 1)
                                  diss = "Video Games";     
                             else if (c == 2)
                                  diss = "CPU History";
                             else if (c == 3)
                                  diss = "Other";
                             sArray[i] = new CSDoctStudent(Fname, Lname, Id, Admitted, Gpa, diss);
                             q++;                              
                        else if (t == 2)
                        System.out.println( "Please enter the number for your graduate course");
                        System.out.println("1 for Software Engineering");     
                        System.out.println("2 for Theory");     
                        System.out.println("3 for Other");     
                        int b = input.nextInt();
                        String Theory = "";
                        if (b == 1)
                             Theory = "Software Engineering";     
                        else if (b == 2)
                             Theory = "Theory";
                        else if (b == 3)
                             Theory = "Other";
                        sArray[i] = new CsGradStudent(Fname, Lname, Id, Admitted, Gpa, Theory);
                   q++;     
                        else if (t == 3)
                             System.out.println( "Please enter the number for your major course");
                             System.out.println("1 for Hardware");     
                             System.out.println("2 for IS");     
                             System.out.println("3 for Theory");     
                             int m = input.nextInt();
                             String track = "";
                             if (m == 1)
                             track = "Hardware";
                        else if (m == 2)
                             track = "IS";
                        else if (m == 3)
                             track = "Theory";
                             sArray[i] = new CSMajorStudent(Fname, Lname, Id, Admitted, Gpa, track);
                             q++;     
                   else if ( t == 4)
                             System.out.println( "Please enter the number for your minor course");
                             System.out.println("1 for Computer Application");     
                             System.out.println("2 for Multimedia");     
                             System.out.println("3 for Web Technology");
                             int d = input.nextInt();
                             String Hardware = "";
                             if (d == 1)
                                  Hardware = "Computer Application";     
                             else if (d == 2)
                                  Hardware = "Multimedia";
                             else if (d == 3)
                                  Hardware = "Web Technology";
                             sArray[i] = new CSMinorStudent(Fname, Lname, Id, Admitted, Gpa, Hardware);
                             q++;     
                   else;
    sArray= new student(Fname,Lname,Id,Admitted, Gpa);
    //trying to write it to a text file with this
    import java.io.PrintWriter;
    import java.util.Scanner;
    import java.io.File;
    import java.io.FileNotFoundException;
    public class TStream {
    private Scanner input = null;
    private PrintWriter output = null;
    private student [] sArray = new student[5];
    public TStream()
    public void write()
    try
    output = new PrintWriter("tdatabase.txt");
    for(int i = 0; i < 5; i++)
    output.print(sArray[i].getFname() + "\t");
    output.print(sArray[i].getLname() + "\t");
    output.print(sArray[i].getId() + "\t");
    output.print(sArray[i].getAdmitted() + "\t");
    output.print(sArray[i].getGpa() + "\t");
    output.println();
    output.close();
    catch(FileNotFoundException fnfe)
    System.err.printf("\nException: %s\n", fnfe);
    System.out.println("Can not open this file.\n");
    public void read()
    try
    input = new Scanner(new File("tdatabase.txt"));
    for(int i = 0; i < 5; i++)
    String Fname = input.next();
    String Lname = input.next();
    int Id = input.nextInt();
    int Admitted = input.nextInt();
    double Gpa = input.nextDouble();
    sArray[i] = new student(Fname,Lname,Id,Admitted,Gpa);
    input.close();
    catch(FileNotFoundException fnfe)
    System.err.printf("\nException: %s\n", fnfe);
    System.out.println("Can not open this file.\n");

    Use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • How do I search for a string in the Text tab of the Layers panel

    I have a world map with a text layer for country names.  I hide the country names as needed by clicking on the 'eye' icon for Toggle Visibility in the Layers panel.  I've inadvertently hidden one name and I need to know how to find it in the Text panel so I can make it visible again.  How do I seatrch for a name in the Text panel?

    Just in case there is an unlocked and visible object close to the hidden one in the stacking order, you may select that object right on the artboard and then go to the Layers palette menu and take the Locate Object command.
    Of course, this would be just one possible workaround to locate the hidden objects a bit easier.

  • Difference in a string and the text retrieved from JTextBox

    Hello,
    I am facing a peculiar problem. Please see the following code fragment:
    m.replaceAll(";\ngo;);
    where m is a matcher. This is working fine. But whenever I am doing
    m.replaceAll(myTextBox.getText());
    and placing ";\ngo;" in the text Field is not working as before. This is because that getText() returns a string in text form(doesnot take the newline into consideration). Any idea how to solve this?
    Regards,
    Saurav

    Here is the following code:
    File fin = new File(file);
    File fout = new File("C:\\Temp\\temp123.txt");
    FileInputStream fis = new FileInputStream(fin);
    FileOutputStream fos = new FileOutputStream(fout);
    BufferedReader in = new BufferedReader(new InputStreamReader(fis));
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));
    Pattern p = Pattern.compile(find);
    Matcher m = p.matcher("");
    String aLine = null;
    while((aLine = in.readLine()) != null) {
    m.reset(aLine);
    String result = m.replaceAll(replace);
    out.write(result);
    out.newLine();
    in.close();
    out.close();
    What I intend to do is that the user will provide a fileName from the GUI and also the text to find and the text to repalce with. Both of them will be in a JTextBox. Now
    suppose I want to replace ";" in the line "Hello;" with ";\nHow are u?" so that the line looks like
    "Hello;
    How are u?"
    But what is happening is that the line looks like
    "Hello;\nHow are u?" after replacement.
    This happens because getText() doesnot considers that as a special character...
    I tried to harcode the replace string and it worked perfectly....
    Thats the problem.....I need the same behaviour with getText().
    Regards,
    Saurav

  • I need to get 2 decimal places when using a formula for a quotient and Numbers will only give me whole integers which is useless since most items will be less than 1. How can I change this?

    How do I get 2 decimal places when using a formula for a quotient? It only gives me whole integers. Most of the results will be less than 1 so I need 2 decimal places

    the quotient function returns only whole number portion of the dividing two numbers.  If you want the actual decimal value use the divide operator.  you enter this as:
    A/B
    if the numerator is in A1 and the denominator is in B1 you can enter the formula like this:
    =A1/B1

  • Significance of Long and short text Objects

    Hi all,
    I want to know the difference between Long and short texts and scenarios in which long texts are better to use than short texts.

    long text used for more than 256 character store in db.
    long text example,
    mm01 t_code sales inform
    to save the long text call function `save_text`.
    short text.
    field Description

  • HT4528 how do i increase volume for incoming calls and incoming text?. i have it to max

    i have incoming and text messaging to the maximum volume. How can i increase it?

    If while you are in Messages and set the volume, that is all you can get. You can try and see if Volume Limit is checked by going to Settings>Music and see if Volume Limit is off.
    The only other thing I can recommend, is to create your own ringtone/text tone in a music editor and increase the volume in the file. You may also want to check your speaker area and see that it is clean and not blocked by any debris.

  • Function module for comparing dates and times

    Hi,
    I have a date and time stamp in one filed for example as below:
    20070125183045
    (the first 8 are date in YYYYMMDD format, the next 6 is time in HHMMSS format). Now I want to compare this value to another such value in terms of date and time. First I want to compare dates and then times. Do you know any function module that can serve this purpose?
    Thanks very much!

    You can compare these using the function module DURATION_DETERMINE.  This fuction will give you the difference, and it can be in a view different units, such as the difference in days, months, etc.
    Funciton module takes in Start date and time and end date and time.
    Regards,
    RIch HEilman

  • Code for replacing 'get' and 'set' method

    Hi,
    I was a struts programmer but now i am a jsf programmer :-)
    I was able to do the following with struts but no with jsf...
    The following code in struts allowed me to have no 'get' and 'set' method in the javabean for a property (for example, the property 'name'):
    ValueStack valueStack =ActionContext.getContext().getValueStack();
    valueStack.set("name", "John");
    ActionContext.getContext().setValueStack(valueStack);In the jsp, using the corresponding label to retrieve the 'name' property, returned value 'John'.
    Is there something equivalent in jsf?

    Hi, see on here.There are solutions for JSF, JBoss Seam: [Solutions for Java, JSF, JBoss Seam and Flex|http://flextrick.blogspot.com/]

Maybe you are looking for