COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: mohsin2010 on 20 Jan 2011 04:36:48 AM

Title: PopUp To Show The Details Using HTML Item !
Post by: mohsin2010 on 20 Jan 2011 04:36:48 AM
Hi,

i have used HTML item to show the Description of the Employee actually i have giving both Functionality that is

a) To show the detail of the Employee using Drill Through asyou told me,
b) The another one is to Pop Up the description of the employee using HTML item that is use Report Expression as ('<span title="' +[Query1].[EMAIL]+ ''+[Query1].[PHONE_NUMBER]+'">') as shown in the attachment.
         my question is that how do i put the name for example my pop up shows the Email and Phone No of the Employee "SKING515.256.845" like this how do i make it to show "EMAIL:SKING PHONE NO"515.265.238"  ???  and when i add the hiring date in this pop up then it gave error that data format not supported

(CRX-API-0003

      A data type error ocurred at or near the position '64' in expression: ''<span title="' +[Query1].[EMAIL]+ ''+[Query1].[PHONE_NUMBER]+''+[Query1].[HIRE_DATE]+'">' '. The operand types ('string (varchar),timestamp2') for operator 'Add (+)' are not compatible. )

Best Regards,
Mohsin
           
Title: Re: PopUp To Show The Details Using HTML Item !
Post by: melee on 20 Jan 2011 09:55:55 AM
It looks like your concatenation is incorrect, which is why it is getting all confused.

First of all, try this as a data item:

'<span>' || [Query1].[EMAIL] || '</span>'


I use pipes instead of +'s, it's a personal preference. If you can verify that this works, then add your second data item by doing so:


'<span>' || [Query1].[EMAIL] || [Query1].[PHONE_NUMBER] || '</span>'


Notice there's no quotes around the data items. That's how it needs to be in order to function. Try that and let me know how it goes.
Title: Re: PopUp To Show The Details Using HTML Item !
Post by: mohsin2010 on 23 Jan 2011 10:42:24 PM
Melee,


it was giving me Error ("CRX-YXX-4010

      A parsing error was found at or near the position 9 in the expression "'<span>' || [Query1].[EMAIL] || '</span>' ".


")

any way that i can put "EMAIL" before email address and "Phone Number" before Phone NUmber ???

Best Regards,
Mohsin
Title: Re: PopUp To Show The Details Using HTML Item !
Post by: PRIT AMRIT on 24 Jan 2011 01:04:32 AM
can u send me the current expression/script which gives you the result "SKING515.256.845"?
Title: Re: PopUp To Show The Details Using HTML Item !
Post by: mikewalker on 24 Jan 2011 03:54:41 AM
You might try creating separate HTML item elements for each part of your expression.

For data items, change the Source Type property of the HTML item to "Data Item Value".

For example,

- HTML item with Source Type "Text" containing "<span>"
- another HTML item with Source Type "Data Item Value" and [Query1].[EMAIL]
- ...further HTML items containing any other data items required
- then finally a HTML item containing "</span>"

Title: Re: PopUp To Show The Details Using HTML Item !
Post by: mohsin2010 on 25 Jan 2011 10:22:35 PM
HI,

Quote from: PRIT on 24 Jan 2011 01:04:32 AM
can u send me the current expression/script which gives you the result "SKING515.256.845"?

i have mentioned in my first post about the Script ac shown in the point in (b) part with in simple bracket.

Thanks,
Mohsin

Title: Re: PopUp To Show The Details Using HTML Item !
Post by: mohsin2010 on 25 Jan 2011 10:25:17 PM
Quote from: biz_intel on 24 Jan 2011 03:54:41 AM
You might try creating separate HTML item elements for each part of your expression.

For data items, change the Source Type property of the HTML item to "Data Item Value".

For example,

- HTML item with Source Type "Text" containing "<span>"
- another HTML item with Source Type "Data Item Value" and [Query1].[EMAIL]
- ...further HTML items containing any other data items required
- then finally a HTML item containing "</span>"



Thanks biz_intel for your suggestions i haven't applied this technique i will do that and let you know

best Regards,
Mohsin   
Title: Re: PopUp To Show The Details Using HTML Item !
Post by: mohsin2010 on 25 Jan 2011 11:33:52 PM
biz_intel,

    this technique is not working .. . is there some alternate ???
          by doing this technique "email" and "Phone no" is attach to the Detail column and  nothing is pop up :(

Regards
Title: Re: PopUp To Show The Details Using HTML Item !
Post by: mohsin2010 on 26 Jan 2011 01:16:33 AM
Hi,

   Finally i have solved this problem by using the Script as shown below,

('<span title= Email:'+[Query1].[EMAIL]+'_PhoneNo:'+[Query1].[PHONE_NUMBER]+'>')

Regards,
Mohsin
Title: Re: PopUp To Show The Details Using HTML Item !
Post by: melee on 26 Jan 2011 09:49:29 AM
Quote from: mohsin2010 on 26 Jan 2011 01:16:33 AM
Hi,

   Finally i have solved this problem by using the Script as shown below,

('<span title= Email:'+[Query1].[EMAIL]+'_PhoneNo:'+[Query1].[PHONE_NUMBER]+'>')

Regards,
Mohsin

Mohsin,

That was my next suggestion! I'm not sure where, but at some point IBM changed concatenation from + to || :)
Title: Re: PopUp To Show The Details Using HTML Item !
Post by: mohsin2010 on 27 Jan 2011 03:23:23 AM
Quote from: melee on 26 Jan 2011 09:49:29 AM
Mohsin,

That was my next suggestion! I'm not sure where, but at some point IBM changed concatenation from + to || :)

melee,

   humm.. . i will see that hopes it willl help me in future well thanks for acknowledge me :)

Regards,
Mohsin