void dspTimePhasedOpenAPItems::sSubmit() { if ((_custom->isChecked() && _periods->isPeriodSelected()) || (!_custom->isChecked() && _asOf->isValid())) { ParameterList params(buildParameters()); if(_custom->isChecked()) params.append("report_name", "TimePhasedOpenAPItems"); else params.append("report_name", "APAging"); if(_useDocDate->isChecked()) params.append("useDocDate"); else params.append("useDistDate"); submitReport newdlg(this, "", TRUE); newdlg.set(params); if (newdlg.check() == cNoReportDefinition) QMessageBox::critical( this, tr("Report Definition Not Found"), tr( "The report defintions for this report, \"TimePhasedOpenAPItems\" cannot be found.\n" "Please contact your Systems Administrator and report this issue." ) ); else newdlg.exec(); } else QMessageBox::critical( this, tr("Incomplete criteria"), tr( "The criteria you specified is not complete. Please make sure all\n" "fields are correctly filled out before running the report." ) ); }
CEvaluationNodeCall::CEvaluationNodeCall(const CEvaluationNodeCall & src): CEvaluationNode(src), mpFunction(src.mpFunction), mpExpression(src.mpExpression), mCallNodes(src.mCallNodes), mpCallParameters(NULL), mQuotesRequired(src.mQuotesRequired), mBooleanRequired(src.mBooleanRequired) {mpCallParameters = buildParameters(mCallNodes);}
void dspWoOperationBufrStsByWorkCenter::sPrint() { ParameterList params(buildParameters()); orReport report("WOOperationBufrStsByWorkCenter", params); if (report.isValid()) report.print(); else report.reportError(this); }
void dspTimePhasedSalesByCustomerGroup::sPrint() { ParameterList params(buildParameters()); orReport report("TimePhasedSalesHistoryByCustomerGroup", params); if (report.isValid()) report.print(); else report.reportError(this); }
bool CEvaluationNodeCall::compile(const CEvaluationTree * pTree) { bool success = true; clearParameters(mpCallParameters, mCallNodes); switch (mType & 0x00FFFFFF) { case FUNCTION: mpFunction = dynamic_cast<CFunction *>(CCopasiRootContainer::getFunctionList()->findFunction(mData)); if (!mpFunction) return false; // We need to check whether the provided arguments match the on needed by the // function; if (!verifyParameters(mCallNodes, mpFunction->getVariables())) return false; mpCallParameters = buildParameters(mCallNodes); break; case EXPRESSION: mpExpression = dynamic_cast<CExpression *>(CCopasiRootContainer::getFunctionList()->findFunction(mData)); if (!mpExpression) { // We may have a function with no arguments the parser is not able to distinguish // between that and an expression. mpFunction = dynamic_cast<CFunction *>(CCopasiRootContainer::getFunctionList()->findFunction(mData)); if (!mpFunction) return false; mType = (CEvaluationNode::Type)(CEvaluationNode::CALL | FUNCTION); success = compile(pTree); } else { success = mpExpression->compile(static_cast<const CExpression *>(pTree)->getListOfContainer()); } break; default: success = false; break; } return success; }
void dspWoOperationBufrStsByWorkCenter::sSubmit() { ParameterList params(buildParameters()); params.append("report_name","WOOperationBufrStsByWorkCenter"); submitReport newdlg(this, "", TRUE); newdlg.set(params); if (newdlg.check() == cNoReportDefinition) QMessageBox::critical( this, tr("Report Definition Not Found"), tr( "The report defintions for this report, \"WOOperationBufrStsByWorkCenter\" cannot be found.\n" "Please contact your Systems Administrator and report this issue." ) ); else newdlg.exec(); }
void dspTimePhasedSalesByItem::sPrint() { if (_periods->isPeriodSelected()) { orReport report("TimePhasedSalesHistoryByItem", buildParameters()); if (report.isValid()) report.print(); else { report.reportError(this); return; } } else QMessageBox::critical( this, tr("Incomplete criteria"), tr( "The criteria you specified is not complete. Please make sure all\n" "fields are correctly filled out before running the report." ) ); }
CCallParameters< C_FLOAT64 > * CEvaluationNodeCall::buildParameters(const std::vector<CEvaluationNode *> & vector) { std::vector<CEvaluationNode *>::const_iterator it = vector.begin(); std::vector<CEvaluationNode *>::const_iterator end = vector.end(); CCallParameters< C_FLOAT64 > * pCallParameters = new CCallParameters< C_FLOAT64 >(vector.size()); size_t i; for (i = 0; it != end; ++it, i++) { if ((*it)->mainType() == CEvaluationNode::T_VECTOR) (*pCallParameters)[i].vector = buildParameters(static_cast<const CEvaluationNodeVector *>(*it)->getNodes()); else (*pCallParameters)[i].value = (*it)->getValuePointer(); } return pCallParameters; }
void rptTimePhasedBookingsByCustomer::sPrint() { if (_periods->isPeriodSelected()) { orReport report("TimePhasedBookingsByCustomer", buildParameters()); if (report.isValid()) report.print(); else { report.reportError(this); reject(); } if(_captive) accept(); } else QMessageBox::critical( this, tr("Incomplete criteria"), tr( "The criteria you specified is not complete. Please make sure all\n" "fields are correctly filled out before running the report." ) ); }
void rptTimePhasedBookingsByCustomer::sSubmit() { if (_periods->isPeriodSelected()) { ParameterList params(buildParameters()); params.append("report_name", "TimePhasedBookingsByCustomer"); submitReport newdlg(this, "", TRUE); newdlg.set(params); if (newdlg.check() == cNoReportDefinition) QMessageBox::critical( this, tr("Report Definition Not Found"), tr( "The report defintions for this report, \"TimePhasedBookingsByCustomer\" cannot be found.\n" "Please contact your Systems Administrator and report this issue." ) ); else newdlg.exec(); } else QMessageBox::critical( this, tr("Incomplete criteria"), tr( "The criteria you specified is not complete. Please make sure all\n" "fields are correctly filled out before running the report." ) ); }
void dspTimePhasedOpenAPItems::sPrint() { if ((_custom->isChecked() && _periods->isPeriodSelected()) || (!_custom->isChecked() && _asOf->isValid())) { QString reportName; if(_custom->isChecked()) reportName = "TimePhasedOpenAPItems"; else reportName = "APAging"; orReport report(reportName, buildParameters()); if (report.isValid()) report.print(); else { report.reportError(this); return; } } else QMessageBox::critical( this, tr("Incomplete criteria"), tr( "The criteria you specified is not complete. Please make sure all\n" "fields are correctly filled out before running the report." ) ); }
bool CEvaluationNodeCall::compile(const CEvaluationTree * pTree) { bool success = true; clearParameters(mpCallParameters, mCallNodes); CObjectInterface * pObjectInterface = NULL; if (mRegisteredFunctionCN != "") { pObjectInterface = const_cast< CObjectInterface * >(CCopasiRootContainer::getRoot()->getObject(mRegisteredFunctionCN)); } switch (mSubType) { case S_FUNCTION: if (pObjectInterface != NULL) { mpFunction = dynamic_cast< CFunction * >(pObjectInterface); } else { mpFunction = dynamic_cast<CFunction *>(CCopasiRootContainer::getFunctionList()->findFunction(mData)); } if (!mpFunction) return false; mRegisteredFunctionCN = mpFunction->getCN(); // We need to check whether the provided arguments match the on needed by the // function; if (!verifyParameters(mCallNodes, mpFunction->getVariables())) return false; mpCallParameters = buildParameters(mCallNodes); break; case S_EXPRESSION: if (pObjectInterface != NULL) { mpExpression = dynamic_cast<CExpression *>(pObjectInterface); } else { mpExpression = dynamic_cast<CExpression *>(CCopasiRootContainer::getFunctionList()->findFunction(mData)); } if (!mpExpression) { // We may have a function with no arguments the parser is not able to distinguish // between that and an expression. if (pObjectInterface != NULL) { mpFunction = dynamic_cast< CFunction * >(pObjectInterface); } else { mpFunction = dynamic_cast<CFunction *>(CCopasiRootContainer::getFunctionList()->findFunction(mData)); } if (!mpFunction) return false; mRegisteredFunctionCN = mpFunction->getCN(); mMainType = T_CALL; mSubType = S_FUNCTION; success = compile(pTree); } else { mRegisteredFunctionCN = mpExpression->getCN(); success = mpExpression->compile(static_cast<const CExpression *>(pTree)->getListOfContainer()); } break; default: success = false; break; } return success; }