Crystal Reports show field grey when date is null - crystal-reports

Our user wants a date field to display as highlighted or with a grey background when the date is null. How would I do something like this? (At the very least, I suspect I'll first have to convert it to a string.)
Completed Date
12/15/2010
03/07/2011
<-- make that a grey block
05/01/2010

I hope that you don't think this too hacky but you can do what you want by adding a Formula field and calling it something like NullCheck. Then put the code below in the NullCheck formula field so that it places an X whenever the date field is null.
If IsNull({DeleteMe.DateField}) Then
"X"
Next put that field (NullCheck) on your page so that the box covers the date field exactly. Then use the Highlighting Expert to set the background and the font to the same color when the X appears in the field (see image below).
When done it should "highlight" all null dates fields as shown.

Related

Google Sheets conditional formatting with differently styled dates

in Google Sheets I'd like to format an area of cells automatically by comparing its date value to another cell. In fact, I have some cells representing a month (the area of cells to be formatted) and a single cell with another date (05.05.2022 formatted as 05.05. see screenshot).
So date for homework is located in U6 and cell area for moth of may is K11:Q16. When I set conditional formatting to
apply to range: K11:Q16
and
Date is: exact date: =U6 or custom formula is: =U6
it does not work. But when I set range to N12 (05.05.2022 formatted as 5) it does work.
Any ideas?
Thanks in advance.
edit:
I created a separate sheet for sharing, so this does not fit to the screenshot:
https://docs.google.com/spreadsheets/d/1gBx3dbzxk3Qb999uo3YMdz0A9-ViSE4xPeihhasN7FQ/edit?usp=sharing
try like this:
=COUNTIF($I$2:$I$5; D11)
or:
=MATCH(D11; $I$2:$I$5; )

How to change date range which was entered as a parameter

for my evaluation I have set a date range as an input parameter. This chosen date range should be displayed in a textbox (by using a formula field for example).
What I reached so far is, that I choose a date range and CR goes through the corresponding data.
But I can only see the first and last date on which something happenend.
Example:
Entered Date range: 01.01.2019 - 16.10.2019
First/last date with a created notification: 03.01.2019 - 14.10.2019
Displayed date range: 03.01.2019 - 14.10.2019
This could cause confusion because it looks like we evaluated a shorter date period.
Is there a method to just show the entered parameters?
Thanks in advance!
Instead of placing the parameters in a formula and displaying them as this may be causing your issue. Do the following;
Get a textbox and place it in the report header. On the right in your field explorer, expand the Parameter Fields and drag the DateFrom and DateTo in the textbox. Something like this;
Doing so will display the entered range in the parameter and not the range values actually exist for.

How to change the table row background color while the conditions fails?

I am merging three coloumns and showing the merged values in the 4th column, am appliying some rules for merge operation. In some case that rules will bring up null value and display it in any row in the 4th column, i want to highlight the null row alone in RED color.
Like listed below.
Value1
Value2
NULL(Red color)
Value 4
please help me on this, Am working in wicket framework.
You can use AttributeModifier.replace("class", IModel<?>). Put a string in the model of the css tag you have to make it red. For example td.redbox {backgroundcolor:red} with AttributeModifier.replace("class", Model.of("redbox"));.
ps.
You need to supply more code next time. If you ask a unclear question, you'll get an unclear answer.

Adding fielddata to fixed text in report designer

Using the report-designer of Reportbuilder i want to add a long fixed text to my report with one or more included fields inside the text. Of course these fields should be filled with actual data, adjusting the text.
I remember I have done such a thing in the past, but cannot remember how. I thought you could accomplish this with a Text-field and something like 'This is the text and here {fieldname} fielddata is inserted', but that doesnt seem to work
Can anybody help?
Using reportbuilder 15.04
Response from Digital Metaphores:
Use the RichtText component! By setting MailMerge to true, you can add
datafields to text in the richtext editor
This adds the reference to the fielddata as a xml tag. Adding the fields Name from pipeline plData can be done like this:
<dbtext datapipeline='plData'>Name</dbtext>
Fill in the fixed text, then (making sure the focus is set to the text box, I.E. you have the flashing pipe cursor) right click in the place you want the data field to go, and click Create Placeholder.
In the Placeholder properties window give it a Label so you know what it is, then use the "Value" field to define what data from your datasets you want to be brought through.
You should end up with the Label you set in square brackets, like [Example] within the set text.

How to design textbox visibility expression in SSRS?

I have an RDL with a table/textbox visibility set to:
=iif(Fields!question_caption.Value = "OBJECTIVE 1",false,true)
I am trying to make this textbox display the value named "narrative" only if the question_caption record = "OBJECTIVE 1". How can I do this? Currently this textbox displays nothing with the above logic. I have the narrative field stored in a Placeholder if that makes any difference.
Here is some sample data for you:
create table #dummy_data
(
question_caption varchar(max),
narrative varchar(max)
)
insert #dummy_data values('1st week dates','week 1'),('2nd week dates','week 2'),('3rd week dates','week 3'),('OBJECTIVE 1','obj 1'),
('5th week dates','week 5')
select * from #dummy_data
I don't see anything wrong with your visibility expression. However, in your question, you're discussing two separate things as one (i.e., visibility & displaying a value in a placeholder).
The hidden property will show an object (tablix, textbox, image, chart, container, etc) if the expression returns false and will hide an object when the expression returns true. When I say hide, I mean that it will remove the object from the grid and, if all is setup properly, the surrounding objects will be shifted to fill the now empty space of the hidden object.
To display (or not) a value is an entirely different thing. To show or hide a value, you would put the following expression in the value property of the placeholder:
=IIF(Fields!question_caption.Value = "OBJECTIVE 1",Fields!narrative.Value,"")
Notice that I've set it up such that if the desired value of the question_caption field is present, it will display the value of the narrative field. Otherwise, it will return an empty string. This will maintain the layout of the report but simply display the desired value or an empty string, based on some criteria.
As for the issues you're current experiencing, I'm not sure why that would be happening. I would first check that you don't have a typo in the Objective 1 hardcoded value in your expression.
If this doesn't help, please comment and let me know some more information about your problem and I'll do my best to help.