QRCoder icon indicating copy to clipboard operation
QRCoder copied to clipboard

How to load as assembly for SSRS?

Open arsalanjunejo opened this issue 3 years ago • 0 comments

I want to use Base64QRCode in one of my report, I am trying to use below code in SSRS, however I get strange errors. I have already added QRCodeGenerator Class and instance name QRCodeGenerator in Report Reference as well as Base64QRCode class and instance name.

image

I have added following lines in my code.

QRCodeGenerator qrGenerator = new QRCodeGenerator()

QRCodeData qrCodeData = qrGenerator.CreateQrCode(<My string to encode>, QRCodeGenerator.ECCLevel.Q,1) Base64QRCode qrCode1 = new Base64QRCode(qrCodeData)

Return qrCode1.GetGraphic(20)

I get the following error, [rsCompilerErrorInCode] There is an error on line 12 of custom code: [BC30545] Property access must assign to the property or use its value.

I tried following code

Dim qrGenerator as Object qrGenerator = new QRCodeGenerator()

QRCodeData qrCodeData = qrGenerator.CreateQrCode(<My string to encode>, QRCodeGenerator.ECCLevel.Q,1) Base64QRCode qrCode1 = new Base64QRCode(qrCodeData)

Return qrCode1.GetGraphic(20)

I got following error, [rsCompilerErrorInCode] There is an error on line 12 of custom code: [BC30002] Type 'QRCodeGenerator' is not defined.

Can anyone help?

arsalanjunejo avatar Jan 05 '22 11:01 arsalanjunejo