Grouping by parameters

7 posts, 0 answers
  1. Amir
    Amir avatar
    5 posts
    Member since:
    May 2015

    Posted 30 Jul 2015 Link to this post

    Hello I currently have a multivalue parameter 'username' and a crosstab which displays information based on the usernames selected in the parameter dropdown. Currently if I select multiple usernames the data will be added together in the one crosstab. What i'd like is to have a separate crosstba for each of the usernames selected. Is this possible? In SSRS I would just add to a listbox and group by username, I have tried adding the crosstab to a listbox in telerik and group the list by username but it doesnt work. Would be grateful of any advice in he right direction. 

     

    Thanks

     

  2. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 30 Jul 2015 Link to this post

    Hello Stephen,

    You can feed the report data source with the selected usernames. Then place a crosstab inside the report's detail section. The detail section will be repeated (together with the crosstab) once for each username in the Report.DataSource.
    You will also need to filter the crosstab's data records to match the current username.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Amir
    Amir avatar
    5 posts
    Member since:
    May 2015

    Posted 30 Jul 2015 in reply to Nasko Link to this post

    Thanks for the reply Nasko, I have an odata feed as my data source, not sure if that makes a difference but when i add the crosstab to the detail section and select multiple usernames it just aggregates it into one crosstab instead of showing the crosstab once for each username. I've also tried filtering the crosstab but get the error  'integer = system.object not allowed'. I've tried binding in the details section by the parameter id, this gives a separate crosstba for each username but the data is still an aggregate of all selected usernames. Any more tips?

    Thanks

  5. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 03 Aug 2015 Link to this post

    Hello Stephen,

    To show the crosstab once for each username you need to configure each username to be a separate data record in the Report.DataSource and then place the Crosstab item inside the report's detail section.
    Then you need to configure the Crosstab.DataSource to retrieve the usernames data and set the Crosstab.Filters collection to filter out each username except the current one.
    The "integer = system.object not allowed" error message means that your filter rule is not correctly configured. Either change the operator to a different one (e.g., IN) or use conversion functions to compare data of the same type.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Amir
    Amir avatar
    5 posts
    Member since:
    May 2015

    Posted 04 Aug 2015 in reply to Nasko Link to this post

    Hi Nasko, the datasource contains a row for each username but when I add a crosstab it combines the data into 1 crosstab instead of a crosstab each. Would it be possible to send you the report so you can see if there's anything obviously wrong?

    Thanks, Stephen

  7. Amir
    Amir avatar
    5 posts
    Member since:
    May 2015

    Posted 06 Aug 2015 in reply to Nasko Link to this post

    "Then you need to configure the Crosstab.DataSource to retrieve the usernames data and set the Crosstab.Filters collection to filter out each username except the current one."

    Hi Nasko, could you provide the syntax or logic I would use for filtering out each username. I have tried something like Cstr(Fields.UserId) = CStr(Parameters.userid.Value) but this result sin the crosstabs being empty..

    Thanks

    Stephen

  8. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 07 Aug 2015 Link to this post

    Hello Stephen,

    It is really hard to provide logic when we are unaware of the report structure, data fields and parameters. Please open a new support ticket in our system where it is allowed to attach a zipped sample project exhibiting the scenario. Then we will be able to advise further.

    Regards,
    Nasko
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner