Displaying Alternate row as colored in Cross tab

Hi,
I have a report where I need to display alternate rows as colored.
There is some data in detail section followed by a cross tab in the report header section.
While I am able to display alternate rows as colored in Detail secction for displaying alternate colored rows in Cross tab data I need some help.
Data in cross tab is like this
              history geography
Tammy   90          60
Sid         80          50
Julia       70        40
In cross tab for displaying alternate colored rows ie for alternate student names  I am using two formulas
- for displaying row values I am using this one
whileprintingrecords;
numbervar d;
d := iif(d=100,255,100);
color(255,255,d);
For displaying alternate colored inner cells ie marks  I am using this formula
whileprintingrecords;
numbervar c;
c := iif(c =255,100,255);
color(255,255,c)
I got these formulas after doing Googling
My cross tab is present in report footer and in the generated report it comes separeated in two pages.
In the first page data for Tammy and Sid is displayed while Julia is displayed on next page.
Now the Tammy is coming as yellow colored and as expected Sid is coming as white colored. However Julia which is on next page is coming as white , but logically it should have come as yellow. On the other hand my column data ie marks column is coming fine. Data for tammy and sid is coming as alternately colored and data is Julia on the next page is coming as yellow(as data for Sid is in white)
I am not able to understand why this is happening and what is the correct way to do alternate row coloring in cross tabs
Edited by: thunderball10 on Aug 26, 2010 11:57 AM
Edited by: thunderball10 on Aug 26, 2010 12:00 PM

Where is your variable c being reset.
If in page header or group header and you have repaet group header on new page then c will be reset on each page.
If In groupheader try adding this to reset formula
if not inrepeatedgroupheader then
Ian

