自定义报表类
写一个可以执行的报表类,实现传参调用报表。
传参的部分使用的是Dialog。
class PurYearClass extends RunBaseReport
{
DialogField g_dialogField;
int g_year;
public ClassDescription caption()
{
ClassDescription ret;
ret = "月采购报表汇总"; //运行时标题
return ret;
}
public Object dialog()
{
DialogRunBase m_dialog = super();
g_dialogField = m_dialog.addField(TypeId(Yr),"查询年份:");
g_dialogField.value(year(systemdateget()));
return m_dialog;
}
public int getYear()
{
return g_dialogField.value(); //传递参数的方法
}
public identifiername lastValueElementName()
{
identifiername ret;
ret = "PurYearSlip"; //指定运行的报表名称
return ret;
}
public container pack()
{
return connull();
}
public boolean unpack(container packedClass)
{
boolean ret;
ret = super(packedClass);
return ret;
}
static void main(Args args)
{
PurYearClass m_purYear;
;
m_purYear = new PurYearClass();
if(m_purYear.prompt())
{
m_purYear.run();
}
}
}
{
DialogField g_dialogField;
int g_year;
public ClassDescription caption()
{
ClassDescription ret;
ret = "月采购报表汇总"; //运行时标题
return ret;
}
public Object dialog()
{
DialogRunBase m_dialog = super();
g_dialogField = m_dialog.addField(TypeId(Yr),"查询年份:");
g_dialogField.value(year(systemdateget()));
return m_dialog;
}
public int getYear()
{
return g_dialogField.value(); //传递参数的方法
}
public identifiername lastValueElementName()
{
identifiername ret;
ret = "PurYearSlip"; //指定运行的报表名称
return ret;
}
public container pack()
{
return connull();
}
public boolean unpack(container packedClass)
{
boolean ret;
ret = super(packedClass);
return ret;
}
static void main(Args args)
{
PurYearClass m_purYear;
;
m_purYear = new PurYearClass();
if(m_purYear.prompt())
{
m_purYear.run();
}
}
}