Multiple data representations depending on query

Stimulsoft Dashboards.WIN discussion
Post Reply
codemonkey
Posts: 12
Joined: Fri Jan 17, 2020 3:02 pm

Multiple data representations depending on query

Post by codemonkey »

Hello!

English is not my primary language and this is a complex topic so please bear with me :)

We want to create different dataheads, databands and datafoods from a sql datasource with different parameters in the where-statement or something that looks the same. The parameters for the where statements are results from a second sql query.

Per example we have the following sql query that is used for the first datahead, databand and datafooter.
@timestamp is a variable set by our application when loading the report.
I made up the tables to describe the problem, the actual tables look different and there are more variables involved.

Primary Query

Select Timestamp, Value, User, Type
From TableData
Where
Timestamp = @timestamp and
Type = 'A'

We want Timestamp, Value, User to be displayed in the databand and type displayed in the datahead and a sum over the values displayed in the datafooter.

Second Query:

Select Type
From TableTypes
where timestamp = @timestamp

If the Second Query returns 3 differend types (pe. A,C,F) for the @timestamp then we need 3 different dataheads, databands and datafooters filled with data from the first query with the 3 different types received from the second query.
If we only got 1 return we need 1 datahead, databand and datafooter and so on.

The number of return Types can vary on every render.
For one query its no problem but we have no idea how to set it up for multiple different types.

Can it be done in the report itself of do we have to create the different datasources, dataheads,databands and datafooters in our application before rendering the report?
First option would be more desireable because of formatting issues and i have never created changed or created gui elements programmatically.

Any help and tips would be greatly appreciated!

greetings!
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Multiple data representations depending on query

Post by Lech Kulikowski »

Hello

Please let us know if you need any additional help.

Thank you.
Post Reply