Page 1 of 2

Want to display display columns horizontally in Stimulsoft report

Posted: Wed May 13, 2020 3:39 am
by anshulmehta
Hi Team

I have a record set which has 2 columns "Questions" and "Answer".

I want to display the values in these columns horizontally in a table ,we are using stimulsoft 2013.

I did create a databand and inserted a text within it and then updated Databand to have 10 columns .

It does work but looks messy ,please help me

Re: Want to display display columns horizontally in Stimulsoft report

Posted: Wed May 13, 2020 1:40 pm
by Lech Kulikowski
Hello,

In that case, you can use the Cross-Data component.

Thank you.

Re: Want to display display columns horizontally in Stimulsoft report

Posted: Fri May 15, 2020 1:23 am
by anshulmehta
Lech Kulikowski wrote: Wed May 13, 2020 1:40 pm Hello,

In that case, you can use the Cross-Data component.

Thank you.
Hi

I tried using the cross band but was not able to create the one as desired.

I am trying to create a pivot query so that I can convert my columns to rows but can not display the pivoted columns .

I am attaching the screenshot of what I desire and also the result set.

I can share the mrt file as well if required.

Kindly help me new in using stimulsoft.

Re: Want to display display columns horizontally in Stimulsoft report

Posted: Sun May 17, 2020 11:26 pm
by anshulmehta
Is there no solution available in stimulsoft 2013.1 version for the issue I have raised

Re: Want to display display columns horizontally in Stimulsoft report

Posted: Mon May 18, 2020 7:52 pm
by Lech Kulikowski
Hello,

You can add an additional column for grouping.

Thank you.

Re: Want to display display columns horizontally in Stimulsoft report

Posted: Tue May 19, 2020 4:14 am
by anshulmehta
Hi Lech

Thanks for the reply.

I am confused here.

I am not able to understand what is DataSource1 in the mrt file you have provided.
I have attached screenshot.
We have QuestionnaireHeader which contains columns Header and DisplayOrder and this is used to display the colums header.
and we have QuestionnaireSubforms which has Header,Answer,DisplayOrder,RenderAsTable,SubFormTable. which has the data.


SubFormTable is basically the "id " you have referenced.

I am attaching the reference mrt sheet also.Kindy have a look

Re: Want to display display columns horizontally in Stimulsoft report

Posted: Tue May 19, 2020 7:38 am
by anshulmehta
Hello

Also this is the query I am using to fetch Header

SELECT distinct Question,DisplayOrder
FROM table1
WHERE HeaderId = 66332
AND Ignore = 0
AND Visible = 1
AND RenderAsTable = 1
order by DisplayOrder

This is query I am fetching to get the answers

SELECT Question,
ISNULL(ModifiedAnswer, Answer) AS Answer,
RenderAsTable,
DisplayOrder,
SubFormTable
FROM table1
WHERE HeaderId = 66332
AND Ignore = 0
AND Visible = 1
AND RenderAsTable = 1

I am using the header result set to display in the Header band and using answer result set to display in the cross data band below.

Please suggest where I am missing the link between the two.

Re: Want to display display columns horizontally in Stimulsoft report

Posted: Tue May 19, 2020 2:00 pm
by Lech Kulikowski
Hello,

Please check the sample from previous post gain.
On the DataBand is used grouped data source by id (DataSource1) - which contains only grouped id - in test data it is 1 and 2
And the main data source with Question and Answer data are placed as Cross-Data on that databand.

Thank you.

Re: Want to display display columns horizontally in Stimulsoft report

Posted: Wed May 20, 2020 1:16 am
by anshulmehta
Hi Lech

Thanks for the reply ,I was able to achieve the desired result .

But the only concern I have now is if in one subformTable I mark one question as "Invisible" and in other I do not ,data is not displayed correctly.

I am attaching the sample data for reference and the sample image as well for reference and also the columns border are empty for blank values

How can I resolve this ?

Regards

Re: Want to display display columns horizontally in Stimulsoft report

Posted: Wed May 20, 2020 6:48 am
by priyateke
Thank you for this updates.Great Job :)