Report with variable number of images in databand
Report with variable number of images in databand
Hi,
I have a report with a databand that displays some groups, each group can have multiple questions and answers.
So report looks like this:
Group1
Q1 A1
Group2
Q2 A2
This works fine, however is some cases the answer can be an array of base64 images and I would like have the report display these images under the question text.
For example:
Group1
Q1 A1
Group2
Q2
Image1 Image2 Image3
Is this possible?
My JSON looks like this (but can be altered):
{
Groups: [
{
Id: 1,
Name: "Group 1"
},
{
Id: 2,
Name: "Group 2"
}
],
Checks: [
{
GroupId: 1,
QuestionText: "Q1",
Answer: "A1"
},
{
GroupId: 2,
QuestionText: "Q2",
Answer: "A2"
// Could potentially be Answer: [image1, image2, image3 ]
}
]
}
I have a report with a databand that displays some groups, each group can have multiple questions and answers.
So report looks like this:
Group1
Q1 A1
Group2
Q2 A2
This works fine, however is some cases the answer can be an array of base64 images and I would like have the report display these images under the question text.
For example:
Group1
Q1 A1
Group2
Q2
Image1 Image2 Image3
Is this possible?
My JSON looks like this (but can be altered):
{
Groups: [
{
Id: 1,
Name: "Group 1"
},
{
Id: 2,
Name: "Group 2"
}
],
Checks: [
{
GroupId: 1,
QuestionText: "Q1",
Answer: "A1"
},
{
GroupId: 2,
QuestionText: "Q2",
Answer: "A2"
// Could potentially be Answer: [image1, image2, image3 ]
}
]
}
-
- Posts: 7291
- Joined: Tue Mar 20, 2018 5:34 am
Re: Report with variable number of images in databand
Hello,
Unfortunately, in the JS version, it is not possible.
All Image components should be added in the designer before rendering.
Thank you.
Unfortunately, in the JS version, it is not possible.
All Image components should be added in the designer before rendering.
Thank you.
Re: Report with variable number of images in databand
Hi,
Thanks for the reply. I did manage to pass a base64 string into an existing image control from JSON and it did render.
Is the image list something I can do from my Angular component code by calling the Stimulsoft API to add the image components to my report template at runtime?
Thanks for the reply. I did manage to pass a base64 string into an existing image control from JSON and it did render.
Is the image list something I can do from my Angular component code by calling the Stimulsoft API to add the image components to my report template at runtime?
-
- Posts: 7291
- Joined: Tue Mar 20, 2018 5:34 am
Re: Report with variable number of images in databand
Thanks, that's good to know.
I ended up creating a new data source for my images and then creating a relationship to my questions and then passed that data source to a data band.
Thanks again.
I ended up creating a new data source for my images and then creating a relationship to my questions and then passed that data source to a data band.
Thanks again.
-
- Posts: 7291
- Joined: Tue Mar 20, 2018 5:34 am
Re: Report with variable number of images in databand
Hello
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.