Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » problem in binding data source to a table from BIRT library
problem in binding data source to a table from BIRT library [message #899729] Thu, 02 August 2012 02:49 Go to next message
g g is currently offline g g
Messages: 17
Registered: August 2012
Junior Member
My requirement is to standardise look for table elements to be used in report.

To achieve it, I created a table named newTable in library with header, footer and detail rows with pre-defined background colour and font. There is no datasource and data set attached to it.

The next step is to use newTable in report. So I drag it from library into the reports.The table displays the symbol "table + sign of chain". I have defined data source and data set in the report which I want to bind to newTable from library. I added dataset name in "Binding" tab.
When I try to add dataset element to table its not getting displayed; also symbol changes "table + sign of chain + yellow pencil". What is the meaning of this?
Also all the elements (data, crosstab,table) from "Insert" option are also disabled.

Any suggestions to achieve the requirement.


Re: problem in binding data source to a table from BIRT library [message #899842 is a reply to message #899729] Thu, 02 August 2012 10:36 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

The pencil means that you have overridden a property from the library.
To do what you want why not use a style in the library instead of a
table. Open your library, and right click on themes and add a new
theme. Next create a new style to add your background colors and fonts.
You can use a unique name or one of the predefined styles for tables.
Using the predefined is probably the best approach for you need. Save
your lib and publish to resource folder. Next create a new report. In
the resource explorer view drag the them onto the report canvas. If you
used a predefined table style all tables added to the report will
automatically styles as in your theme. If you did not use a predefined
style, just right click on any report item and click on your style in
the apply style menu.

Jason

On 8/2/2012 2:49 AM, g g wrote:
> My requirement is to standardise look for table elements to be used in
> report.
>
> To achieve it, I created a table named newTable in library with header,
> footer and detail rows with pre-defined background colour and font.
> There is no datasource and data set attached to it.
>
> The next step is to use newTable in report. So I drag it from library
> into the reports.The table displays the symbol "table + sign of chain".
> I have defined data source and data set in the report which I want to
> bind to newTable from library. I added dataset name in "Binding" tab.
> When I try to add dataset element to table its not getting displayed;
> also symbol changes "table + sign of chain + yellow pencil". What is the
> meaning of this?
> Also all the elements (data, crosstab,table) from "Insert" option are
> also disabled.
>
> Any suggestions to achieve the requirement.
>
>
Re: problem in binding data source to a table from BIRT library [message #900056 is a reply to message #899842] Fri, 03 August 2012 13:34 Go to previous messageGo to next message
g g is currently offline g g
Messages: 17
Registered: August 2012
Junior Member
Thanks Jason.

I created TableTheme with NewStyle1,NewStyle1 in the library. These styles are available on right click (Style->edit style) of header, footer or detail row of library table. I edited footer and detail row styles. These library tables have 6 column(fixed by design)

Now I created new report with one datasource and dataset. Then dragged table from ResourceExplorer-> Report Item -> table. It appears with cross (x) sign with message "The table "NewTable" must be able to access one dataset.

So I selected dataset in Binding tab. But I am not able to map the columns from dataset to table. Can we bind the dataset to library table from report?

[The concept is to give standard look to required report items - charts, tables, list using library. The developers will then use standard library items and bind required data.
e.g. I have created library with report items as PieChart 2D with slice and line chart 2DDepth. I defined look part for the chart in library. Then I create report and define datasource, dataset in it. I bind chart data using "select data" option of chart. I was trying to repeat the same behaviour for tables as well, but was not successful as I can't bind the data outside library.]

Re: problem in binding data source to a table from BIRT library [message #900094 is a reply to message #900056] Fri, 03 August 2012 17:48 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I am not to fond of how we have this implemented today, but once you add
the table from the library, bind the data set in the binding tab. Next
right click on your data items in the table and select "Change Data
Column" to specify one of your bound data set columns. See attached image.

Jason

On 8/3/2012 1:34 PM, g g wrote:
> Thanks Jason.
>
> I created TableTheme with NewStyle1,NewStyle1 in the library. These
> styles are available on right click (Style->edit style) of header,
> footer or detail row of library table. I edited footer and detail row
> styles. These library tables have 6 column(fixed by design)
>
> Now I created new report with one datasource and dataset. Then dragged
> table from ResourceExplorer-> Report Item -> table. It appears with
> cross (x) sign with message "The table "NewTable" must be able to access
> one dataset.
>
> So I selected dataset in Binding tab. But I am not able to map the
> columns from dataset to table. Can we bind the dataset to library table
> from report?
>
> [The concept is to give standard look to required report items - charts,
> tables, list using library. The developers will then use standard
> library items and bind required data. e.g. I have created library with
> report items as PieChart 2D with slice and line chart 2DDepth. I defined
> look part for the chart in library. Then I create report and define
> datasource, dataset in it. I bind chart data using "select data" option
> of chart. I was trying to repeat the same behaviour for tables as well,
> but was not successful as I can't bind the data outside library.]
>
>
Re: problem in binding data source to a table from BIRT library [message #900150 is a reply to message #900094] Sat, 04 August 2012 13:54 Go to previous messageGo to next message
g g is currently offline g g
Messages: 17
Registered: August 2012
Junior Member
Thanks a lot, Jason!!!
I have checked by adding data element at table cell and its working as per my requirement.

Now I will have to explore more about styles, themes to enrich the library.
Re: problem in binding data source to a table from BIRT library [message #900474 is a reply to message #900150] Tue, 07 August 2012 04:53 Go to previous messageGo to next message
g g is currently offline g g
Messages: 17
Registered: August 2012
Junior Member
Hi,

Earlier I had written about requirement to standardise look for table elements to be used in report using library. As per your suggestion, we are planning to implement it using themes and styles.

We do not have fixed no. of columns for a table.

We also have standard javascripts written for pagination and hide/unhide columns of a table, so plan to put it as a part of in library - table; so that they can be reused in report design of a table.

But size (ie no.of columns) of libary table is fixed, you can't insert columns or delete columns to it; as insert/delete is disabled (see the attachment).

So can we still use library to achieve this requirement? if yes, please suggest how.
else
suggest alterantive approach for reuse of table with scripts.
Re: problem in binding data source to a table from BIRT library [message #900573 is a reply to message #900474] Tue, 07 August 2012 11:25 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Currently that is a limitation on tables in libraries. Tables in
libraries can not have their structure changed in the report. Can you
post your scripts? Maybe there is some other way to achieve what you want.

Jason

On 8/7/2012 4:53 AM, g g wrote:
> Hi,
>
> Earlier I had written about requirement to standardise look for table elements to be used in report using library. As per your suggestion, we are planning to implement it using themes and styles.
>
> We do not have fixed no. of columns for a table.
>
> We also have standard javascripts written for pagination and hide/unhide columns of a table, so plan to put it as a part of in library - table; so that they can be reused in report design of a table.
>
> But size (ie no.of columns) of libary table is fixed, you can't insert columns or delete columns to it; as insert/delete is disabled (see the attachment).
>
> So can we still use library to achieve this requirement? if yes, please suggest how.
> else
> suggest alterantive approach for reuse of table with scripts.
>
Re: problem in binding data source to a table from BIRT library [message #900601 is a reply to message #900573] Tue, 07 August 2012 13:17 Go to previous messageGo to next message
g g is currently offline g g
Messages: 17
Registered: August 2012
Junior Member
Hi Jason,
Attaching the script to hide the column.

As requirement posted earlier, the reqmt is to attach the script at library table so that hide/unhide of selected col is available at selection of column and checkbox by formation of URL.

attaching .rptdesign file to u as xml.

[Updated on: Tue, 07 August 2012 13:36]

Report message to a moderator

Re: problem in binding data source to a table from BIRT library [message #900697 is a reply to message #900601] Wed, 08 August 2012 04:19 Go to previous messageGo to next message
g g is currently offline g g
Messages: 17
Registered: August 2012
Junior Member
Hi Jason,
Please refer to this script file instead of previous file.

[Updated on: Wed, 08 August 2012 04:22]

Report message to a moderator

Re: problem in binding data source to a table from BIRT library [message #900815 is a reply to message #900601] Wed, 08 August 2012 11:14 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I looked the scripts over and I really do not see an easy way to do
this. You could put the scripts in an external file and cut down the
number of scripts lines that have to be used as described here:
http://birtworld.blogspot.com/2012/07/using-global-js-function-across-birt.html
but there would still have to be at least one line in the script.
Another option is to each create various table column sizes in the
library or put a table with the scripts in a template. If you use a
template it will not reference a library and global changes are harder.

I do have a couple of questions though. If you are using script to
change the location of the rptdocument why not just specify the document
in the url using &__document=nameofyourdocument.rptdocument.
Also the script you use for visibility could be called directly from the
visibility expression builder as well.

Jason

On 8/7/2012 1:17 PM, g g wrote:
> Hi Jason,
> Attaching the script to hide the column.
>
> As requirement posted earlier, the reqmt is to attach the script at library table so that hide/unhide of selected col is available at selection of column and checkbox by formation of URL.
>
>
Re: problem in binding data source to a table from BIRT library [message #901107 is a reply to message #899729] Thu, 09 August 2012 15:59 Go to previous messageGo to next message
g g is currently offline g g
Messages: 17
Registered: August 2012
Junior Member
Hi Jason,
Thanks. I was also thinking of implementing tables of various column sizes in library to cater to requirement as of now.

I was not able to completely chk the .js for chart and table functions.

I will also use .rptdocument as per your suggestion "specify the document
in the url using &__document=nameofyourdocument.rptdocument."

But regarding visibility expression builder, I could not use it as I need to show 'selected columns' for hide in dropdown and remaining columns in the table. This will help user to get the hidden columns back to table after selection.
I did not use it as I was not able to form url of the form "......@hideColumnName=colName1,colName2&columnVisibility=on" using it.
Re: problem in binding data source to a table from BIRT library [message #901125 is a reply to message #901107] Thu, 09 August 2012 17:26 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Ok. I am also attaching some other examples that show parameter based
column reports.

Jason

On 8/9/2012 3:59 PM, g g wrote:
> Hi Jason,
> Thanks. I was also thinking of implementing tables of various column
> sizes in library to cater to requirement as of now.
>
> I was not able to completely chk the .js for chart and table functions.
>
> I will also use .rptdocument as per your suggestion "specify the
> document in the url using &__document=nameofyourdocument.rptdocument."
>
> But regarding visibility expression builder, I could not use it as I
> need to show 'selected columns' for hide in dropdown and remaining
> columns in the table. This will help user to get the hidden columns back
> to table after selection. I did not use it as I was not able to form url
> of the form
> "mailto:......@hideColumnName=colName1,colName2&columnVisibility=on"
> using it.
>
Re: problem in binding data source to a table from BIRT library [message #905952 is a reply to message #901125] Fri, 31 August 2012 07:06 Go to previous messageGo to next message
g g is currently offline g g
Messages: 17
Registered: August 2012
Junior Member
Hi Jason,

I started working on table library by putting table of vaious sizes (ie no. of columns) in it.
Also I have tested __document part u have mentioned and its working for our requirement.

If I have to create tables of choice for either 1/2/3 headers, then I have observed that since grouped column inputs are mandatory, I have to create 3 separate tables with no. of headers as 1/2/3 headers and 4th table for group of users who do not require the headers at all.
So I have to create 4 tables for a given table size in library. Is their any other way to achieve this requirement in library?

Also if I create 3 tables say with size 10,20,30 columns in library (each with have 1-header/2-header/3-header/no-header version).
If I use column-10 table with 2 headers to create the report with 7 columns , I face following 2 problems.
1. Once I do data binding for a column, I can change the binding; but can't delete it.
2. If I hide the column instead as I do not have permission to delete it, it still gives "value expression" errors for columns not used/hidden and report works fine.

Is there any way, by which I can atleast I can delete binding to the library-table once its done?

Is it correct to use the library table of 10 columns when table of 7 columns is required in report and .rptdesign gives errors for "value expression"?


Re: problem in binding data source to a table from BIRT library [message #906121 is a reply to message #905952] Fri, 31 August 2012 12:50 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I am not certain what you mean by this:

> If I have to create tables of choice for either 1/2/3 headers, then I
> have observed that since grouped column inputs are mandatory, I have to
> create 3 separate tables with no. of headers as 1/2/3

I do know of a way to delete the bindings. If you can change them why
not just put in something like "" for the expression?

Jason



On 8/31/2012 7:06 AM, g g wrote:
> Hi Jason,
>
> I started working on table library by putting table of vaious sizes (ie
> no. of columns) in it.
> Also I have tested __document part u have mentioned and its working for
> our requirement.
>
> If I have to create tables of choice for either 1/2/3 headers, then I
> have observed that since grouped column inputs are mandatory, I have to
> create 3 separate tables with no. of headers as 1/2/3 headers and 4th
> table for group of users who do not require the headers at all. So I
> have to create 4 tables for a given table size in library. Is their any
> other way to achieve this requirement in library?
>
> Also if I create 3 tables say with size 10,20,30 columns in library
> (each with have 1-header/2-header/3-header/no-header version). If I use
> column-10 table with 2 headers to create the report with 7 columns , I
> face following 2 problems.
> 1. Once I do data binding for a column, I can change the binding; but
> can't delete it.
> 2. If I hide the column instead as I do not have permission to delete
> it, it still gives "value expression" errors for columns not used/hidden
> and report works fine.
>
> Is there any way, by which I can atleast I can delete binding to the
> library-table once its done?
>
> Is it correct to use the library table of 10 columns when table of 7
> columns is required in report and .rptdesign gives errors for "value
> expression"?
>
>
>
Re: problem in binding data source to a table from BIRT library [message #906271 is a reply to message #906121] Fri, 31 August 2012 21:33 Go to previous messageGo to next message
g g is currently offline g g
Messages: 17
Registered: August 2012
Junior Member
Hi,
Sorry for the confusion.

What I meant by
> If I have to create tables of choice for either 1/2/3 headers, then I
> have observed that since grouped column inputs are mandatory, I have to
> create 3 separate tables with no. of headers as 1/2/3

is
If I want to create table of 10 columns, I have to create 4 tables in library as follows:
table with 10 columns, no header - no footer (plain table)
table with 10 columns, one group header - one group footer
table with 10 columns, two group headers - two group footers
table with 10 columns, three group headers - three group footers

Then users can use the table as per their requirement of no. of headers.

Since I have to create tables of 3-4 different column sizes and for each column size I have to create 4 tables in library (the mentioned above plain + 3 with various no. of group headers ), it will increase no. of tables in library 4-times. so is their any way to achieve this requirement differently?

Re: problem in binding data source to a table from BIRT library [message #908002 is a reply to message #906271] Tue, 04 September 2012 10:32 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

I do not know of a better way. The only thing I can think of is to use
the de api in script to add columns, but this can not be done to a table
from a library unless you modify the library too.

Jason

On 8/31/2012 9:33 PM, g g wrote:
> Hi, Sorry for the confusion.
>
> What I meant by
>> If I have to create tables of choice for either 1/2/3 headers, then I
> > have observed that since grouped column inputs are mandatory, I have to
> > create 3 separate tables with no. of headers as 1/2/3
> is If I want to create table of 10 columns, I have to create 4 tables in
> library as follows:
> table with 10 columns, no header - no footer (plain table)
> table with 10 columns, one group header - one group footer table with 10
> columns, two group headers - two group footers table with 10 columns,
> three group headers - three group footers
> Then users can use the table as per their requirement of no. of headers.
>
> Since I have to create tables of 3-4 different column sizes and for each
> column size I have to create 4 tables in library (the mentioned above
> plain + 3 with various no. of group headers ), it will increase no. of
> tables in library 4-times. so is their any way to achieve this
> requirement differently?
>
>
Previous Topic:[delete me]
Next Topic:Calculates with 2 Data Sets
Goto Forum:
  


Current Time: Fri Aug 01 11:56:05 EDT 2014

Powered by FUDForum. Page generated in 0.08212 seconds