How do I print the Group header but not the detail line in a local RDLC report?

Using C#, vs2008 to develop local report - .rdlc.

Have report grouped on column one of dataset.  Remaining columns will either have data or be filled with nulls.

The report uses a table to display the dataset.  Table has group header where column one is printed.  Detail lines show as blank lines when dataset contains nulls.

Question: how do I not print these detail lines when remaining columns in dataset contain nulls?
mate6666Asked:
Who is Participating?
 
Chris LuttrellConnect With a Mentor Senior Database ArchitectCommented:
Did you set the visibilty on the row or field?  We have hidden rows before like this.
0
 
EmesCommented:
not sure what you are asking can you give an example.

It sounds like null values line are being printed.  Can you change the SQL to suppress null values?
0
 
williamcampbellCommented:
Not clear what you want ..

Does your data look like this?

 Col1 Col2 Col3
 Data Null Null    // I want to Print this but not the Nulls
 Data Null Null    // I want to Print this but not the nulls
 Data Data Null  // I only Want Col1 to be printed
 Null Data Null    // Don't Print this line
 
Can you comment in this

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
mate6666Author Commented:
I have tried to copy and paste from the report designer, but it will not paste into code field here.

Here's what's happening:  data set has this data:  
Row #1:
col. #1value  "GARY"   col.#2 value  "Likes Ice Cream"

Row #2:
col.#1 value "JOE"  col.#2 value "Null"

Report is grouped on col #1 setup as:
  Group heading
   Detail lines

Report currently shows:
  GARY
       likes ice cream
  JOE
       (has blank line)

How do I keep the blank line from printing?

thanks
0
 
Chris LuttrellSenior Database ArchitectCommented:
In the properties for that row in the report, set the visibility:hidden value in an expression that returns True if the underlying value is null or "" or missing.  It sort of depends on your data on which one or more of these you need to check for.
0
 
mate6666Author Commented:
CGLuttrell - thanks for the input.  I tried the visibility:hidden trick.  I had a background color set for the row and it did not show the row color, yet created a blank row in the table.

WilliamCampbell - here is what I am required to do:

in my dataset
       Col1                        Col2                                                   Col3
 GroupValue                  varchar data or null                      if col2 null this will be null
(always present)

Report must look like this:

Line 1 - Group Value printed as group header
Line 2 - Col2 data
Line 3 - Col3 data

Line 4 - Group Value printed
etc.

So report would look like:

Gary
  Likes Ice Cream
  Goes to school
Joe
  Has a business
  Drives a car
Steve
  etc.

If column 2 and 3 are null, how do I get LIne 2 and 3 on the report to not print.  Currently, a blank line is being produced.

Here is a portion of the HTML generated by a page:

This is a page with column 2 and 3 having data:

<DIV>
 <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0" COLS="3" LANG="en-US" class="r10">
   <TR>
    <TD style="HEIGHT:1.59mm;WIDTH:3.18mm"></TD>
    <TD style="WIDTH:188.91mm"></TD>
    <TD style="WIDTH:4.76mm"></TD>
  </TR>
  <TR VALIGN="top">
   <TD style="HEIGHT:6.35mm"></TD>
   <TD ROWSPAN="2" COLSPAN="2" style="HEIGHT:6.35mm">
     <TABLE CELLSPACING="0" CELLPADDING="0" LANG="en-US" class="a10 r3" COLS="2">
  <TR>
   <TD HEIGHT="0" style="WIDTH:23.81mm"></TD>
   <TD HEIGHT="0" style="WIDTH:165.10mm"></TD>
  </TR>
  <TR style="HEIGHT:6.35mm">
    <TD COLSPAN="2" class="a15" style="background-color:Aqua;">
     <DIV class="r11">Jones, Gary Lee </DIV></TD>
   </TR>
   <TR style="HEIGHT:6.35mm">
    <TD COLSPAN="2" class="a19">
     <DIV class="r11">My plan for improvement and enrichment ...</DIV></TD>
   </TR>
   <TR style="HEIGHT:6.35mm">
     <TD class="a24"><DIV class="r11">3/25/2009</DIV></TD>
     <TD class="a25"><DIV class="r11">Wednesday, March 25, 2009<br/><br/>This is my plan for improvement and enrichment.</DIV></TD>
    </TR>
    <TR style="HEIGHT:6.35mm">
etc.

Here is a page with col2 and 3 having null values:

 <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0" COLS="3" LANG="en-US" class="r10">
   <TR>
    <TD style="HEIGHT:1.59mm;WIDTH:3.18mm"></TD>
    <TD style="WIDTH:188.91mm"></TD>
    <TD style="WIDTH:4.76mm"></TD>
   </TR>
   <TR VALIGN="top">
    <TD style="HEIGHT:6.35mm"></TD>
    <TD ROWSPAN="2" COLSPAN="2" style="HEIGHT:6.35mm">
      <TABLE CELLSPACING="0" CELLPADDING="0" LANG="en-US" class="a10 r3" COLS="2">
       <TR>
        <TD HEIGHT="0" style="WIDTH:23.81mm"></TD>
        <TD HEIGHT="0" style="WIDTH:165.10mm"></TD>
      </TR>
      <TR style="HEIGHT:6.35mm">
       <TD COLSPAN="2" class="a15" style="background-color:MistyRose;">
         <DIV class="r11">37, student   </DIV></TD>
     </TR>
     <TR style="HEIGHT:6.35mm">
      <TD COLSPAN="2"></TD>
     </TR>
     <TR style="HEIGHT:6.35mm">
      <TD></TD>
      <TD></TD>
     </TR>

After looking at this it dawns on me that there is no way to not print row 2 and 3 since they are in a table.


0
 
williamcampbellCommented:
:)
0
All Courses

From novice to tech pro — start learning today.