If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Text Source Variable (possibly)

Started by urreacp, 18 Jan 2017 04:01:30 PM

Previous topic - Next topic

urreacp

Hello all,

I'm making a patient profile list, one sheet per patient, that has some key information that providers needs on it.  I've been using a series of text items with various tests they may be due for, then creating boolean variable for them.  If they patient needs that test, the text item stays, if they don't, it disappears.

What I want to accomplish for one of them is this: If a patient is >= 20 I want the line of text to say one thing, If a patient is 18-19 I want it to say something else.........basically switching between 2 values depending on the age.  Is this accomplished with a Text Source Variable somehow? 

Any help would be greatly appreciated.

Thanks,
Christian

BigChris

There are two ways that spring immediately to mind. The first is a conditional block, which will work fine, but I find them a bit tricky...especially when you come to update/edit the report later. The method I would use would be to use two blocks, and to use render variables for them.

First of all drag a block into your report and put into it the text that you want for the >=20 patients. Then pull in another block below that and put in the text for 18-19 patients. Then create two boolean variables, the first with a test of [PatientAge]>= 20 and the second with [PatientAge]<20. Call your first one var20 and your second var18. Then go back to your blocks. Click on the first one and in the Properties pane go to the Render Variable. Select var20 and have it render for Yes. For the second block (have you guessed yet :) ) select var18 and select render for Yes.

Lynn

Conditional styles are another approach you can consider. Both text items would be included in the layout and each would have an advanced conditional style set such that the box type would be set to "none" for one or the other depending on the condition.

urreacp

Thanks for the suggestions, guys, I appreciate them.  I know I'm nitpicking on this, but I really want the text to appear in the same place every time, no matter what text displays I would like it to appear in the same place.  Would either of these 2 suggestions accomplish this?

Thanks,
Christian

BigChris

Yes, both of those solutions should put the text in the same place. The block that isn't rendered (in my version) doesn't take up any space on the output, so either block will take up the same space...assuming the same amount of text in the block etc.