First off, I'm quite impressed with ComponentOne's ASP.NET tools; I'm using a trial version right now for evaluation purposes but my boss wants to buy a license soon so we can use this in production.
I do have a few questions which I hope someone can answer or at least point me in the right direction:
1. How do I override the connection string of a web report in VB.NET code? We have multiple databases with the same tables and stored procedures, just different data, one for each customer. It would be annoying to have to duplicate the report definitions as well, since they contain the connection strings within them.
2. How do I pass a parameter to a report via VB.NET code, without using dynamic SQL? I see that if I create a report based off of a parameterized stored procedure (impressive that that's possible!), I get a popup whenever I try to view the report asking me to enter an employeeID or whatnot into a script editor; that's not all that user-friendly, so I'd like to use ASP.NET dropdowns and such to get the parameters. But it seems that the only documentation I can find about passing the parameters into the report tells me that I have to generate a SQL string dynamically, which seems rather odd - maybe I'm expecting too much, but I was hoping for some sort of object model for report parameters so I don't have to worry about SQL injection!
3. How do I set a "standard" header and footer for all reports I create, or alternatively, dynamically insert one into the report as it is viewed? This would make creating consistently branded and themed reports a bit simpler, as if you want to make a change, you wouldn't have to go back and edit every single report manually!
Thanks for any help that anyone can provide!
1) You may use C1WebReport1.Report.DataSource.ConnectionString property of the report to set them to a different connection string.
2) Currently there is no such direct feature for parameter passing.
3) You may access header section in code and set its field values, so it is easy to give same appearance or value to header and footer of all different reports by setting them in code.
-Dave.
<ekolis> wrote in message news:215710@10.0.1.98... First off, I'm quite impressed with ComponentOne's ASP.NET tools; I'm using a trial version right now for evaluation purposes but my boss wants to buy a license soon so we can use this in production. I do have a few questions which I hope someone can answer or at least point me in the right direction: 1. How do I override the connection string of a web report in VB.NET code? We have multiple databases with the same tables and stored procedures, just different data, one for each customer. It would be annoying to have to duplicate the report definitions as well, since they contain the connection strings within them. 2. How do I pass a parameter to a report via VB.NET code, without using dynamic SQL? I see that if I create a report based off of a parameterized stored procedure (impressive that that's possible!), I get a popup whenever I try to view the report asking me to enter an employeeID or whatnot into a script editor; that's not all that user-friendly, so I'd like to use ASP.NET dropdowns and such to get the parameters. But it seems that the only documentation I can find about passing the parameters into the report tells me that I have to generate a SQL string dynamically, which seems rather odd - maybe I'm expecting too much, but I was hoping for some sort of object model for report parameters so I don't have to worry about SQL injection! 3. How do I set a "standard" header and footer for all reports I create, or alternatively, dynamically insert one into the report as it is viewed? This would make creating consistently branded and themed reports a bit simpler, as if you want to make a change, you wouldn't have to go back and edit every single report manually! Thanks for any help that anyone can provide! http://helpcentral.componentone.com/cs/forums/p/78623/215710.aspx#215710
Hmm, I'm glad you were able to answer two of my questions, but to be honest it's quite surprising that there's no way to pass parameters into the report, short of inserting custom SQL code at runtime... thank you for your time, though, and if I have any further questions I'll make sure to ask!