Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
specify the number of rows of a table
meimei
Hi:
now i want to specify the number of rows of a table with a settled number,
then when my row's number of sql result less than the settled number , i want the more line display as blank.
and anybody can help me?
Find more posts tagged with
Comments
mwilliams
Hi meimei,
You want to display row numbers for these "blank" rows though? Will your table ever go over this "settled number" of rows?
meimei
hi Michael:
there is a table and i want to fill it with my dataset ,and if my row's number of sql result less than the number of rows of the table ,i want the table's rows display as blank still
if it is possible?
mwilliams
meimei,
You might be able to handle this problem by having a second dataset that just counts up to the number of lines that you'd like to have and then creating a joint dataSet with your two dataSets with a join on the count column you will have created in both dataSets. Then use that new dataSet for the table in your report. I have not tested this. You'll have to let me know if it works or if I've not explained good enough.
Hope this helps.
marv_
Hi
I have faced the same problem. I have to got 15 rows per page in a table. Solution is quite simple. You can add some rows to the footer and set the visibility off if Your row._rownum is greater then amout of rows You want to show.
I have add 15 and each one is hiding on different condition ex:
row.__rownum+1>14
row.__rownum+1>13
row.__rownum+1>14
and so on.
Or if You have more pages:
(row.__rownum+1)%15>14
% - modulo isn't on the list of functions in expression builder but works.
marv_
santhosh.g
How to create dataset in report scripting
mwilliams
Hi santhosh.g,
Are you asking about the topic in this thread? Or are you just wanting to know how to make a scripted dataSet?
santhosh.g
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73595" data-time="1298049130" data-date="18 February 2011 - 10:12 AM"><p>
Hi santhosh.g,<br />
<br />
Are you asking about the topic in this thread? Or are you just wanting to know how to make a scripted dataSet?<br /></p></blockquote>
<br />
Not scripted dataSet. how to get the size of dataset in report scripting.......
mwilliams
You could initialize a variable to 0 in your initialize script and then increment the variable in your onFetch script of your dataSet, then you'd increment the variable once for each row and your variable would contain the total number of rows.
santhosh.g
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="73681" data-time="1298388654" data-date="22 February 2011 - 08:30 AM"><p>
You could initialize a variable to 0 in your initialize script and then increment the variable in your onFetch script of your dataSet, then you'd increment the variable once for each row and your variable would contain the total number of rows.<br /></p></blockquote>
<br />
ok. but whether i wil be able to get total no of rows in initialize script and also is there any way to create one template for all reports means constructing report with the output of the dataset.
santhosh.g
i would like to create column list dynamically using the dataset...... i wonder if u could help me to achieve it using BIRT API.
columnHint = dataSet.getPropertyHandle(IDataSetModel.COLUMN_HINTS_PROP);
ch = StructureFactory.createColumnHint();
ch.setProperty("columnName", "Basic");
columnHint.addItem(ch);
//
Result Set
resultSet = dataSet.getPropertyHandle(IDataSetModel.RESULT_SET_PROP);
rs = StructureFactory.createResultSetColumn();
rs.setColumnName("Basic");
rs.setPosition(1);
rs.setDataType("string");
//resultSet.addItem(rs);
cachedMetaData = StructureFactory.createCachedMetaData();
dataSet.setCachedMetaData(cachedMetaData);
am using this code. but am not able to get dataset to construct column list dynamically.
santhosh.g
hi williams. ur help would be much apperiaciated. awaiting for ur response..........
mwilliams
Not sure I'm understanding your question about getting the total rows in the initialize script. You just need to set your variable you're going to use to check the number of rows to 0 in the initialize script. Then increment the variable in the onFetch of your dataSet. If it's still 0, the dataSet didn't return any results and you can now use this variable in your visibility statments.