How to add SSRS report button in epicor form

Hi team,
I have Created SSRS report from report designer and its working fine. i have added this report to form but if i click on that button then its not pick value from form key like ponum, OrderNum…
if i manually add value then its showing preview. set-item method showing error. Please guide.

1 Like

Hi Dinesh, welcome!

Same issue with Report created by Report Designer. Please help

@DineshYadav001 We are going to need a little more information to help diagnose. Can you provide the code you are using to run the report via code? The more screenshots the better. Also need a screenshot of that error you are getting

private void epiBtnPrint_Click(object sender, System.EventArgs args)
	{
		// ** Place Event Handling Code Here ** TestBAQ
		EpiTextBox txtPart =(EpiTextBox)csm.GetNativeControlReference("8e25166f-6185-4497-b3d6-1798e4e9c4a0");
	
	    LaunchFormOptions lfo = new LaunchFormOptions();
	    lfo.ValueIn = "TestBAQ";
	    UIReflector BAQForm = ProcessCaller.LaunchCallbackForm(oTrans, "TestBAQ", lfo);
	    EpiDataView ParamView = (EpiDataView)BAQForm.UITrans.EpiDataViews["ReportParam"];
	    ParamView.dataView[ParamView.Row].BeginEdit();
              EpiDataView INSView = (EpiDataView)(oTrans.EpiDataViews["InspDataParam"]);
              ParamView.dataView[ParamView.Row]["numQuoteNum_1"] = txtPart.Text.ToString();
         ParamView.dataView[ParamView.Row].EndEdit();
        BAQForm.UITrans.NotifyAll();
	}
}

You are going to need to share your parameter configuration for the report.

Yes I want that parameter auto fetch from form.

Try the below code at your BaqReport Form

private void BAQReportForm_Load(object sender, EventArgs args)
	{
		// ** Place Event Handling Code Here **


		if(BAQReportForm.LaunchFormOptions != null)
		{
			string val = BAQReportForm.LaunchFormOptions.ValueIn.ToString();
	
			string[] items = val.Split('~');
			
			string QuoteNum = items[0];
			string CarcassBrand = items[1];
	
			EpiDataView view = ((EpiDataView)(this.oTrans.EpiDataViews["ReportParam"]));
	
			view.dataView[view.Row].BeginEdit();
			view.dataView[view.Row]["field1"]= QuoteNum;
			view.dataView[view.Row].EndEdit();
	
			view.dataView[view.Row].BeginEdit();
			view.dataView[view.Row]["field2"]= CarcassBrand;
			view.dataView[view.Row].EndEdit();
			
			oTrans.Update();
		
			//txtfield1.Text = QuoteNum;
			//txtfield2.Text = CarcassBrand;
		}	
		else
		{
			
		}

I believe Chris means how you have configured your parameter on the BAQ Report Designer screen.

2 Likes