Hi guys,
I have the following datatable where question/answer records grouped by group name and might have the optional multiple photos.
Group Question Answer Photo PhotoIndex
G1 Q1 A1 photo1.jpg 1
G1 Q1 A1 photo2.jpg 2
G1 Q1 A1 photo3.jpg 3
G1 Q2 A2
G2 Q3 A3 photo4.jpg 1
I would like to display the report where each question/answer record also shows the corresponding images just below it using cross-down approach (let's say 2 images per line):
G1
-----------------------------------
Q1 A1
-----------------------------------
photo1.jpg photo2.jpg
photo3.jpg
-----------------------------------
Q2 A2
-----------------------------------
G2
-----------------------------------
Q3 A3
-----------------------------------
photo4.jpg
-----------------------------------
My approach was to use the List with two textboxes for question/answer and then placing the second List with the picturebox just below the question/answer textboxes. The first list was grouped by Fields.Group while for the picturebox list I was creating the row group with expression "Fields.PhotoIndex/2" and the column group "Fields.PhotoIndex%2" (following this post ).
But the photos always displayed vertically.
Any suggestions on how to achieve this layout, especially related to the images. There might be several images per question / answer record in my report, while some questions might have none.
Thanks,
Sergey.
I have the following datatable where question/answer records grouped by group name and might have the optional multiple photos.
Group Question Answer Photo PhotoIndex
G1 Q1 A1 photo1.jpg 1
G1 Q1 A1 photo2.jpg 2
G1 Q1 A1 photo3.jpg 3
G1 Q2 A2
G2 Q3 A3 photo4.jpg 1
I would like to display the report where each question/answer record also shows the corresponding images just below it using cross-down approach (let's say 2 images per line):
G1
-----------------------------------
Q1 A1
-----------------------------------
photo1.jpg photo2.jpg
photo3.jpg
-----------------------------------
Q2 A2
-----------------------------------
G2
-----------------------------------
Q3 A3
-----------------------------------
photo4.jpg
-----------------------------------
My approach was to use the List with two textboxes for question/answer and then placing the second List with the picturebox just below the question/answer textboxes. The first list was grouped by Fields.Group while for the picturebox list I was creating the row group with expression "Fields.PhotoIndex/2" and the column group "Fields.PhotoIndex%2" (following this post ).
But the photos always displayed vertically.
Any suggestions on how to achieve this layout, especially related to the images. There might be several images per question / answer record in my report, while some questions might have none.
Thanks,
Sergey.
8 Answers, 1 is accepted
0
Hi,
The approach you have used seems correct. The same approach is suggested in the How to: Create Multi-Column Report - Across the Page and Then Down KB article. Additionally you can review the ReportCatalog demo that came with your Telerik Reporting installation. Still we are not sure what is wrong on your side. Thus if you need additional assistance we will need a report that illustrates the unexpected behavior to review on our end.
Regards,
Peter
Telerik
The approach you have used seems correct. The same approach is suggested in the How to: Create Multi-Column Report - Across the Page and Then Down KB article. Additionally you can review the ReportCatalog demo that came with your Telerik Reporting installation. Still we are not sure what is wrong on your side. Thus if you need additional assistance we will need a report that illustrates the unexpected behavior to review on our end.
Regards,
Peter
Telerik
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.
0
Sergey
Top achievements
Rank 1
answered on 18 Mar 2014, 08:22 PM
Hi Peter,
Thanks for the link to the article, which helped me correctly set the static column groupings.
My images are displaying ok now.
But I have another problem.
The question / answer grouping doesn't display all records for the group (see the attached screenshot).
I have created the row grouping with expression "Fields.Group". What am I doing wrong?
I will try to attach the source code as jpg (rename to SampleReport.zip).
Thanks for your help,
Sergey
Thanks for the link to the article, which helped me correctly set the static column groupings.
My images are displaying ok now.
But I have another problem.
The question / answer grouping doesn't display all records for the group (see the attached screenshot).
I have created the row grouping with expression "Fields.Group". What am I doing wrong?
I will try to attach the source code as jpg (rename to SampleReport.zip).
Thanks for your help,
Sergey
0
Hello Sergey,
For the required report layout our recommendation is to use report groups as shown in the attached sample. Give it a try and let us know if you have any additional questions.
Regards,
Peter
Telerik
For the required report layout our recommendation is to use report groups as shown in the attached sample. Give it a try and let us know if you have any additional questions.
Regards,
Peter
Telerik
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.
0
Sergey
Top achievements
Rank 1
answered on 19 Mar 2014, 08:23 PM
Hi Peter,
That's what I need. Cool! Thanks for correction.
One more thing to accomplish.
In case the Question/Answer record has no images there is a white space gap left in place of the picturebox.
How can I remove it?
I guess I need to set the picturebox's height to 0 (or it's parent container?) if there is no image.
What's the right way?
Thanks,
Sergey.
That's what I need. Cool! Thanks for correction.
One more thing to accomplish.
In case the Question/Answer record has no images there is a white space gap left in place of the picturebox.
How can I remove it?
I guess I need to set the picturebox's height to 0 (or it's parent container?) if there is no image.
What's the right way?
Thanks,
Sergey.
0
Hi Sergey,
In order to handle to collapse the container you have to add two Bindings. First to the List item:
and another to the List item container - groupHeaderSection1
For more information see: Collapse the container when hiding child report items KB article.
Regards,
Peter
Telerik
In order to handle to collapse the container you have to add two Bindings. First to the List item:
Property path | Expression |
Visible | =Fields.Photo is not null |
and another to the List item container - groupHeaderSection1
Property path | Expression |
Height | ="0cm" |
For more information see: Collapse the container when hiding child report items KB article.
Regards,
Peter
Telerik
Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.
0
Sergey
Top achievements
Rank 1
answered on 20 Mar 2014, 07:04 PM
Hi Peter,
That works perfectly!
Thanks for your help,
Sergey.
That works perfectly!
Thanks for your help,
Sergey.
0
Software
Top achievements
Rank 1
answered on 21 Dec 2017, 12:05 AM
Following the same Post, is it necessary to have MyDataIndex field in Serial.? Because I have data that is not coming in serially..
0
Hi,
The approach for creating multi column layout where the data flows horizontally requires a data field that holds the index of the row to be present in the data source. This index needs to be used in grouping expressions for the List item so the required number of columns could be generated.
Regards,
Katia
Progress Telerik
The approach for creating multi column layout where the data flows horizontally requires a data field that holds the index of the row to be present in the data source. This index needs to be used in grouping expressions for the List item so the required number of columns could be generated.
Regards,
Katia
Progress 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