Filter variables by columns chosen to compile in report
Posted: Thu Jan 30, 2014 5:50 pm
Hello again. I really need to find a way to make something like this:
Say we want our application to show the user specific variables depending upon which dataSource the user selects. For example, if the user chooses the clients datasource, then the application must show him only filters that have something to do with the clients datasource, such as a client code range or something like that. But when the user deletes that databand from the report and drags a new one, say the supplies datasource, then the application must hide all the previous filters, and show him, again, only the relevant ones, such as a supplies code or something. Now, we are currently able to do this via the StiDataSourceHelper class, using the GetUsedDataSourcesNamesList function to get the datasource the user is using, and therefore via our application decide which variables are shown and which are not, we currently do this already.
However, there may be times when the user may select that same clients datasource, but it has many fields, and maybe the fields he wants to select out of that datasource, have nothing to do with many of the filters that will be added automatically once the program sees he selected the clients datasource. Management feels having 20 filters shown and only 3 useful to the report is a no-no. But since we don't know which columns he selected out of that datasource we cannot filter better the filters that will be shown to him. I understand this may seem too much work for a single report, but it's what management is asking for anyway.
So the question remains, what can we do to achieve this? I understand the StiDataSourceHelper class will only work with data sources, as the name says, but we need to find a way to give our application the information about what columns are being chosen to be shown. I mean somewhere Stimulsoft must know which columns are being chosen, because it only shows those columns after the report is compiled, and that's the data we need. So maybe if StiDataSourceHelper is not gonna help, is there another class that will? I understand this may not be your typical request, but something like this must exist, since even Stimulsoft by itself uses it. I hope we can work this out and thanks for your input.
Say we want our application to show the user specific variables depending upon which dataSource the user selects. For example, if the user chooses the clients datasource, then the application must show him only filters that have something to do with the clients datasource, such as a client code range or something like that. But when the user deletes that databand from the report and drags a new one, say the supplies datasource, then the application must hide all the previous filters, and show him, again, only the relevant ones, such as a supplies code or something. Now, we are currently able to do this via the StiDataSourceHelper class, using the GetUsedDataSourcesNamesList function to get the datasource the user is using, and therefore via our application decide which variables are shown and which are not, we currently do this already.
However, there may be times when the user may select that same clients datasource, but it has many fields, and maybe the fields he wants to select out of that datasource, have nothing to do with many of the filters that will be added automatically once the program sees he selected the clients datasource. Management feels having 20 filters shown and only 3 useful to the report is a no-no. But since we don't know which columns he selected out of that datasource we cannot filter better the filters that will be shown to him. I understand this may seem too much work for a single report, but it's what management is asking for anyway.
So the question remains, what can we do to achieve this? I understand the StiDataSourceHelper class will only work with data sources, as the name says, but we need to find a way to give our application the information about what columns are being chosen to be shown. I mean somewhere Stimulsoft must know which columns are being chosen, because it only shows those columns after the report is compiled, and that's the data we need. So maybe if StiDataSourceHelper is not gonna help, is there another class that will? I understand this may not be your typical request, but something like this must exist, since even Stimulsoft by itself uses it. I hope we can work this out and thanks for your input.