Scripted data source not being displayed in key browser

Hi,

This is my scripted data source of a report.

And this is my key browser -

Why can i not view the scripted data source here? Am i missing something?

Thanks!

Quick checks:
Have you hit Save since you added that script? And:
Are you getting any errors? Either when you move to the design or preview screens, or in the gateway logs?

Maybe try executing the code on script console as well to check if you are getting the result that you want.

Changed a little bit of the code...Was getting an error at Line 10. Now the attached code does not result in any errors but the datasource still doesn't appear in the browser... However, in spite of this, after i manually typed in the binding text in the image Key, the image is being displayed...

I get an 'ImportError: cannot import name IgnitionGateway'

Friendly tip: instead of posting pictures of code, use three back ticks (```) at the top and bottom of the code block, and paste the code block in directly, so it looks like this:

def updateData(data, sample):
	from com.inductiveautomation.ignition.gateway import IgnitionGatemay
	from com.inductiveautomation.ignition.gateway.images import ImageRecord
	context = IgnitionGatemay.get()
	imageManager = context.getImageManager()
	user = data ['userName'] 
	params = {'username': user}
	imagePath = system.db.runNamedQuery('...')
	if imagePath:
		path = imagePath[15:]
		data['image_path'] = path
		imageData = imageManager.getImage(data['imagepath'])
		imageBytes = imageData.getBytes(ImageRecord.Data)
		data['imageBytes'] = imageBytes

	return data

It makes it much easier for us to examine and troubleshoot the code when we can copy, quote, and reference specific lines.