Flexcel Reports: Prompting for User Input

I am exploring using Flexcel for reports. As I read the docs and play with the demos, I am mapping how tasks accomplished in traditional banded report systems are accomplished in Flexcel.

I think I have everything mapped except how to prompt the user for parameters. For instance, how do you create a report that would produce a list of orders for all the user selected customers? In a tool like Fast Reports, you would create a dialog box with a check listbox and let the user check off the customers to report on.

How is something like this accomplished in Flexcel? By the app? If so, this means the app would need to know and implement every possible input form for reports. Right? 

What's the optimal way to accomplish the scenario I'm describing? Is Flexcel Reports meant to be an alternate solution to traditional banded report systems?


Indeed, the idea is that you create a form to enter the parameters, and then pass those parameters to FlexCel via Report.SetValue('parameter', paramvalue);

The thing is: The form to enter parameters really belongs to your app. It might be a VCL form, it might be FireMonkey, it might be intraweb (and in this case it would be a web page), it might be ios, whatever. All of those forms look different and work different.

But even if we restrict to VCL, the form FlexCel might show won't probably blend with the rest of your app. The icons will be different, the controls too, etc. Say you use an special TDateTimePicker to show dates. Teh form FlexCel could show would use a standard TDateTimePicker, and look out of place with the rest of the app. Or maybe some I don't know, IP edit which allows the user to enter IP addresses. You want the form asking for parameters to use the same IPEdit as the rest of your app.

So yes, you need to implement the input forms. I don't know about fastreport but I am not sure it would be too different: You wold create a form with a checklistbox and let the user check off the customers to report on.  then you would run a report on those customers.

Now, with this all being said, one of the advantages of FlexCel is that the user can create his own reports in Excel, so you might not know in advance the parameters you need to ask. In that case, what you can do is to create the dialogs dynamically. 

I've done this once in an ASP.NET app (using FlexCel.NET). The system worked as follows:
1)The user could add reports by creating new files and putting it into a specific folder or subfolder. Say you crate a report named "My customers.Template.xlsx"

2)That report would use DirectSQL, so the user doesn't need to modify the app in any way to add it.

3)The app would scan that folder, see a new report, and show it in a treeview wiht all the other reports the user created.

4)To define the parameters, the user would create a file "My customers.Parameters.xlsx" in the same place as "My customer.Template.xlsx". This file was a list of parameters and datatypes, something like:
Start date, date
End date, date
customerId, number

The app would read this configuration file, and create an ASP.NET form dynamically with all those values. It would use DateTimePickers for dates, numerical edits for numbers, etc.

With this approach, the user could add as much reports as they wanted, without needing to call me or change the app. It has been a few years since I last visited them, but last time I was there they had added something like 1000 reports, which I myself was very impressed they did. And those weren't smple things either, they were really complex with charts and fancy stuff.

Very interesting. I am still in the process of re-training the brain from traditional banded solutions. Your post helps. Thank you for a thorough post.