jahn120 Posted August 24, 2018 Share Posted August 24, 2018 I have multiple questions on the left side of the page for families. On the right side of the page, I need to print out their answers with Yes or No, by using a Subreport. The answers are recurring by using the same format of the subreport. The column-1 is answers of family-1 that print out vertically. I need to know how to display answers of other family members on column-2, column-3, and column-4 on the right side of the column-1. Link to comment Share on other sites More sharing options...
riodavid Posted August 27, 2018 Share Posted August 27, 2018 Hi Jahn, can you post a scratch screenshot? Link to comment Share on other sites More sharing options...
jahn120 Posted August 27, 2018 Author Share Posted August 27, 2018 Family-1 Have you or anyone in your household had diagnosedwith high blood pressure? No Have you or anyone in your household had diagnosedwith diabetes? No Have you or anyone in your household had diagnosedwith heart disease? No Family-2 Yes No No Family-3 No No No Link to comment Share on other sites More sharing options...
riodavid Posted August 28, 2018 Share Posted August 28, 2018 I'm not sure if it's a good idea to use subreport in this case. But if you can join the question and anwser result sets together, it wil be very easy to display them in a crosstab. Link to comment Share on other sites More sharing options...
jahn120 Posted August 28, 2018 Author Share Posted August 28, 2018 I have 10 questions with 50 words for each one. Also I am updating the existing report. I can use the table or the crosstab if I create a brand new report. I don't want to display questions agan and again for each family member. Would you please let me know if there is a way to put family-2, family-3, family-4, etc. to the right side of family-1? Link to comment Share on other sites More sharing options...
riodavid Posted August 29, 2018 Share Posted August 29, 2018 https://ibb.co/i69yoUNot sure if it is what you want. If it is I will share the jrxml file for your reference. Link to comment Share on other sites More sharing options...
riodavid Posted August 29, 2018 Share Posted August 29, 2018 Sample data:create table test_qa( question varchar(100), answer varchar(3), family varchar(10))insert into test_qa values('Have you or anyone in your household had diagnosed with high blood pressure?','No','Family-1')insert into test_qa values('Have you or anyone in your household had diagnosed with high blood pressure?','Yes','Family-2')insert into test_qa values('Have you or anyone in your household had diagnosed with high blood pressure?','No','Family-3')insert into test_qa values('Have you or anyone in your household had diagnosed with diabetes?','No','Family-1')insert into test_qa values('Have you or anyone in your household had diagnosed with diabetes?','No','Family-2')insert into test_qa values('Have you or anyone in your household had diagnosed with diabetes?','No','Family-3')insert into test_qa values('Have you or anyone in your household had diagnosed with heart disease?','No','Family-1')insert into test_qa values('Have you or anyone in your household had diagnosed with heart disease?','No','Family-2')insert into test_qa values('Have you or anyone in your household had diagnosed with heart disease?','No','Family-3') Link to comment Share on other sites More sharing options...
jahn120 Posted August 30, 2018 Author Share Posted August 30, 2018 Family-1 and other family members use the same fields of the table. There is no way to map them seperately because the field names are same. Link to comment Share on other sites More sharing options...
riodavid Posted August 31, 2018 Share Posted August 31, 2018 In m sample table above, "Family-1", "Family-2", "Family-3" use the same fields [family] of the table [test_qa].Sorry, maybe I didn't understand it correctly? Link to comment Share on other sites More sharing options...
jahn120 Posted August 31, 2018 Author Share Posted August 31, 2018 James Have you or anyone in your household had diagnosedwith high blood pressure? No Have you or anyone in your household had diagnosedwith diabetes? No Have you or anyone in your household had diagnosedwith heart disease? No AnnaHave you or anyone in your household had diagnosedwith high blood pressure? No Have you or anyone in your household had diagnosedwith diabetes? No Have you or anyone in your household had diagnosedwith heart disease? No I need to update the report above to the following format. The values of answers come from the subreport. I can make questions to be static text not to repeat. I am looking for a way to dispay the answers from the subreport horizontally not vertically. James AnnaHave you or anyone in your household had diagnosedwith high blood pressure? No NoHave you or anyone in your household had diagnosedwith diabetes? No NoHave you or anyone in your household had diagnosedwith heart disease? No No Link to comment Share on other sites More sharing options...
riodavid Posted September 2, 2018 Share Posted September 2, 2018 Hi Jahn, have you checked my screenshot in previous comments? I don't see the difference between my screenshot and your result. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now