Page 1 of 2
Parsing and Merging Columns
Posted: Mon Mar 12, 2012 2:21 am
by anuviswan
Hi
I am working on a Report, in which I have Data as follows.
Table 1 (Please forgive the formatting, its a table )
ID Tag Value
1 Name Anu
1 Age 28
1 Comment "Hello Anu"
Could you please help in creating a report, so that, the data could be parsed and sorted as follows.
Report Table
ID Name Age Comment
1 Anu Age "Hello Anu"
Please guide me.
Thanks n Regards
Anu
Parsing and Merging Columns
Posted: Mon Mar 12, 2012 4:53 am
by Alex K.
Hello,
Please see the sample report in attachment.
Thank you.
Parsing and Merging Columns
Posted: Tue Mar 13, 2012 1:08 am
by anuviswan
Thanks Aleksey, But probably I missed out on little more details.
Not all Rows are converted to Columns. For example,
ID Tag Value
1 Name Anu
1 Age 28
1 Comment "Hello Anu"
1 Comment1 "Test Comment"
1. Comment2 "Test comment"
In this table, Rows with Tag Name as "Comment1" and "Comment2" will not be taken. The final table is supposed to have only following Columns
ID Name Age Comment.
--- -------------------------
1 Anu 28 "Hello comment"
As you can see, I am not using the "Comment1" and "Comment2". Only if the Value is "Age" or "Name" or "Comment" , i would be displaying it in the result Table.
Can you please guide me ?
Regards
Anu
Parsing and Merging Columns
Posted: Wed Mar 14, 2012 2:47 am
by HighAley
Hello.
anuviswan wrote:Thanks Aleksey, But probably I missed out on little more details.
Not all Rows are converted to Columns. For example,
ID Tag Value
1 Name Anu
1 Age 28
1 Comment "Hello Anu"
1 Comment1 "Test Comment"
1. Comment2 "Test comment"
In this table, Rows with Tag Name as "Comment1" and "Comment2" will not be taken. The final table is supposed to have only following Columns
ID Name Age Comment.
--- -------------------------
1 Anu 28 "Hello comment"
As you can see, I am not using the "Comment1" and "Comment2". Only if the Value is "Age" or "Name" or "Comment" , i would be displaying it in the result Table.
Can you please guide me ?
Then you should set the Filters for Cross-Data.
Look at the attached report template.
Thank you.
Parsing and Merging Columns
Posted: Tue Mar 20, 2012 3:54 am
by anuviswan
Thanks Aleksey.
That was pretty useful. I had little more requirements on the same topics which came in, could you please help.
I had to extend my Table contend to include some optional data. For Example, the Comments is optional and hence, User ABC in following table do not have any comments associated with.
ID Tag Value
1 Name Anu
2 Age 28
3 Comments “Hello Anu”
4 Additional Information No.
5 Name ABC
6 Age 24
7 Name DEF
8 Age 28
9 Comments “Hello DEF”
10 Additional Information No.
Also, there is more than one user in the table. So now if i create a table using CrossData, I would get in a situation where the proposed column headers like Name, Age , Comments would be repeated.
ie, the result be something like this.
Name Age Comments
Anu 28 "Hello Anu"
Name Age Comments
ABC 24
Name Age Comments
DEF 28 "Hello def"
Which is not exactly i would require. I would not prefer the Headers to repeat.
Most preferred output for me would be
Name Age Comments
Anu 28 "Hello Anu"
ABC 24
DEF 28 "Hello def"
Can you please guide me ?
Thanks in Advance
Anu
Parsing and Merging Columns
Posted: Tue Mar 20, 2012 5:03 am
by Alex K.
Hello,
Please see the modified sample reports in attachment.
Sample1 with additional Header component.
Sample2 with additional code in AfterPrint event of DataDataSource1 component.
Thank you.
Parsing and Merging Columns
Posted: Wed Mar 21, 2012 1:17 am
by anuviswan
Thanks Aleksey
But I am getting the results in following format when using the templates you had send.
ID Name Age Comment
1 Anu 23"Hello Anu" DEF 26 "Hello DEF" ACD 22 "Hello ACD"
ie, the subsequent values of Name, Age and Comment is appended to the side, instead of as rows below.
Is there anyway in which i could get the subsequent set of values as next rows ? For Example
ID Name Age Comment
1 Anu 23"Hello Anu"
2 DEF 26 "Hello DEF"
3 ACD 22 "Hello ACD"
Regards
Anu
Parsing and Merging Columns
Posted: Wed Mar 21, 2012 7:34 am
by Alex K.
Hello,
1st post:
anuviswan wrote:
ID Tag Value
1 Name Anu
1 Age 28
1 Comment "Hello Anu"
last post:
ID Tag Value
1 Name Anu
2 Age 28
3 Comments “Hello Anu”
4 Additional Information No.
5 Name ABC
6 Age 24
7 Name DEF
8 Age 28
9 Comments “Hello DEF”
10 Additional Information No.
Please clarify about column ID. In first post and last post it is different.
Thank you.
Parsing and Merging Columns
Posted: Wed Mar 21, 2012 7:53 am
by anuviswan
Hi Aleksey
Sorry, My Mistake. Here is the corrected data.
ID Tag Value
1 Name Anu
1 Age 28
1 Comments “Hello Anu”
1 Additional Information No.
2 Name ABC
2 Age 24
2 Name DEF
2 Age 28
2 Comments “Hello DEF”
2 Additional Information No
Thanks in Advance
Anu
Parsing and Merging Columns
Posted: Thu Mar 22, 2012 3:30 am
by Alex K.
Hello,
Please check the report and data in attachment.
Thank you.