Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Flat file data source(Parameters for a column)
Flat file data source [message #727260] Tue, 20 September 2011 18:31 Go to next message
JulioC Missing name is currently offline JulioC Missing nameFriend
Messages: 33
Registered: March 2011
Location: Ottawa, Canada
Member
Hi all

I have a flat file as a data source with this description
year,gross sales,net sales,product

What we want to do to have a parameter that prompts for Start year and End year, I know we have filters, but what we want is a parameter that is entered by the end user.

Birt 3.7


Thanks in advance

[Updated on: Tue, 20 September 2011 18:31]

Report message to a moderator

Re: Flat file data source [message #727585 is a reply to message #727260] Wed, 21 September 2011 15:14 Go to previous messageGo to next message
JulioC Missing name is currently offline JulioC Missing nameFriend
Messages: 33
Registered: March 2011
Location: Ottawa, Canada
Member
Hi all

I got it working, I will post later how I did it, however I ran into a different problem now
I have aggregations columns that are calculated onCreate for each field
totalgross += parseFloat(this.getValue());
totalgross was initialized on initialize of the report
var totalgross=0;

in the aggregation column I have this script on render time
this.setDisplayValue(totalgross);

So everything is working as expected, when I preview the report I see the totals of the aggregation columns, however when I run the report using the viewer it does not print the total of the aggregation columns( it shows 0), even weird , if I run the report directly to a PDF, excel or html I can see the totals.
What is wrong with the viewer?

Again I'm using 3.7

Thanks




Re: Flat file data source [message #727635 is a reply to message #727585] Wed, 21 September 2011 18:01 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Move this:
var totalgross=0;

to beforeFactory. initialize is fired many times in the viewer.

Jason

On 9/21/2011 11:14 AM, JulioC wrote:
> Hi all
>
> I got it working, I will post later how I did it, however I ran into a
> different problem now
> I have aggregations columns that are calculated onCreate for each field
> totalgross += parseFloat(this.getValue()); totalgross was initialized on
> initialize of the report
> var totalgross=0;
>
> in the aggregation column I have this script on render time
> this.setDisplayValue(totalgross);
>
> So everything is working as expected, when I preview the report I see
> the totals of the aggregation columns, however when I run the report
> using the viewer it does not print the total of the aggregation columns(
> it shows 0), even weird , if I run the report directly to a PDF, excel
> or html I can see the totals.
> What is wrong with the viewer?
>
> Again I'm using 3.7
>
> Thanks
>
>
>
>
Re: Flat file data source [message #727648 is a reply to message #727260] Wed, 21 September 2011 18:32 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Put a filter on the data set that references the report parameter.

Jason


On 9/20/2011 2:31 PM, JulioC wrote:
> Hi all
>
> I have a flat file as a data source with this description
> year,gross sales,net sales,product
>
> What we want to do to have a parameter that prompts for Start year and
> End year, I know we have filters, but what we want is a parameter that
> is entered by the end user.
>
> Thanks in advance
>
Re: Flat file data source [message #727661 is a reply to message #727585] Wed, 21 September 2011 19:20 Go to previous message
JulioC Missing name is currently offline JulioC Missing nameFriend
Messages: 33
Registered: March 2011
Location: Ottawa, Canada
Member
JulioC wrote on Wed, 21 September 2011 11:14
Hi all

I got it working, I will post later how I did it, however I ran into a different problem now
I have aggregations columns that are calculated onCreate for each field
totalgross += parseFloat(this.getValue());
totalgross was initialized on initialize of the report
var totalgross=0;

in the aggregation column I have this script on render time
this.setDisplayValue(totalgross);

So everything is working as expected, when I preview the report I see the totals of the aggregation columns, however when I run the report using the viewer it does not print the total of the aggregation columns( it shows 0), even weird , if I run the report directly to a PDF, excel or html I can see the totals.
What is wrong with the viewer?

Again I'm using 3.7

Thanks






Ok, I got it working I just change the calculation fields from onCreate to onRender
now it is working.

Thanks
Previous Topic:ClassNotFoundException: org.eclipse.core.runtime.CoreException
Next Topic:Merging datasets
Goto Forum:
  


Current Time: Thu Apr 25 03:31:30 GMT 2024

Powered by FUDForum. Page generated in 0.02976 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top