Report

Hi All,

I have created new form in which there is a report menuitem button and when I click on this button to open report then what i want report should contain data regarding only selected record in form.

i.e. How to get the report for the selected record(highlighted record) from the form by button click on the form.

please help me…

Thanks

Darshana

Hi,

This question has been asked and answered many times.

Have a look at this post

http://dynamicsuser.net/forums/p/51111/264189.aspx#264189

Please also make your subject descriptive, “report” is not very useful to browsers of the forum.

Hi All,

I am also having somewhat same problem. Thae code is runnig well for selecting only the purchase order from the header ,but not showing any results for line.

If I elaborate it I mean to say when I want to select the item ids related to the purchase order selected above,it is not displaying anythning.

Can any one tell what changes I have to bring in the fetch method to select data from the Line also .

it is simple.

just declare a common variable in class declaration of that report like

common callerrecord1;

and in fetch method block the super and write the code like

callerrecord1 = element.args().record();

try this it may helps you…:slight_smile:

Hi Van,

Thanks for the reply.I tried this also but not getting solution .

See In the Class Declation I have taken the name of table as PurchTable cur & PurchLine pl;

public boolean fetch()

{

QueryBuildDataSource qbs;

QueryRun qr;

qr = new QueryRun(element);

cur = element.args().record();

// pl = element.args().record();

element.send(cur);

return true;

}

How Should I make the changes in it .Can you do it and show me …thnks

In your class declaration remove all things like cur and table instances.and just declare the Variable

Common callerRecord; //but not cur or table instaces those may be confused.

and in fetch, write the folloing piece of code

CallerRecord == element.args().record();

no need to write anything apart from that.it will call a report for that record only and what the data you want to show in that report that you have to implement the logic after that piece of code.

let us know if u r not getting the proper result.

in class declaration

common callerrecord;

in fetch method

public boolean fetch()

{

QueryBuildDataSource qbs;

QueryRun qr;

qr = new QueryRun(element);

callerrecord = element.args().record();

element.send(your datasource name);

return true;

}