CrossTab with code?

Stimulsoft Reports.NET discussion
Post Reply
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

CrossTab with code?

Post by Jennypi »

Hello,

So that it's more convenient, I'm trying to convert a "fixed" report into a "dynamic" report, using a crosstab.
Indeed, instead of having the columns fixed in the report, they will be chosen by the users in the application they use.

but there are some features in the fixed report that I can not reproduce in the dynamic one:
- what I have in the 1st BM column (calculation of a variable according to a number in the datasource)
- what I have in the TESTS column (concatenation of the columns marked with "1")
- what I have in the sum component at the very top
- what I have in the sum components at the bottom.

How can I reproduce all those "calculations" with the crosstab?

Thank you!
Attachments
Data2.xlsx
(79.32 KiB) Downloaded 185 times
excel source dynamic.mrt
goes with data2.xslx
(105.48 KiB) Downloaded 174 times
Data1.xlsx
(15.64 KiB) Downloaded 207 times
excel source.mrt
goes with data1.xslx
(41.94 KiB) Downloaded 172 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: CrossTab with code?

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: CrossTab with code?

Post by Jennypi »

Which part you didn't understand?

Compare both reports I uploaded: Excel source and Dynamic Excel source.
In the Excel one, look at those components:
- text64
- text359
- text128
- text255

I would like to have the same components, with the same calculations, in the Dynamic report. But I don't know how to create them, considering that now the report is a crosstab, not a regular DataBand.

Thank you.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Re: CrossTab with code?

Post by Ivan »

Hello,

In your case the crosstab component does not allow make all necessary requirements for your task.
Please check the modified report in attachment with CrossDataBand components.

Thank you.
Attachments
excel source dynamic modified.mrt
(36.85 KiB) Downloaded 190 times
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: CrossTab with code?

Post by Jennypi »

Wow thank you. It looks like exactly what I need!

I'm converting your example to my usage : my datasources are data from SQL sources.
Now that I have my 2 SQL sources, how can I make the link between the 2 datasources ?
Sans titre.png
Sans titre.png (1.63 KiB) Viewed 1959 times
I tried by creating a new relation, but it doesn't work.
How did you create the "labels" connection, containing the Traits datasource? It looks like an extract of the first source.

Right now, my preview looks like this:
Sans titre2.png
Sans titre2.png (63.15 KiB) Viewed 1959 times
Here is the mrt:
excel source dynamic modified SQL.mrt
(85.88 KiB) Downloaded 191 times
Thanks again for your help!
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Re: CrossTab with code?

Post by Jennypi »

I found the solution! I was missing a related component...

By the way, I highly recommend that you write a documentation about Cross-data. You say that they behave like normal databands, but still, it is quite difficult to understand how to set them up in a report. Some examples would help a lot.

Thank you!
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: CrossTab with code?

Post by Andrew »

Hello,

Thank you for the suggestion. We will definitely look into this more carefully.

Have a nice day!
Post Reply