Necmi Göcek
1/30/2006 2:31:00 PM
Class declaration;
public class ReportRun extends ObjectRun
{
YourTable yourTable;
}
Sample Init method of your report;
public void init()
{
;
yourTable = element.args().record();
if (yourTable)
{
this.query().dataSourceTable(tablenum(YourTable)).addRange(fieldnum(YourTable, YourField)).value(yourTable.YourField);
super();
}
}
--
_MIB_
"Raj" wrote:
> Hi ,
> The Code was helpful, but what i Actually want is to Print the Report
> for the Selected Item from the Grid, right now i when i click on Ok button
> the all the records are printed in the report , i want only the selected
> record to be displayed in the Report.
>
> Can you please tell me how to pass the Value to the Click event in the OK
> button,
> Iam using Prodtable and ProdJournalTable in the report and trying to call
> the Report from a form which is using ProdParmStatusDecrease table.
>
> Can u please tell me how to pass the value to the report
>
> thanks in advance
>
> Rob
>
>
> "Necmi Göcek" wrote:
>
> > On the clicked event of ok button
> >
> > ReportRun rr;
> > Args arg;
> > ;
> > arg = new args(ReportStr("YOURREPORTNAME"));
> > arg.record("YOURTABLENAME");
> > arg.caller(element);
> > rr = new ReportRun(arg);
> > rr.init();
> > rr.run();
> >
> > --
> > _MIB_
> >
> >
> > "Raj" wrote:
> >
> > > Hi,
> > > I would like to know what is the procedure to call a report from a
> > > click event of a button.
> > >
> > > I have a menu item button in the form where i have set the Menuitem name
> > > and Datasource of the Report , if i click on the menu itme the report runs
> > > perfectly, I have a "OK" button in the same form , i want to run the report
> > > on click of Ok button , is there any method to do that, if there is , Can you
> > > please send me the code to do that.
> > >
> > > Thanks in Advance.
> > >
> > > Regards,
> > > rob