Posted 16 July 2025, 7:21 am EST
Hello, everyone! I’m developing a web app using C# 12, .Net 8 and Blazor (the new unified Blazor). This web app will incorporate the web-based report designer included in v17 of ActiveReports.
What I envision:
The user can design a report template using the report designer and place objects such as image fields, text fields with constant values (i.e. Titles, Column names, etc.) and custom parameter fields (that will be passed into the report object).
So, for example, the user places a parameter named “&BatchId” on the report. Further down the page, the user places a parameter named “&CheckImageFront” (which will be an image of a scanned check). I’m assuming that parameters need the “&” in front of the field name?
The user will save the report template so that it can be used with another C# application to process customer data and use the report template to create the actual report. So, for instance, the C# app will say “Hey, the user wants to process Customer A. According to the database, Customer A uses a report template named CustomerARptTemplate. Let’s load that up and start filling in the blanks in the template”. It’s at this point that the C# app will pass in the parameters to the template and create a PDF report for the customer.
So, my question(s) is this:
In the C# program, how can I pass a value to a parameter on the template? For example, I want to send value “12345” to the &BatchID parameter and “CheckImage1.tiff” to the image parameter named “&CheckImageFront”. In C# a variable cannot begin with “&” so I’m assuming that there must be a way in the report designer to give a field an alias that is C#-safe.
Does anyone have some sample code that illustrates sending values to parameters in a template designed with the report designer?