Report Component not respecting binding, using default from report designer only

Using 8.1.47

I have a window where a report viewer component. The Report Path can only be 1 of 2 of different paths, and have the same exact parameters of which there is only 2.

One of them is sourceTable which is a string that is the name of the database table to grab from - either the staging table (data before the user signs off on things) or the final table (the staging was approved). In my window it’s always going to be the staging table as this is the window where they get to sign off on the report so I have it like hardcoded as an expresion like

the other table is recordId which is the id of the row I am using. This one doesn’t seem to be problematic.

Here is what I am observing. In my report designer I use the finalized table for testing / designing my report like

For some reason FillLog is what is coming through on the ReportViewer. I know this because I have a script dat source that is giving me errors like

WARN: Error invoking script.Traceback (most recent call last):
File "function:updateData", line 3, in updateData
File "module:util.decorators", line 84, in wrap
File "module:COA.report", line 137, in getReportAnalyzerData
IndexError: index out of range: 0

My script there is

@util.decorators.logparams
def getReportAnalyzerData(recordId, sourceTable):
	"""
	Gets things for the analyzer table.
	Args:
		stall: int
		source: str either 'PLC' or 'DB' so we know which to grab the data from.
	Returns:
		Tuple(dataset, dataset. NADA, NDA code) - (Analyzerdataset, subototals, X_NADA, N_NDA codes if they exist)
		Returns two datasets, the first one is for the rows in the table, second one is if the product's table has a subtotal row - then that gets
		populated with this
	"""
	productName, productInt, grade = system.db.runPrepQuery("SELECT t1.Product, t2.Product, t1.[Analyze_Test_#] FROM {} t1 JOIN cfgProducts t2 ON t1.Product=t2.Name  WHERE RecordId=?".format(sourceTable), [recordId], 'ATF_DB')[0]
	# Because we save it to the db as a string for some godforsaken reason...
	grade = int(grade)
	if productInt == common.Products.LIN:
		return getReportLINAnalyzerData(recordId, sourceTable, grade)
	elif productInt == common.Products.LOX:
		return getReportLOXAnalyzerData(recordId, sourceTable, grade)
	elif productInt == common.Products.PLAR:
		pass
	elif productInt == common.Products.CLAR:
		pass

I am logging the args and kwars and I see

image

I tried setting the default param to None but then ‘None’ comes through and other things fail as then it tries to do select * from None.

I can’t tell why this is occuring. It seems like the report param for my report viewer is defaulting to what it is in the report creator module despit it being hardcoded as an expression in my binding. I don’t know if the fact I have one report viewer trying to handle multiple reports has anything to do with this and if I should just make two report viewers and toggle visiblity on the appropriate one instead of doing things the way I am currently. Any insight/advice for how to rectify this?

I know the obvious thing to do now is to make the default param ‘FillStatus’ but I fear for when someone who isn’t mean modifies a report, maybe changes that default param the other table to take a look, and then things break.