Crystal report - Null fields not shown - crystal-reports

I have, problem with and empty field as they disappear from reports.
I'm able to see only fields with data in them.
if isnull ({orddet_user.orddetlookup2})
then "No Reason"
else {orddetlookup2.descr}
It returns on report {orddetlookup2.descr} but all blank fields doesn't show up,
Maybe someone has faced this before.
I'm using crystal 2008

Related

incorrect position of the value in crystal report

I am using crystal reports 11. I have placed a database fields some where in the report designer. But when printing, the value for that field is printed somewhere else. Lock position and size, keep together isnt working. what could be the reason behind this?

Items in details repeating itself in Crystal Reports

Situation
I got stucked to some weirdo in Crystal reports. See the image below of my RAW RPT.
Everything in my report is coming fine except the details part. You can see there DetailsSection6, in which i have few columns(10-15). This rpt is binded with the XSD file and that XSD is then binded with its concerned dataset at runtime. Dataset has around 10 tables from which two tables are concerned here.
PROC_CONS_SUBBILL_REPORT - Header Table with single row.
CON_T_SUBBILL_DTL - Detail table having multiple rows based on the VoucherNo of above table.
What I want
I need to display all records of detail table in tablular format based upon the VoucherNo. Say in detail table (SUBBILL_DTL), I am having 25 records, but when table is rendered on the rpt, its starts repeating itself, sometimes twice sometimes thrice.
Kindly note:
My SP is returning the expected and correct data
RPT has 5-6 SubReports and in one report PROC_CONS_SUBBILL_REPORT table is used.
There is no Relationships in the report in the form of keys.
What I did
Tried removing all keys between the tables.
Suppressed the Detail Section but it suppresses the entire data.
Suppress the detail section with formula
{CON_T_SUBBILL_REPORT.CODE}=previous( {CON_T_SUBBILL_REPORT.CODE})
but still its not working.
I am totally lost. Kindly help.
Normally records are duplicated when the linking is wrong, In your case instead of formula try to use the option Select Distinct Records under Database tab.
This is a little late, but in case somebody else is looking for an answer.
I tried all the things above and nothing worked. Crystal reports was changing my query.
It worked in SQL Server but not in Crystal Reports.
The way I fixed it was by creating a view of my query on Sql Server and using the view
in my Crystal Report. It fixed everything.

Crystal Reports Group Header with Formula Field

So I made a Crystal Report with some custom Group headers(ie. Created a formula field based off database data then used it in a group header). The Formula specifically that seems to be giving me trouble is:
IF {Quote.Field1} = true THEN "Incremental Sales Assist"
ELSE IF {Quote.Field2} = "Yes" THEN "Fulfillment"
ELSE "Sales Assist"
When the report generates it appears to ignore the else.
If you expand the tree where the arrow is with no text next to it, it does provide the correct data that should be grouped with "Sales Assists" I just don't understand why the text is not showing there...Has anyone else encountered anything like this? Is it a crystal bug or can I just not do this? Any assistance is greatly appreciated.
I had the same issue as the above and was getting a blank value for the last output of the IF statement.
I resolved it by recreating the Formula Field as a SQL Expression Field then using that as my grouping field.

Troubles with IsNull Crystal Reports

I'm using Crystal Reports 12.3 and Peachtree Accounting 2012 to manage some database. My task now is simply make a report that contains customers that have not placed orders in last 30 days. I'm new to it so I'm asking your help.
My first trying was to use this formula (I'm doing all my stuff in Formula Editor -> Record Selection):
not ({Customers.LastInvoiceDate} in Aged0To30Days)
Everything seems to be fine except null values. I need to include in report records with null values. So I rewrite the formula to:
not ({Customers.LastInvoiceDate} in Aged0To30Days) OR IsNull({Customers.LastInvoiceDate})
But in Peachtree Accounting 2012 I'm seeing a customer with a blank LastInvoiceDate field which is not in report.
Is there some kind of bug in my last formula? Or is there some "other" black values for DateTime type?
You should always check for nulls first, so try reversing the second formula to
isnull({Customers.LastInvoiceDate}) or not({Customers.LastInvoiceDate} in Aged0To30Days)
If Crystal encounters a null and it is not explicitly handled first, then the rest of the formula will crap out and not evaluate. Another way to get around this is to tell Crystal to use 'Default Values for Nulls' instead of 'Exceptions for Nulls' in the Formula Workshop (It's a dropdown setting in the Formula Workshop toolbar).
length(trim({Customers.LastInvoiceDate})) = 0
One statement with no need for isnull function and OR operator.

"The Report is empty" - is bug?

I've created report with 3 parameters in iReport and it's running successfully. The report is execute MS SQL stor proc with 3 parameters:
startdate;
enddate;
dept_nm (department name);
iReport gives good result. As soon as I exported jrxml file to JasperReports Server 4.1 I have message "The report is empty".
In the Repository under JasperReports Server I've created controls for dates parameters and single list values for dept_nm parameter.
Do you know how to debug and trace this message coming from???
Your query is returning no data. The message appears when the report result is null.
The quickest way to debug this in JasperReports Server is to modify the report's behavior when no data is returned. The default behavior is "No Pages". Change it to "All Sections, No Details". That way you'll get at least the report title and summary band.
Display your parameters in the title band to see what their values are. Often they aren't what you expect. For example, your input control is "StartDate", but your parameters is "startdate". So the parameter doesn't get the value you thought it would.
I get this a lot. E.g if you have sub reports only, it thinks the main report is blank. You have to do something silly like insert a dummy SQL into your report such as "select 1" then populate a hidden part of the report with the result. When it works on in report studio, but gives you the report is empty on the server (with a good data source - other reports working) is when you have real trouble. Not solved those yet.
Maybe you did not connect your report to any Data Source.