Jump to content

PageFooter String caption that shows all the detai


galaxyz

Recommended Posts

Hello everybody as I'm in iReport to $V{LEGENDA} would like the variable expression eg she received:

$V{LEGENDA} = $V{LEGENDA} + $F{codigoDivida}+ " - " +$F{guiasrecolhimento_descricao}+ " | "


For doing the loop it saves all the values and display all the data listed in detail, the $V{LEGENDA} is shown in PageFooter.

 

ie, actually would be the following, if it lists the field detail 0,0,0,1,2,3,3, then it lists the PageFooter 0 - Active; 1 - Idle 2 - Canceled; 3 - Protestee would more or less so, because he is concatenated with another country that is their respective status.

Grateful



Post Edited by galaxyz at 06/28/2010 14:18



Post Edited by galaxyz at 06/28/2010 14:59



Post Edited by galaxyz at 06/28/2010 15:08
Link to comment
Share on other sites

  • Replies 12
  • Created
  • Last Reply

Top Posters In This Topic

Hello friends, what I needed in my report is that the band he DETAIL eg to show the data in the table below:

 

-------------------------------------------------

--------------- detail

 

Sit | Op | Name

0 0 Marcia

0 0 Marta

Pebbles 2 0

3 0 Lins

3 0 Kleber

----------------------

 

 

 

In my PageFooter he should list the data in a column like a legend, if someone could help me thank you, would be more or less like the table below shows PageFooter.

 

-------------------------------------------------

--------------- detail

 

Sit | Op | Name

0 0 Marcia

0 0 Marta

Pebbles 2 0

3 0 Lins

3 0 Kleber

----------------------

 

 

PageFooter ---------

Legend:

0 - Active 2 - OFF 3 - Cancelled

-------------------------------------------------- -

 

 

I created a group for this and it worked but it lists all the 0 for example Sit and list the details and its caption, so I would like to be listed at the end all.

Hope have been clear. Grateful

Link to comment
Share on other sites

Lol, hello, the LEGEND is dynamic come from the bank, where he and a detail of what is listed DETAIL shown that my client information, the rule would be as follows, if I have two clients with status 0 active, my LEGEND that will show in PageFooter have to show me only once, because the problem I have is the following

 

It lists in detail:

0 - Kleber

0 - Maria

1 - Goose

1 - Bill Gather

3 - Sakasaki

 

Then he shows in my PageFooter only the latter being thus:

 

Ledenda:

3 - Debtor

 

The correct that I need would be:

Legend:

0 - Active;

1 - Inactive;

3 - Debtor;

 

If you have a solution thanks, and sorry for not being clear, is that I am Brazilian and I'm still scratching in English. Tks

 

 

Link to comment
Share on other sites

ok... try this:

suppose you have two fields coming from DB with others fields (the fields related to the item of dataset), val1 and val2 where val1 is the key of the legend, val2 is the legend description...

define the first variable (call it   value_collector) , of type string with the expression:
$V{value_collector}+"|"+$F{VAL1}
and default value ""

define the second variable (call it   legend) , of type string with the expression:
($V{value_collector}.lastIndexOf("|"+$F{VAL1})>=0)?$V{legend}:$V{legend}+" "+$F{VAL1}+" - "+$F{VAL2}+";n"
and default value ""

so... you can use the variable legend where you want in the footer

I tried it creating this example-solution and it works fine...

leave us a feedback...!

_________________________________________________

if it works... give me KARMA points please!    : ) 
_________________________________________________

listening: Nine Inch Nails - Complication

 



Post Edited by slow at 07/01/2010 15:42
Link to comment
Share on other sites

 Hello friend yes it worked thank you very much even that was what I wanted, but I'm still having a problem, it lists this:

--------------- Detail

Sit | Op | Name
0 0 Marcia
0 0 Marta
0 0 Elenita
0 0 Raquel
0 0 Marta
0 0 Juliana
January 1 Lucia
3 0 Lins
3 0 Kleber
---------------------

Then he is doing:
0 - Active; 0 - Active; 0 - Active; 0 - Active; 0 - Active; 0 - Active; 1 - Inactive; 3 Détibo

And so I had to do to succeed:
defines the first variable (call it value_collector), of type string with the
Expression: $ (F) codigoDivida the other way was returning null

and
defines the second variable (call it legend), of type string with the expression:
($ V () value_collector. LastIndexOf ("|"+$ codigoDivida F ())> = 0)? $ Legend) (V: $ V (legend) + "" + $ F () codigoDivida + "-" + $ guiasrecolhimento_descricao (F) + "n"

and the final + "n" it should not jump the line?
I wish he restricted to a single code and not repeat as shown. Thanks and I look forward if you know about anything else.

Link to comment
Share on other sites

remember to set the first variable to :

$V{value_collector}+"|"+$F{codigoDivida}
and the initial value to " "

and NOT to $F{codigoDivida}

the final "\n" make a line jump... remove the entire "\n" to avoit it.

 

remember the karma points! :)

Link to comment
Share on other sites

Hello, I do not understand why the variable has value_collector VARIABLE EXPRESSION ($V{value_collector}+"|"+$F{codigoDivida} ? And as I boot up "? On Initial Value Expression? Just put "" Really? Why do that when he returns NULL
Link to comment
Share on other sites

galaxyz
Wrote:

Hello, I do not understand why the variable has value_collector VARIABLE EXPRESSION ($V{value_collector}+"|"+$F{codigoDivida} ? And as I boot up "? On Initial Value Expression? Just put "" Really? Why do that when he returns NULL

can you be more clear in your question?
doesn't it work? Did you follow all the steps that have been shown to you?

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...