SSRS Tablix Row Number into different Tablix - ssrs-2008

I've got an SSRS report with two tables. In the first table, I've got a row number column, that is calculated based on the RunnningValue for the CountDistinct on the tablix.
What I need, is a row number column in the second table, that begins with the next number after the last number in the first table. So, if table 1 has 15 rows, table 2 should begin at 16. I figure i can do another RunningValue + the max value from the other table, but no idea how to get that Max number into the second table. Is this even possible?

I think I got it. I did a CountDistinct on the field the other table was grouped on, and that gave me the correct number.

Related

how to multiply variable to each element of a column in database

I am trying to add a column to a collection by multiplying the 0.9 to existing database column recycling. but I get a run time error.
I tried to multiply 0.9 direction in the function but it is showing error, so I created the class and multiplied it there yet no use. what could be the problem?
Your error message is telling you what the problem is: your database query is using GROUP BY in an invalid way.
It doesn't make sense to group by one column and then select other columns (you've selected all columns in your case); what values would they contain, since you haven't grouped by them as well (and get one row returned per group)? You either have to group by all the columns you're selecting for, and/or use aggregates such as SUM for the non-grouped columns.
Perhaps you meant to ORDER BY that column (orderBy(dt.recycling.asc()) if ascending order in QueryDSL format), or to select all rows with a particular value of that column (where(dt.recycling.eq(55)) for example)?

How to implement a conditional fomula in Crystal Report

I have a table named tblRecovery with 4 column. ID, LStatus, Amount and RecoveredBy I created a formula to sum Amount Column where LStatus Column value is "WCL". I use following code.
It sum all value of Amount column without condition. I want to sum amount column if Lstatus Column value is "WCL". How can I do that?
if {tblRecovery.LStatus}='WCL' then sum({tblRecovery.Amount})
Crystal Reports formulas work on a per-record basis.
Your current formula shows the sum of tblRecovery.Amount on every single row where LStatus='WCL'.
To get the desired result, create a formula-field with following formula and the create a sum of it:
if {tblRecovery.LStatus}='WCL' then
{tblRecovery.Amount}
else
0

How to set Fixed Rows of Tablix in SSRS

How to do the tablix fix rows? I need to fix the report to maximum 5 rows, if record more than 5 rows will not show . If records is only 3 record, first,second & third rows will place the data and 4 & 5 rows will leave it blank.
Ideally you should achieve it in SQL query or stored proc.
However if you want to achieve it in RDL then you have to use RowNumber function in expression.Create a Row group and then restrict data set.Use expression =CEILING(RowNumber(Nothing)/5)
Please have a look at below link for your reference.
http://www.sqlchick.com/entries/2010/9/11/displaying-fixed-number-of-rows-per-ssrs-report-page.html

2 Table Rows per 1 Database Table Row

I'm working on a table in iReport designer where I pull in info from a database. As of right now, I have it so that one row of the table corresponds to one row in the database.
How can I make it so that one entry in the database can take up two rows. The first row would have 4 columns corresponding to a field in the database. The second row would have 1 column the same length as the 4 above columns combined and also correspond to one field. When editing an iReport designer table, there doesn't seem to be an option to add more rows, only columns.
I found a much easier workaround. I created a one column table, then dragged and dropped static text and fields in certain spots to make the report look like it had multiple columns.

Jasper-report: Crosstab

I am creating a report in iReport-jasper-reports.
How to create a line numbering in crosstab?
Thanks.
Add field COUNT in query.
Or Count column in Jasper report.
I think that it's possible that there is an alternate, however I managed to do this only with the approach that I want to describe in this short article.
Crosstabs have a variable called ROW_COUNT
Two aspects to note:
The variable counts logical crosstab rows and not layout rows. That
is, if the crosstab has columns that exceed the element width and
rows break into several chunks, you will see the same row number for
the layout rows that make up a single logical row.
Total rows are not counted, only detail rows.
Please looked into following article for more details
https://community.jaspersoft.com/wiki/how-introduce-row-numbers-cross-tab