how to limit number of rows and columns in a page - ssrs-2008

I have used matrix to display data. Now i want to limit the number of rows and columns display in a page. I have tried Ceiling(Fields!RowNumber(Nothing)/20) but then only one column will be displayed with 20 rows. I want 5 columns and 10 rows in each page.

I had a similiar problem and finally found the answer(s) here:
http://blogs.msdn.com/b/robertbruckner/archive/2008/10/13/repeat-header-and-visible-fixed-header-table.aspx
Also here is another link to this issue:
http://www.sqlchick.com/entries/2010/8/17/repeating-column-headings-other-advanced-tablix-member-prope.html
It is not very clear, but after you click on advanced mode make sure to hightlight STATIC under the "Row Groups" section then change the properties prvided.
Again not sure this is what you want exactly but I think its worth a look.

Related

How can I add an Average column to this text table?

I'm building my first dashboard in Tableau and I'm just beginning to learn all the nuances. Right now, I have a basic text table as shown in the image below. I'm trying to add an "Average" column at then end which will give the average per "Assignee" across the 5 fiscal week's shown. I assume there must be a pretty simple way to do this, but I've searched all over and cannot figure it out. I've been able to change the "Grand Total" column to show averages, but not add an additional column so I can display both data points. Can anyone provide some insight into how to make this work?
There are two things you can do:
Go To "Analysis/ Total/ Show Row Grand Totals" and the go to "Analysis/ Total/ Total All Using/ Average" This will give you the row and column averages. Your questions sounds like you want row average but column total, so you should try the second option.
Create a calculated field with WINDOW_AVG(sum([YourMeasure])) (Replace [YourMeasure] with the meassure you want to average. I couldn't see the full name in the screenshot) I will call it AverageMeasure
Then drag the AverageMeasure pill into the rows shelf, right click it and choose "Discrete".
It should look something like this now (I used the Tableau default data set):
If you want to format the number properly, right click on the AverageMeasure in the measures section, choose Default Properties/ Number Format and choose whatever you prefer.

how to split DETAILS row verticaly in Crystal Reports

I am trying to prepare a Crystal Report document. I have to split the document into two vertical panes. My document has 20 lines(10 on left pane,10 on right pane) to print like below
How can I split the document like below? I have tried to split the document by changing Secion Expert -> Details -> Layout. But it print first 10 rows in the first print, and the rest of the lines are printed on a new print.
Please give me an idea how to do this?
Alec was going the right way but he forgot about set up few more thing. On this picture you got all steps how to make it. Section expert of details then check Format with Multiple Columns and section Layout should appear. Click on Layout and enter value for width style (21cm / columns of your data)
Explanation: Crystal needs to know how much space you are giving him for each column (since A4 format is 29.7 x 21cm) then u put half of it (nearly 10 cm cuz of margins etc.) and then your columns should be separated.
NOTE : if u put 5cm for Detail size then u get 4 columns etc...
Hope it helps
In the section expert, under details there should be an option for "Format with Multiple Columns".
This will then make a 3rd "Layout" tab available as below, if you play around here you should be able to get the desired output.
EDIT
Another way is to duplicate the details section and underlay them. So records < 10 go on the original section, records >10 go on the underlayed section, messy but effective.

can we use Pagebreak in jasperreport to go to new page after certain number of column?

I want to display my report in new page after certain number of column. let say i have 50 columns and 10 rows in my report. i want to display every page with 25 column. It means i should have two pages every page with 25 columns.
Does any smart guy know how and where to put break in my report to achieve this goal?
You can easily achieve by placing the 'Column Break' Element in your report, to achieve this you can follow these steps:
You need to drag and place break element in from the palette in iReport/Jaspersoft Studio.
Then in case of iReport you need to choose the break type as 'Column' and similarly in case of Jasper Reports
Then you need to set a Print When Expression for the break element as you want the break to occur after 25 columns.
I think you should try the table component, which offers the possiblity to hide unused columns using a printWhenExpression.
This is how you can achieve the solution for your problem.
Thanks

Set the height of Details section Crystal Reports

The no of items in my invoice never gets more than 10. When its only one item in invoice(one row in details section) the report footer shows very up.
I want that I should fix 10 rows for the details section, when there are less rows, the remaining rows to make it 10 should be showed as blank lines.
I need the footer to appear at the same place all the time, irrespective of how many items are there in the invoice(never gets more than 10).
Please suggest solution.
Just use Sub Report and Fix the height of the sub report
then you will be able to display fix page.
I am not exactly sure what you are asking, but I will make some guesses with possible solutions.
If you print multiple invoices per report, you can group on the invoice designator, and set the report to start every invoice on a new page. In addition, you can force a new page when the record count goes over 10 rows. There are various ways to do this, but the simplest would be to add a counter that is set/reset at the start of an invoice, and then conditionally force a "new page before" if that counter reaches 11. You can also set this to force a new page for every n + 1 records (the 11th record, the 21st record, the 31st record, etc.)
If you just don't want the report footer to show up, you can either suppress it or issue a "new page before" on report footer. This is handy if you keep a summary page for reference (# of invoices in run, total balances, etc.).
If you just don't want a floating footer, you can select "print at bottom of page" for any section. This is handy for group totals. That, with "Repeat Group Header on Each Page", you can get some very nice looking invoices.
to fix height of detail section ..suppose i want size of 8 rows/records then
right click on detail section ->section expert ->on paging tab-> check on New page before beside button (x+2) write formula below given..
IF Remainder (RecordNumber, 8) = 0 THEN
TRUE
ELSE
FALSE
I know this question is really stale, but here's how to do what the OP asked.
You need to do 2 things. Find out the amount of real estate you need on the page for the 10 rows, and create a group footer that is that size directly beneath the detail line (e.g 2" or 5 cm).
Then, go into the section expert for the detail line and check the Underlay Following Sections box.
If you are ever going to have more than 10 detail lines, you also need to go to New Page after on the Paging tab and put in 10.
Put all fields Top = 0
Decrease section height.
Now, you have to set fields top dynamically.
Like this:
cr.Section1.ReportObjects.Item("Line1").Top = 0
cr.Section1.ReportObjects.Item("Line2").Top = cr.Section1.ReportObjects.Item("Line1").Top + cr.Section1.ReportObjects.Item("Line1").Height

Crystal Reports: Cross-Tab Column Arrangements

I am looking for a way out in cross tab, so that if the columns exceed in cross tab, they shouldnt go on next page..rather a new cross-tab should repeat after the first one.
For example, two columns are displayed in a cross tab :
Now if a new column is added, and assuming that it could not be accomodated within the given page width limit, it will go to a page next to it in CR by default.
But in my report it is required to be shown below the first cross tab (and not on next page), which will look as follows:
Please do suggest me if there's a way out :)
Thanks in advance
Your question is perfectly reasonable, but I'm pretty sure that in CR-XI, there is no automatic way to do this. I recommend skipping the cross-tab designer completely and just making your own:
Make a new CR using a placeholder table that has exactly 1 record.
In this CR, suppress everything but the details section. Add a new details section so you will have Da and Db.
In Da, add a subreport. Use your real datasource and add Column1 and Column2.
In Db, add a subreport. Use your real datasource and add Column3 and Column4.
I don't have time to test this, but I think it will display all the columns as you requested.
(Instead of step 1, you can probably use a placegrouper group in your report that only has 1 group. Then, when you add the subreports, make sure to not add any links to the main report.)
Edit
A dynamic number of columns makes this request much more difficult to do in Crystal.
Maybe you could autogenerate the entire report from a script. I couldn't help you with that, but I'm sure someone else on StackOverflow will.
You can use MS Excel to achieve something similar. Use MS Access or something similar to set up a crosstab of your data. Open a new Excel workbook and import your crosstabbed datasource using Data->Import External Data->Import Data (this imports the entire table, regardless of number of rows). In Page Setup, change settings to Fit to (blank) pages wide by 1 pages tall. You can format the data however you like and the format will be retained. This Excel method will squeeze all your columns into a 1-page wide area. It's not quite what you're asking for, but it will work.
The number of columns may be dynamic, but do you know what the field names could be? For example, your columns include 0-50 US States, then you know what the column names will be, just not which ones or how many. If this is your situation, then use my first suggestion (check off the suppress if blank options to hide unneeded subreports). It won't be pretty (alot of white space), but it can get the job done.
A possible solution can be a multi column report. But it can be difficult to make the row labels and values in the same line.
If you can create an additional row grouping then you have the solution that you want. For example if your columns have number like in your sample. Then you can add a formula like:
columnId \ 2