in ax 2009 where does the user defined queries gets stored for reports

Hi All,

In ax 2009, while pulling any reports, we have the option to filter our query , like providing ranges.

Like inside dialog-Select Button-Inside which we can set a range as in PFA-.

I understand that its user specific , so that whenever he pulls the report based on the range whichever is defined.

I am interested to know where this values gets stored in database??

Reason: I had a custom reciept report which was directly connected to printer and its was picking “jounal number” from ledgerjournal Table but later , i changed the logic to pick it from ledgerjournaltrans and the outpit of report was really “shocking”-an output without meaning, complete values went wrong.

For this , when i changed the client configuration, like i create a new client configuration and ran the report-the result was perfect,

i still wonder whats the reason and would like to know whetehr it have anything to do with the previuosly saved ranges in old configuration??

As in PFA- Where the Journal number range provided gets stored.

Any quick thought will be appreciated.

Hi,

The Usage data functionality stores information such as ranges, report selections etc. The underlying data gets stored in ‘SysLastValue’ table. You should be able to verify this by running following SQL statement -

while select SysLastValue
where SysLastValue.userId == ‘HARISH’
&& SysLastValue.company == curext()
&& SysLastValue.recordType == UtilElementType::UserSetupQuery

{

}

Hope this helps.

Hi Harish,

Thanks for the reply, but in Syslastvalue table,it gives the info of just userid, recordtype and name.

What i need is like for eg: If in a report say we set a filter like : Journal number as: 12345

So next tym when i report it automatically picks the same journal number and gives te output.

So i would like to know where this journal numbr gets stored in which table of database?

Hi,

The values get stored in the ‘Value’ field in ‘SysLastValue’ which is a container.

You can also use ‘xSysLastValue’ framework to extract the value. You can see example of how to call this framework in many standard AX forms such as ProjTable (init method) and classes such as PurchTableForm (new method).

Hope this helps.

hi,

But in value i dont have any info about the journal number. Basically i would like to know how does this value gets stored.

Apart from syslastvalue table, is there any temp table or any where the query vaue gets stored?

Hi Shon Davis,

have you found out where the query value stored?

Thx

Regards,

Dar

Hi Dar,

No , am not sure on that.

Please share if you have a solution .

Harish is right, it’s stored in SysLastValue table. Are you aware of that Value is a container field and you won’t see its content in grid? You have to open its lookup to see the tree of values stored in the container.