The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

sachinladdha (24) [Avatar] Offline
#1
Hi,

Can I use parameters collection in code block of the report?
I tried it but getting compilation errors.

here is the code -
Protected Overrides Sub OnInit()
public Dim id as String
id = Parameters!ID.Value
ResourceInstance = new ResourceUtil(id, "Archive_Usage")
End Sub


Any help is appreciated
regards,
Sachin
tlachev (687) [Avatar] Offline
#2
Re: Is it possible to user Parameters collection in Code block
The Parameters, Fields and ReportItems collections are not available in OnInit and custom code in general. You can pass them as arguments to other custom code functions.