Empty rows in report when using count function - eclipse

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.

Related

Why is Access Dlookup Formula Giving Compile Error

so here's my problem. The below works:
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","WorkOrder=331091")
Unfortunately I need 331091 to be Combo4. Once I change the formula to:
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","WorkOrder"= [Combo4]") or
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","WorkOrder"= Combo4) or
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","[WorkOrder]"= [Combo4])
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","[WorkOrder]= [Combo4]")
I've been testing all the variations in Immediate Window and all result in Compile error: Expected: expression. Getting the same error in my other database which is why I created this one. One table, one record along with one unbound form. Table has WorkOrder and CylindersCompleted which are both Number and the form has one Combo and one textbox which are both Number. I'm putting the Dlookup formula in the Control Source of the textbox. I'm hoping someone can help me solve this issue so I can apply it to my other database which is much more complicated. Thanks in advance.
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","WorkOrder"= [Combo4]")
Should be:
=DLookUp("[CylindersCompleted]","WO_User_Input_Save","WorkOrder=" & [Combo4])

How to Remove zero amount line fom axapta form by code

When we are processing EOS(end of service) of an employee then system automatically generate the zero line 0.00 as Encashment quantity for rendom employee somehow.My client don't want this zero line in this form becuase when they are trying to post EOS to general ledger its showing the error as amount can't be post without value.So how to code in x++ to remove the zero amount line from my EOS form if there is any 0.00 encashment amount.
enter image description here
In Above screenshot system has calculated the encashment quantity as zero so when we processed EOS. Kindly requesting give some suggestions to handle this scenario by X++ code.
If you are using a datasource to get the value then there is a property called "Insert if empty" on the datasource (In this case the datasource with the EncashmentQuantity field) which is automatically set as "yes" but you can change it to "no" and the value should not be shown if it is 0. I am not sure this is what you are talking about but it might be.
I hope to understood the question.
"My client don't want this zero line in this form becuase...."
I think you have this way, If you want to filter the record without 0 Value by code, you can use filter in DataSource rightClick override executequery method and insert code looklike follow:
public void executeQuery()
{
this.query().dataSourceTable(tableNum(**YourTablename**)).addRange(fieldNum(**YourTableName**,**YoutFilterField**)).value(strFmt("%1", '>0'));
super();
}
ForExample :
this.query().dataSourceTable(tableNum(LedgerJournalTrans)).addRange(fieldNum(LedgerJournalTrans,AmountCurCredit)).value(strFmt("%1", '>0')); // DISCARD all record lower than 0
or
this.query().dataSourceTable(tableNum(LedgerJournalTrans)).addRange(fieldNum(LedgerJournalTrans,AmountCurCredit)).value(SysQuery::valueNot(0));
I share this useful links :
Expressions in query ranges
SimilarQuestion
StandardGuide
Good work!

Running a query using date from a form MS Access

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!

Crystal report: Index 0 out of range. - How to fix? -

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.

iReports 4.5.1 throwing error while using TABLE Report Element

Hi I am getting the following error message while using the iReport designer Table Report Element:
Error filling print... java.lang.String cannot be cast to java.lang.Boolean
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
at net.sf.jasperreports.components.table.fill.FillTable.toPrintColumn(FillTable.java:116)
at net.sf.jasperreports.components.table.fill.FillTable$FillColumnEvaluator.visitColumn(FillTable.java:143)
at net.sf.jasperreports.components.table.fill.FillTable$FillColumnEvaluator.visitColumn(FillTable.java:130)
at net.sf.jasperreports.components.table.StandardColumn.visitColumn(StandardColumn.java:73)
at net.sf.jasperreports.components.table.fill.FillTable.evaluateColumns(FillTable.java:205)
at net.sf.jasperreports.components.table.fill.FillTable.evaluate(FillTable.java:98)
at net.sf.jasperreports.engine.fill.JRFillComponentElement.evaluate(JRFillComponentElement.java:88)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:257)
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:473)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2021)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeader(JRVerticalFiller.java:616)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillGroupHeaders(JRVerticalFiller.java:538)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:263)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:836)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:746)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)
at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:879)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)   
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
I am using Stored Procedures that returns a cursor as output.
I have placed this Table Report element in one of my group header.
thanks in advance
Meeza
Check in your style conditions if there's an evaluation with String. To ensure that everything works fine surround all the style conditions with new Boolean( ... ).