Flat file data source [message #727260] |
Tue, 20 September 2011 18:31 |
JulioC Missing name 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 #727635 is a reply to message #727585] |
Wed, 21 September 2011 18:01 |
|
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 |
|
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 |
JulioC Missing name Messages: 33 Registered: March 2011 Location: Ottawa, Canada |
Member |
|
|
JulioC wrote on Wed, 21 September 2011 11:14Hi 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
|
|
|
Powered by
FUDForum. Page generated in 0.03159 seconds