I have created the formula = NETWORKDAYS.INTL(E84,F84) and E84 and F84 are same date -> 2022.9.5. if it is the same date in both columns, it shows the value 1 but it shows the value 0.
It worked before but now it doesn't work.
https://docs.google.com/spreadsheets/d/1dY6gwDIjjxUPTU-4v0j1MqF1sq7YCgHLTH040QMQrHU/edit?usp=sharing
There was an issue and now it's working properly. Here are more details.
If you refresh the document, you can reload the function with the fix.
looks like a bug but here is some quick workaround:
=IF(A2=B2; 1; NETWORKDAYS(A2; B2))
Related
I am using BIRT reporting with my mongodb datasource. I am trying to COUNT some events. COUNT function gives the correct value but there is big empty space at the end of the page depending upon the count value. If the count value is big then the rest of the page is empty and on the next page same record is coming e.g. :
In this Image the rest of the page is empty and same record is coming on the next pages also. It looks like empty spaces are being printed.
This is how my report looks like :
The COUNT function:
I have tried using SUM also but I get this error when I use SUM function instead of COUNT :
org.eclipse.birt.report.engine.api.EngineException: A BIRT exception occurred. See next exception for more information.
Can not convert the value of True to Double type.
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1245)
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1224)
at org.eclipse.birt.report.engine.executor.DataItemExecutor.execute(DataItemExecutor.java:101)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.execute(HTMLAbstractLM.java:468)
Please help, thanks in Advance.
I got the issue to this problem. If we select "Hide Detail" Option from the group then this problem go away.
How do I run a query using a value from a textbox from a form I have? I know that there is another post here at Stackoverflow dealing with this issue but I found it to be insufficient for my needs.
I formated my textbox into Medium Date format with its default value being =Date(). However, when I pick up a date and open my report I get this error:
Runtime error 3071: Expression Too Complex
My where clause is this
WHERE
(
(AllInfo.DateOpened >= CDate([Forms]![Main Form]![WindowPrintOptions]![CustomizedReport]!txtDateOpenedFrom.Value))
)
and I am sure it is this code piece that is throwing the problem since when I take it out of the query the error message simply disappears.
Any ideas?
Try with:
(AllInfo.DateOpened >= DateValue([Forms]![Main Form]![WindowPrintOptions].[Form]!txtDateOpenedFrom))
)
Folks,
I got the problem. It was the "AllInfo" alias. It wasn't applicable at that escope inside the query. By changing the proper things, it was enough to write:
[Forms]![Main Form]![WindowPrintOptions]![CustomizedReport]!txtDateOpenedFrom.Value
Issue solved. Thank you all!
When I try to open crystal report I get the following error.
Index 0 out of range.
It's my first time to hit that error and I have no clue what causing it.
ِAdditional information:
I have NDI Parent when I click at menu it shows a form that contains crystal report, first time of clicking it I get the expected data, but when I close the from and try to open it again it give me that error.
Hopefully it explains more about the problem, if not kindly give me some hint points to explain more about it.
I figured the solution, what caused the problem were in a wrong syntax I used.
I took the object from the form that has crystal-report-viewer in public and it had to be set to private.
I have added the footer Page x of y to my report, but the PAGE_COUNT doesn't seem to work.
Maybe the problem occurs because I have many subreports?
I get:
Page 1 of 1
Page 2 of 0
Page 3 of 0
Page 4 of 0
Any ideas?
Well, don't know elder versions but in JasperReports 4.5.1; you can define two text fields both includes $V{PAGE_NUMBER} variables. The one which has EvaluationTime: now shows current page number; the other one with EvaluationTime: report shows the number of total pages. A simple trick but works :)
Changing the evaluationTime="Report" solved the problem.
Summary: To have the page number and the page number in a TextField.
Step 1: Create a variable that indicates the number of the current page.
Settings:
* Name: CURRENT_PAGE_NUMBER
Variable class: Java.lang.Integer
Calculation: nothing
Reset Type: None
Increment type: Page
Variable Expression: $ V {CURRENT_PAGE_NUMBER} == null? $ V {PAGE_NUMBER}: $ V {PAGE_NUMBER} +1
Step 2: TextField Settings
Text Field Expression: "PAGE:" + $ V {CURRENT_PAGE_NUMBER} + "/" + $ V {PAGE_NUMBER}
Expression class: Java.lang.String
Evaluation Time: Auto
And that's all. No need to add anything to it to give you a result like: Page 1/3 | Page 2/3 | Page 3/3.
I found the solution.
http://jasperforge.org/tracker/index.php?func=detail&aid=2873&group_id=102&atid=612
But the book JasperReports for Java Developers (p 146) says that PAGE_COUNT is the total number of pages in the report. I guess the bug is in the book.
Actually It Is a BUG! And confirmed by developers.
See link:
jasper community bug tracker link
PAGE_COUNT is not correctly calculated, when using property on BAND: "Split Prevent"
our reports look like :
http://pastebin.com/m401fa41
1st part, interpreted during page generation, gives the # of the current page (evaluationTime="Now")
2nd part, interpreted at the end of the report , gives the total # of pages (evaluationTime="Report")
HTH
The solution is the follow :
We must not put $ { V PAGE_NUMBER }+ "/" + $ { V } PAGE_NUMBER in the same field.
the proper way is to put $ { V PAGE_NUMBER } in separated field and "/ " + $ { V } PAGE_NUMBER in the other field
it work for me
sorry for my english
I haven't access to the jaspercommunity (to check the link shared), but I do a good workaround :D
Use 4 texts, like this:
txtStatic1(Page) txtField1($V{PAGE_NUMBER}) txtStatic2(of) txtField2($V{PAGE_NUMBER})
Where:
txtField1($V{PAGE_NUMBER}) -> AVAILABLE TIME = PAGE
txtField2($V{PAGE_NUMBER}) -> AVAILABLE TIME = REPORT
It's works to me.
I'm creating a invoice crystal report for sage mas 500 AR module. In it, I'm attempting to add the tarinvoice.balance field with the following formula:
if {tarPrintInvcHdrWrk.Posted} = 1 then
ToText({tarInvoice.Balance})
I'm assuming that when the {tarPrintInvcHdrWrk.Posted} = 1 conditional statement holds FALSE, it doesn't attempt to pull the invoice field because when I remove the formula from the report, the form displays correctly without it.
When the conditional statement renders true in the report, the balance fields behaves correctly. However, with the formula renders FALSE in the CR form, the entire crystal report bombs and displays blank. Any ideas why or what I'm doing wrong?
Just tried setting everything to zero and the report still bombs. I'm starting to think its more of a query error in the report. I wish there was a way to exclude the field in the query when posted = 0.
With tarinvoice.balance removed when the posted = 0, the report works fine.
With tarinvoice.balance included and posted = 1, report works fine.
With tarinvoice.balance included and posted =0, report bombs.
I believe the conditional statement fails immediately if you encounter a NULL, so your formula needs to test IsNull({tarPrintInvcHdrWrk.Posted}) before it tests equality with "1".
You can change the way Crystal handles a null value for a value in a formula. At the top of the Formula Workshop there is a drop down box that usually says "Exceptions For Nulls".
Change this to the other option "Default Values For Nulls" and your formula should no longer bomb out. You used to be able to specify the what the default values applied were, but more recent versions of Crystal have these hard coded.
Search the help for "Null Treatment" for a table showing them.
I modified the formula to this:
if isnull({tarPrintInvcHdrWrk.Posted}) = FALSE then
if {tarPrintInvcHdrWrk.Posted} = 1 then
if isnull({tarInvoice.Balance}) = FALSE then
ToText({tarInvoice.Balance})
else
"0.00"
else
"0.0"
else
"0"
The crystal report still bombs.. Nevertheless, it does show "0" in the appropriate space.
I saw a suggestion on Exp.Exch to try putting the field into a variable before converting it to text.
e.g.
NumberVar InvoiceBalance;
If isnull({tarInvoice.Balance}) then
InvoiceBalance := 0
Else
InvoiceBalance := {tarInvoice.Balance};
If {tarPrintInvcHdrWrk.Posted} = 1 then
ToText(InvoiceBalance);
I also tried to recreate your problem, since I have see similar things before.
No luck though trying with CR 8.5 & XI R2. Perhpas it has to do with linked tables as well, since I only tried on a simple single table.
I have also seen similar behaviour when using a formula within a Running Total - they do not like nulls at all!
If you put {tarInvoice.Balance} directly on report (into details "debug" section - often needed, don't forget supress it in production :)), what values it displays or does report become empty?
Maybe you have Suppress If Blank section on your report. Try to put: Else " "
if isnull({tarPrintInvcHdrWrk.Posted}) or {tarPrintInvcHdrWrk.Posted}=0 then
" "
else
if {tarPrintInvcHdrWrk.Posted} = 1 then
ToText({tarInvoice.Balance})
else
" "
I have trouble with this kind of field when making reports to export to excel. A field with no data in will pull all columns to the right of it over to "fill the gap".