
I am designing a report. Currently it contains a controller, DP and contract.
In my DP I created a query (and queryRun) in code to select all the relevant records - which ended up to be quite bulky. So I created a query in the AOT with all the relevant datasources and ranges set. (I am new to using AOT defined queries.) I set the ranges on the query by using part method from the contract. So the code looks like this:
Query query = new Query(queryStr(myQuery));
query.findRange(fieldNum(table, field)).value(contract.parmMethod());
QueryRun queryRun = new QueryRun(query);
Which works as I intended it to work. That's all background, here is my question:
1) How does a query get passed around in this general report structure?
2) Can I replace the contract class with queryRun.prompt() ? (as the contract only prompts and stores the query ranges) I havent done this before - not sure where to start.
*This post is locked for comments
I have the same question (0)I can see your issue is probably taking current record from menu item to pass it to report.
if so is the case, it can be three steps process.
1) on your output menu item set datasource of form, that you want to pass as record.
2) catch and manage args() in controller class. have a look at example named wmsJournalTransController
3) on your output menu item set controller class rather than setting ssrs report. controller class will call the report.