Page 1 of 1

CrossTab with code?

Posted: Wed Jun 17, 2015 2:10 pm
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!

Re: CrossTab with code?

Posted: Thu Jun 18, 2015 7:48 am
by Alex K.
Hello,

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

Thank you.

Re: CrossTab with code?

Posted: Thu Jun 18, 2015 8:04 am
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.

Re: CrossTab with code?

Posted: Fri Jun 19, 2015 12:29 pm
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.

Re: CrossTab with code?

Posted: Mon Jun 22, 2015 10:08 am
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 1962 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 1962 times
Here is the mrt:
excel source dynamic modified SQL.mrt
(85.88 KiB) Downloaded 191 times
Thanks again for your help!

Re: CrossTab with code?

Posted: Mon Jun 22, 2015 10:33 am
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!

Re: CrossTab with code?

Posted: Mon Jun 22, 2015 12:43 pm
by Andrew
Hello,

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

Have a nice day!