//Need to create new table with following fields
1) DataSourceNo
2) TableLabel
3) FieldLabel
4) RangeValue
public static ReportParmTmp rangesToSSRSReport(Query _query)
{
QueryBuildDataSource qbds;
QueryBuildRange queryBuildRange;
ReportParmTmp reportParmTmp;
Str 250 tableLabel;
int i,j;
;
for (j = 1; j <= _query.dataSourceCount(); j++)
{
qbds = _query.dataSourceNo(j);
if (qbds.enabled())
{
tableLabel = tableId2pname(qbds.table());
for (i = 1; i <= qbds.rangeCount(); i++)
{
queryBuildRange = qbds.range(i);
if (queryBuildRange.value() && queryBuildRange.status() != RangeStatus::Hidden)
{
reportParmTmp.clear();
reportParmTmp.DataSourceNo = qbds.uniqueId();
reportParmTmp.TableLabel = tableLabel;
reportParmTmp.FieldLabel = fieldId2pname(qbds.table(), queryBuildRange.field());
reportParmTmp.RangeValue = queryBuildRange.value();
reportParmTmp.insert();
}
}
}
}
return reportParmTmp;
}
1) DataSourceNo
2) TableLabel
3) FieldLabel
4) RangeValue
public static ReportParmTmp rangesToSSRSReport(Query _query)
{
QueryBuildDataSource qbds;
QueryBuildRange queryBuildRange;
ReportParmTmp reportParmTmp;
Str 250 tableLabel;
int i,j;
;
for (j = 1; j <= _query.dataSourceCount(); j++)
{
qbds = _query.dataSourceNo(j);
if (qbds.enabled())
{
tableLabel = tableId2pname(qbds.table());
for (i = 1; i <= qbds.rangeCount(); i++)
{
queryBuildRange = qbds.range(i);
if (queryBuildRange.value() && queryBuildRange.status() != RangeStatus::Hidden)
{
reportParmTmp.clear();
reportParmTmp.DataSourceNo = qbds.uniqueId();
reportParmTmp.TableLabel = tableLabel;
reportParmTmp.FieldLabel = fieldId2pname(qbds.table(), queryBuildRange.field());
reportParmTmp.RangeValue = queryBuildRange.value();
reportParmTmp.insert();
}
}
}
}
return reportParmTmp;
}
No comments:
Post a Comment