Currently only the Table Id can be used which is meaningless as it is a number. A little bit of code example would really be great.
views:
1150answers:
1
+2
A:
Create a new RunBaseReport
class and remember to name the SysDatabaseLog
report in the lastValueElementName
method.
Prompt the table name in the dialog
method; use the TableName
extended data type to enable lookup.
Object dialog()
{
DialogRunbase dlg = super();
;
dialogTableName = dlg.addFieldValue(typeId(TableName),tableId2Name(tableId));
return dlg;
}
Update the table id range of the queryRun.query()
in the getFromDialog
method after calling super()
. Use the tableName2Id
function to convert to table id.
boolean getFromDialog()
{
boolean ret = super();
;
tableId = tableName2Id(dialogTableName.value());
this.queryrun().dataSourceNo(1).findRange(fieldNum(SysDatabaseLog,Table)).value(queryValue(tableId));
return ret;
}
In the validate
method, validate that table name is valid (table id not 0, table not temp etc.).
Lastly you change the output menu item to point to the class rather than the report.
Warning: code has not been tested!
Jan B. Kjeldsen
2009-09-03 08:36:51
"Update the table id range of the queryRun.query() in the getFromDialog method after calling super(). Use the tableName2Id function to convert to table id."I'm a bit stuck with the above - could you clarify a bit more for me? - Thanks a lot for your help,
mm2010
2009-09-09 08:47:55
Answer had been updated.
Jan B. Kjeldsen
2009-09-11 06:36:44
Thanks a million - I got it working by hacking around a bit with all the help that you provided.
mm2010
2009-09-11 12:51:41