mirror of
https://github.com/fralx/LimeReport.git
synced 2025-12-16 01:39:55 +03:00
added border for page and lrgroupbands has a sorting property
This commit is contained in:
@@ -466,7 +466,7 @@ QString DataSourceManager::replaceVariables(QString value){
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
return value;
|
||||
#endif
|
||||
return QString();
|
||||
}
|
||||
@@ -612,13 +612,13 @@ QString DataSourceManager::replaceFields(QString query, QMap<QString,QString> &a
|
||||
query.replace(pos,rx.cap(0).length(),":"+extractField(field));
|
||||
}
|
||||
}
|
||||
return query;
|
||||
return query;
|
||||
#endif
|
||||
return query;
|
||||
}
|
||||
|
||||
void DataSourceManager::setReportVariable(const QString &name, const QVariant &value)
|
||||
{
|
||||
{
|
||||
if (!containsVariable(name)){
|
||||
addVariable(name,value);
|
||||
} else changeVariable(name,value);
|
||||
@@ -1689,6 +1689,28 @@ QVariant DataSourceManager::fieldDataByRowIndex(const QString &fieldName, int ro
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant DataSourceManager::fieldDataByRowIndex(const QString &fieldName, int rowIndex, int role)
|
||||
{
|
||||
if(containsField(fieldName)) {
|
||||
IDataSource *ds = dataSource(extractDataSource(fieldName));
|
||||
if(ds) {
|
||||
return ds->dataByRowIndex(extractFieldName(fieldName), rowIndex, role);
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant DataSourceManager::fieldDataByRowIndex(const QString &fieldName, int rowIndex, const QString &roleName)
|
||||
{
|
||||
if(containsField(fieldName)) {
|
||||
IDataSource *ds = dataSource(extractDataSource(fieldName));
|
||||
if(ds) {
|
||||
return ds->dataByRowIndex(extractFieldName(fieldName), rowIndex, roleName);
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant DataSourceManager::fieldDataByKey(const QString& datasourceName, const QString& valueFieldName, const QString& keyFieldName, QVariant keyValue)
|
||||
{
|
||||
IDataSource* ds = dataSource(datasourceName);
|
||||
@@ -1698,6 +1720,44 @@ QVariant DataSourceManager::fieldDataByKey(const QString& datasourceName, const
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QVariant DataSourceManager::headerData(const QString &fieldName, const QString &roleName)
|
||||
{
|
||||
if(containsField(fieldName)) {
|
||||
IDataSource *ds = dataSource(extractDataSource(fieldName));
|
||||
if(ds) {
|
||||
return ds->headerData(extractFieldName(fieldName), roleName);
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QString DataSourceManager::columnName(const QString &datasourceName, int index)
|
||||
{
|
||||
IDataSource *ds = dataSource(datasourceName);
|
||||
if(ds && !ds->isInvalid() && ds->columnCount() > index) {
|
||||
return ds->columnNameByIndex(index);
|
||||
}
|
||||
return QString("unknown");
|
||||
}
|
||||
|
||||
int DataSourceManager::columnCount(const QString &datasourceName)
|
||||
{
|
||||
IDataSource *ds = dataSource(datasourceName);
|
||||
if(ds && !ds->isInvalid()) {
|
||||
return ds->columnCount();
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int DataSourceManager::columnIndex(const QString &datasourceName, const QString &columnName)
|
||||
{
|
||||
IDataSource *ds = dataSource(datasourceName);
|
||||
if(ds && !ds->isInvalid()) {
|
||||
return ds->columnIndexByName(columnName);
|
||||
}
|
||||
}
|
||||
|
||||
void DataSourceManager::reopenDatasource(const QString& datasourceName)
|
||||
{
|
||||
QueryHolder* qh = dynamic_cast<QueryHolder*>(dataSourceHolder(datasourceName));
|
||||
|
||||
Reference in New Issue
Block a user