I am trying to, from a button, launch a report with criteria selected from the report. I am hitting a wall. Most documentation I find is for a BAQ report. I created this report using RDD and it runs with SSRS Breaking/Routing rules. I tried to follow this post, but it doesn’t work anymore. C# Help with DynamicCriteria Report
Any nudge in the right direction is appreciated. Currently I have the code launching a BAQ, which does half of what I want, but I need to get the report to trigger.
If you can find an existing menu location for the report you’re trying to launch, you can do it by Launching the Form through the button click. Here is an example of where I use an Actions menu click to launch the BOM Listing report from Method Tracker using the parameters of the revision I have loaded in Method Tracker. I imagine you could do something similar.
Ok this may work. I am looking for a way to run this without further user interaction. Will this allow me to launch the form and submit the report without the user being able to stop the process? If not, I’ll work with it. I have a similar button in quotes that populates the variables and allows the user to run a report, but for this one, I was hoping to have the button be the last interaction from the user.
You should be able to do this… but what I pasted up there will still require the user to click the print preview to get the form. Depending on the form, you might be able to pass some parameters using the launch form options telling it to RunDirect or something like that… and if that doesn’t work, you can customize the print dialog to tell it to print and then close the screen without a user interaction. I have used both ways and I don’t remember why one way had to be used vs. the other.
If it is a Dynamic criteria report with criteria then it shouldn’t be null. Are you running this code on the Customization of the Report itself? I’ll give you a run down of my entire process, hopefully it can assist.
First my customization is on a button on the quote form that sets the criteria on the Dynamic Criteria Report form.
private void epiButtonBOM_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
EpiTextBox QuotNum = (EpiTextBox)csm.GetNativeControlReference("8e25166f-6185-4497-b3d6-1798e4e9c4a0");
EpiUltraComboPlus LineNum = (EpiUltraComboPlus)csm.GetNativeControlReference("fa359824-fd06-42b4-9f2c-e31d23d4f97e");
string currentQtNum=QuotNum.Text;
string currentLineNum=LineNum.EpiCombo.Text;
string[] prtParams = {currentQtNum, currentLineNum };
LaunchFormOptions lfo = new LaunchFormOptions();
lfo.IsModal = true;
lfo.ContextValue=currentQtNum +","+currentLineNum; // Make string values delimited
ProcessCaller.LaunchForm(oTrans, "JTibom",lfo); //the menu id
}
Then the rest of my code is actually on a customization on the menu item “JTibom”. It’s been to long, so I don’t recall if I needed to add a reference or not, but if I did it would be the Ice.UIRpt.DynamicCriteriaReport. Since this is a closed topic, you may want to start a new one, but I do think that adding this clarifies how I executed this.
Run a trace in tracing options and run a report, then look for in the trace log for the SubmitToAgent and find the agentSchedNum and the agentTaskNum. Mine is 0, 0. Then just change the SystemTaskAgent line to match.