Similar Messages

  • How to display alternate row colors in struts form?

    hi,
    I am using struts lib to display data in jsp page.
    <logic:iterate id="result" name="listofPorjetcts" indexId = "i">
    <tr>
    <td ><bean:write name="result" property="projectName"/></td>
    </tr>
    how to display alternaternate row colors ?
    any one can help?

    hey i not sure abt structs, what i did for jsp was using a boolean.
    declare boolean red=true;
    <tr
    <%
    if(red){%>
    class="red" >
    <%
    red=false;
    }else{%>
    class="white">
    <%
    red=true;
    %>
    take note that the class is a predefined css. I think u can use style="background-color:#red "
    You can seearch the web for more info.

  • Display two different column types in cross tab

    I am using Cross Tab template in crystal XI and I have to show two different column types one is of type int and other is of type string. Below is the format of the report
                                  AmountGiven             Amount Spent            Attended
    Mike                       5000                              3000                         Yes
    Steve                     200                                 200                           No
    Is there a way I can do this showing "yes" or "no" in the third column???
    Thanks...

    Hi
    If you are trying to show "yes" or "no" for a column value in a cross tab, then yes we can try using a formula for it.
    I would suggest you 2 ways that you can try at your end:
    1.
    a) Create a formula in the cross tab expert and write your condition.
    for eg: if Sum({Orders.Order amount}) > 5000 then "yes" else "no"
    b) Then select that formula in the summarized fields in cross tab expert and change the summary to MODE.
    c) You can see the "yes" and "no" Within the same box.
    2.
    a) Add a field to the colums in the cross tab expert.
    b) A column gets inserted in the cross tab.
    c) Right click the field and select format field.
    d) Go to Common tab and write a formula for the display string.
    e) Write the condition in that formula.
    f) You can see a new column with the expected values.
    Hope this helps you..
    Please revert incase of any queries.
    Regards
    Pradeep Hulke

  • How to set default value and bg color of cross tab cell?

    Hi all
    Which way can I set default value and background color for a crosstab cell where there are no any data?
    I try to pass it in following way
    if isnull(CurrentFieldValue) then
    But is has no effect.

    Hi,
    If your field is numeric
    if currentfieldvalue =0 then cryellow else crnocolor
    if the field is numeric but you don't see the 0 check check if : Suppress if zero is ticked in the Number format tab.
    Regards

  • Sorting rows and columns in cross-tab

    My XML:
    <ROWSET>
         <data>
              <R>C</R>
              <C>3</C>
              <V>C3</V>
         </data>
         <data>
              <R>C</R>
              <C>2</C>
              <V>C2</V>
         </data>
         <data>
              <R>B</R>
              <C>1</C>
              <V>B1</V>
         </data>
         <data>
              <R>B</R>
              <C>3</C>
              <V>B3</V>
         </data>
         <data>
              <R>A</R>
              <C>2</C>
              <V>A2</V>
         </data>
         <data>
              <R>A</R>
              <C>3</C>
              <V>A3</V>
         </data>
    </ROWSET>With the help of the Wizard, I created the following corss-tab (table 2x2)
    (1,1) RC
    (1,2) <?for-each-group@column:data;./C?> <?C?> <?end for-each-group?>
    (2,1) <?for-each-group:data;./R?><?variable@incontext:G1;current-group()?><?R?>
    (2,2) <?for-each-group@cell://data;./C?><? ($G1[(./C=current()/C)]/V)?> <?end for-each-group?>group?&gt;producing the following output:
    RC     3      2      1
    C      C3     C2
    B      B3            B1
    A      A3     A2
    -------------------------I need the same output, just with the rows/columns properly ordered. Please help. Thanks.

    Hi,
    with this code
    cell(1,2): &lt;?for-each-group@column:data;./C?&gt; &lt;?sort:C?&gt; &lt;?C?&gt; &lt;?end for-each-group?&gt;
    cell(2,1): &lt;?for-each-group:data;./R?&gt;&lt;?sort:R?&gt;&lt;?variable@incontext:G1;current-group()?&gt;&lt;?R?&gt;
    cell(2,2): &lt;?for-each-group@cell://data;./C?&gt;&lt;?sort:C?&gt;&lt;? ($G1_SQUAREBRACKET_(./C=current()/C)]/V)?&gt; &lt;?end for-each-group?&gt;
    and your data I get
    .....|.. 1..|...2...|...3
    A.............. A2......A3
    B......B1...............B3
    C...............C2......C3
    Regards
    Rainer

  • How to display recordnumber for each row in cross tab?

    <p>Hi.. </p><p>I am using Crystal Report XI,with the database Microsoft SQL Server. I have 2 questions regarding Cross Tab.</p><p>1. How to limiting record per row and per column in Cross Tab? For example,at one page the report printing 20 records per row and 7 records per columns.</p><p>2. I would like to display recordnumber for each row that printing in Cross tab. How crystal reports can handle this?</p><p>Can anyone can help me out on this? </p><p>Please kindly advise.</p><p>AN </p><p> </p><p> </p>

    <p>Dear Kathryn,</p><p> </p><p>I did used DisplayString as suggested by you. The result work fine until I add more data to this cross tab. I used this formula : </p><p> global numbervar pager;</p><p>recordnumber();</p><p>pager := pager + 1; </p><p>  if pager > 0 then totext(pager - 1,0)     </p><p> </p><p>The result come out in decending order for each row. </p><p>SN    Name </p><p>5       abc<br /></p><p> 4       def</p><p>3        fig<br /></p><p>2        klm<br /></p><p>1      opq</p><p> Is that anything wrong with my formula?<br /> </p><p>Please kindly advise.</p><p>-AN- </p><p> </p><p> </p>

  • Cross tab column headers display on all pages

    I made a Crystal Report with a cross tab which displays all details. In the cross tab I have 6 columns with details about the data displayed in the last 2 columns. The headers of these columns are only displayed on the first page but not on other pages. How can I add column headers to all pages? Thank you.

    Column headings should be repeated automatically, row headings can be repeated by
    1.right-clicking on the row header
    2. select Row options
    3. .select Repeat Labels on Page break
    or, when I just reviewed it in the help section it says:
    "When you create a Cross-Tab that is wider or longer than the specified page size, the program automatically spans the printing across enough pages to accommodate the size of the Cross-Tab. In the Preview tab, a line will appear at each page break. For ease in reading, column headings will be repeated on subsequent pages. Row headings can also be repeated using the Keep Columns Together option.
    To repeat row labels
    Right-click the blank top-left area of the Cross-Tab and select Cross-Tab Expert from the shortcut menu.
    The Cross-Tab Expert appears.
    Click the Customize Style tab.
    Select the Repeat Row Labels check box, if desired.
    Crystal Reports lets you designate report objects that don't expand horizontally, such as text objects, field objects, OLE objects, charts, maps, lines, boxes, and so on, to be repeated on each additional horizontal page that a Cross-Tab creates. For more information, see Repeating report objects on horizontal pages."

  • Cross-tab - Repeat Row Name

    How can I get the Row Names in a cross-tab to repeat on every record? This would be useful for users that export the report to Excel and want to use column filters.

    Graham,
    I tried your suggestion and it almost worked. Viewing on the screen in Crystal, it did display the row name repeated the correct number of times. However, they didn't quite line up.
    The main problem though was when exported to Excel (Data Only), It placed row names concantenated together all on one row next to the total for each.
    When exported to regular Excel, it placed them all in one merged box.
    So, unfortunately either way the user would not be able to use Excel to filter.

  • Using sub-report field in cross tab row #2

    I have a sub-report that pulls a product line description that need to be added to row #2 of a cross tab object. I am unable to drag and dropped and it does not appear in the list under the cross tabs expert.  Any assistance would be greatly appreciated.

    Hi Edmund,
    You cannot add fields from the Subreport to a Crosstab in the Main Report.
    If you're trying to add data for multiple rows, you would need to bring those values as part of the Main report's query.
    -Abhilash

  • Customized Sort for Cross-Tab Row

    I have a simple Cross-Tab on my report that needs to be sorted in a static Row order.
    My cross tab has 1 Row (Name) and 1 column (Total Sales).
      Currently the CrossTab sorts the Name Alphabetically (ASC). But I need to specify a specific order.  I have added a numeric field to my table and I assign a numeric value to the last names so that I might be able to sort the Name Row based on my "CustomSortOrder" numeric field.
    Currently it looks something like this:
    A
    B
    C
    D
    E
    I want it to be: (numeric value behind the scenes)
    C (1)
    D (2)
    E (3)
    A (4)
    B (5)
    ALL OTHERS (9999)
    I cant seem to figure out where I need to set this.  I have tried adding a group to the report. I have tried setting the Report Sort order.  I am out of ideas.
    Any help would be greatly appreciated.

    Hi Jimmy,
    Here's what you need to do :
    1) Go to the Crosstab Expert > Remove the existing 'name' field from the 'Row'
    3) Add the numeric field as the 'Row'
    4) Select the Row > Group Options > Options Tab > Customize Group Name Field > Use formula as a Group Name > Click the formula button beside and use this code:
    If {numeric_field} = 9999 then "All Others"
    else
    {Name_Field}
    -Abhilash

  • Cross tab formatting in Infoview

    I uploaded a Crystal 2008 report into Infoview product version 12.1.0. The report contains indented row labels in the cross tab. When I view the report in Infoview, the indents don't display nicely indented. Instead, they almost look centered, which defeats the purpose of this feature. Anyone know whether I'm doing something wrong or maybe it's a version/Infoview setting issue?
    Thx.

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • 2 Cross tab summaries divided by each other

    I have a cross tab report that summarizes 2 fields, sum of amount paid and distinct count of customers.  The rows of the cross tab are grouped by revenue category, the columns are grouped by month.  Within each cell I would like to divide the total amount paid by the distinct count of customers.  See the attached image, I would like the quotient of the top number divided by the bottom number displayed to be displayed in each cell of the cross tab.
    Any help is greatly appreciated.  FYI, I am fairly new with Crystal Reports so I apologize if this is not making sense or if I am not going about this the right way.
    Thank you,
    Matt

    Hi Matt,
    Here's what you need to do:
    1) Right-click the second summary field in one of the cells (example would be number 166 for Row = 01) > Select Embedded Summary > Insert Embedded Summary
    2) Next, right-click the 'Edit this formula' > Embedded Summary > Edit Calculation formula and use this code:
    If GridValueAt(CurrentRowindex, CurrentColumnIndex, CurrentSummaryIndex-2) = 0 then 0 else
    (GridValueAt(CurrentRowindex, CurrentColumnIndex, CurrentSummaryIndex-2) /
    GridValueAt(CurrentRowindex, CurrentColumnIndex, CurrentSummaryIndex-1) )
    -Abhilash

  • Cross tab & Line Graph – Data Sorting issue

    Hi,
    Want to display data in specific order in cross tab row & in graph as shown below
    Account Name
    Average
    Median
    In the same order data has been retrieved from the database but when it comes to Crystal report, its reordering the data in alphabetical order as shown below due to the order set in Group option
    Example: 1
    ABC
    Average
    Median
    Example: 2
    Average
    Median
    XYZ
    Please note u201CAverageu201D & Medianu201D are constant but Account name will vary based on selection.
    How this can be achieved? How Specific Order can be used in this case?
    Please help... Itu2019s urgentu2026
    Thanks,
    ThakurS

    Hi
    Under "chart expert" in "data" tab where you add the fields in chart you see "on change of" and "show" values..
    After adding the required on "change of fields" if you would highlight that field "group option"  tab will get enabled where you will find the "sort order" drop down. There is an option "In Original Order" which will sort the fields as fetched from Database
    Same option is available in Cross-Tab
    Regards,
    Shantanu

  • How to get all rows in table to red using alternate rows properties option

    How to get all rows in table to red using alternate rows properties option

    Hi Khrisna,
    You can get all rows red by selecting the color red in the "Color" and "frequency" to 1 under the "Alternate Row/Column colors".
    I tried doing it and the colors freaked me out (all red) :-D
    Kindly tell me if im missing something.
    Regards,
    John Vincent

  • Detail-Data in Cross-Tab

    Hi,
    i would like to add additonal data to the row-label in a cross-tab.
    ....................... C1    C2    C3
    Customer1
    .... add.Data1
    Customer2
    .... add.Data2
    Customer3
    .... add.Data3
    How can i do that?
    The link between the Customer-Table and the Extra-Data is the customer-id and a Date-Field (parameter of the report - used for filtering on a date-basis).
    Table for extra data:
    customer-id     date     amount
    DATE is a parameter of the report.
    Is there any way to do this?
    (I use CR XI).
    Result should look like this:
    Selected Date (Parameter): 2009-02-02
    ...................................................... C1    C2    C3
    Customer1 +
    ....amount on 2009-02-02 for C1
    Customer2 +
    ....amount on 2009-02-02 for C2
    Customer3 +
    ....amount on 2009-02-02 for C3
    THX in advance,
    Markus

    Hi,
    Lets phrase it differently again
    i have a second table from which i would like to add additional information to the row-information in a cross-tab.
    customer.... date ... amount
    Cust1....2009-02-01....   10
    Cust1....2009-03-01....   15
    Cust1....2009-04-01....   77
    Cust2 ........
    Cust3 ........
    I need ONLY the first amount from the starting-date in the CROSS-Tab.
    The starting-date is a parameter in the report.
    If i put there the linked amount-field i get a row for each different date.
    I need only one row per customer with the first amount from date 1. (the parameter-date-value)
    So if i enter 2009-03-01 as the parameter, i would like a cross tab with a row-name of:
    "Customer1 + ChrW(13) + 15 "
    It works with a SQL-Expression (named "StartSaldo") like:
    (Select Saldo from Goldbeck_Saldo where D_Date = '20090301'
    and "Goldbeck_Saldo"."I_PERSID"="BaseTable"."I_PERSID")
    and a row name of "Customer.Name + ToText({%StartSaldoSQL})
    However the Date "20090201" is hard-coded there.
    I can find no way to make the Date from the SQL-Expression soft-coded (pass the parameter to the scalar SQL-Expression). According to another forum-post this is not possible.
    THX
    Markus
    Edited by: Cumulus7 on Apr 27, 2009 4:25 PM

Maybe you are looking for

  • Is there any way to retrieve reports removed by the PRCSYSPURGE

    Hi everyone. I am trying to retrieve the last month reports but by default in process scheduler system settings the retention days is set to 7 days it was automatically purge the all process run types. Can any one know how to retrieve the those repor

  • Difference between Abstract portal Component and JSPDyn page.

    Hi Experts, What is the difference between Abstract portal Component and JSPDyn page. Thanks, Jay.

  • AS2 Crossdomain.xml and sendAndLoad

    I have a flash form with input text fields. I am sending the data to a 3rd party server. I can send the information via getURL but I want to send the data without opening a browser window so I am utilizing sendAndLoad. It works great locally but not

  • Transferring from old to new computer

    My computer recently got a virus that does not let me log on to the internet. I have since gotten a new computer. I was able to transfer my "purchased" songs that I had gotten from the iTunes store onto my new computer by following the online directi

  • Budget

    HI sapient My client requirement is that they wants procurement budget checking in the PR and PO stage only, after that if any changes will occure it will not effect the procurement budget amount. The amount for procurement budget which have been ded