Note that there are some explanatory texts on larger screens.

plurals
  1. POCR is showing default value 6 when it should be showing 0
    text
    copied!<p>In my CR. I have quite a few subreports. For all my subreports, I have created and inserted group name in ReportHeaderSection2 (Report Header b). In the same Report Header Section I have summarized using Count. Then again in the ReportFooterSection1 (Report Footer a) to show grand total. With other tables related, I have created 6 records showing various data. </p> <p>For example, I have a table named Employeees.MainDetails.EOAsianOrAsianBritish as selected and inserted the group name in ReportHeaderSection2 (Report Header b). </p> <p>Now when nothing is selected (for exampe from a combox in front end application, built in C#) in the CR data is showing something like this (as an example ethnicity data)...</p> <pre><code>Asian or Asian British &lt; this is just a header title 6 Total 6 </code></pre> <p>I would like the CR to show as...</p> <pre><code>Asian or Asian British 0 Total 0 </code></pre> <p>In the Reports Options I have checked both Convert Database NULL Values to Default and Convert Other NULL Values to Default. This did not work. I have also tried The following...</p> <p>I right clicked, For both Count of Employeees.MainDetails.EOAsianOrAsianBritish in the ReportHeaderSection2 (Report Header b) and ReportFooterSection1 (Report Footer a), Format Object > Format Editor menu appears > Select Number tab > click on Customize > Checked Suppress if Zero and Show zero value as 0. This did not work either? </p> <p><strong>EDITED FYI</strong></p> <p>I am using CR in Visual Studio 2010. Crystal Report Viewer. </p> <p>I would be grateful if anyone can help me here.</p> <p><strong>HUGE THANKS</strong></p> <p><strong>Update 1</strong></p> <p>I right clicked the summarized Count (CountofEOAsianOrAsianBritish) then selected the Select Expert > Record > Selected is equal to and enter the following formual....</p> <p>{Employeees.MainDetails.EOAsianOrAsianBritish } = "0". This has elimated the 6 but If I try to enter some text value in front end, no value is showing the CR? So am looking into it. </p> <p><strong>Update 2</strong></p> <p>In my Comboox I have list of collections that I have entered. I have intentionally included a blank at the beginning then listed the collections. CR maybe picking this up. I would like a formula so CR does not count the blanks unless I am doing something wrong in summarized Count, CountofEOAsianOrAsianBritish</p> <p><strong>Update 3</strong></p> <p>I tried Nick solution and I am getting ) is missing, is the DLL is missing in Visual Studio 2010.</p> <p><strong>Update 4</strong></p> <p>If I do... (not Isnull({Employeees.MainDetails.EOAsianOrAsianBritish})) then CR is showing output the following</p> <pre><code>Asian or Asian British 2 Bangladeshi 1 Indian 1 Pakistani 2 Total: 6 </code></pre> <p>This is incorrect, the correct output should show....</p> <pre><code>Asian or Asian British Bangladeshi 1 Indian 1 Pakistani 2 Total: 4 </code></pre> <p>So What this is telling me is that CR is counting blank fields from the comboox. So I am wondering if anything can be done in CR? Also trim is required so when there is blank the rows are not showing blank rows. </p> <p><strong>Update 5</strong></p> <p>I have tried...</p> <pre><code>if isnull({Employeees.MainDetails.EOAsianOrAsianBritish}) then 0 else ({Employeees.MainDetails.EOAsianOrAsianBritish}) </code></pre> <p>This gave me the following error </p> <blockquote> <p>"A number is required here" </p> </blockquote> <p>highlighting the Employeees.MainDetails.EOAsianOrAsianBritish in the else statement? In the else statement shouldn't a formula count the ethnicity then show grand total in the footer?</p> <p><strong>Nick</strong></p> <p>The output I am getting is </p> <pre><code>Asian or Asian British 2 Total: 2 </code></pre> <p>When it should be showing...</p> <pre><code>Asian or Asian British Indian 1 Pakistani 3 Total: 4 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload