A Pivot Table report cannot overlap another Pivot Table report - excel-2007

Hi I have 3 pivot tables in same sheet and data source is danamically changing when refresh depend on the parameter value which is passing from the front end. It is a report and I have done the layout. But sometimes when the row count is more, Im getting above error message which is "A Pivot Table report cannot overlap another Pivot Table report" .
Do we have any setting to do setup to auto add cells depend on no of rows ? like in tables/data range ?
How can we resolve this issue dynamically ?
Thanks everyone in adavance.

If they are prone to change size there seems little to be gained from having them all in the same worksheet, so hold each in a separate worksheet. Otherwise you should be able to avoid the processing stalling due to overlap by spacing the PTs apart by more than enough blank rows/columns to allow room for as much expansion as would ever be required. If that means the PTs appear too far apart from one another for convenience hide the extra rows/columns until part of one or more PT spills into the hidden area and then unhide as required.

Related

Excel 2010 Macro Pivot Label Filter

I am having an issue running a label filter on a column (classic view) within my pivot table. I am trying to weed out the items in the data that are less than 180 days old. I can't adjust the data because it is used to feed multiple worksheets and I don't wish to copy the data and manipulate it for just this worksheet. Below is the line that I am running.
ActiveSheet.PivotTables("PivotTable5").PivotFields("Ageing").PivotFilters.Add _
Type:=xlCaptionIsBetween, Value1:="180", Value2:="9999"
This is a "between" filter. I have tried greater than and greater than or equal to but the same result occurs. After this line is run, I can click into the pivot table soft/filter down arrow and see that the filter is there as a between and even the days are inputted but the data does not reflect this. If I hit "OK" on the filter it then applies itself but I do not wish to have to do this manually.
Yes, "PivotTable5" is the pivot table in question. Can anyone help me automate this process?

Crystal Reports crosstable formatting

My colleague and I have taken over a vb.net project that uses Crystal Reports (I have CR9 on my PC).
The user has given the following feedback to us on how he would like the reports changed.
1) At the moment, it is wasting space by showing empty columns. How is it possible to not show the columns where all values are "-"? (I've tried using Crosstab Expert, however there are some reports where the columns have second sub-columns with titles in, so with these ones it shows them as it treats the columns as not empty)
2) The crosstabs at the moment are displaying from left to right, and are adding next to each other. My user wants the tables to go underneath each other, so that the report goes downwards, rather than sideways. How is this possible?
If anybody knows a fix to either of these issues that would be great, thanks.
In regards to the empty columns, you can choose a custom style in the Crosstab Expert and select Suppress Empty Columns
If the dashes don't count as empty, you might need to change the crosstab to evaluate a formula which replaces the dashes as zeroes or blanks.
I'm not aware of a good way to make a crosstab separate vertically as you specified. But you could swap the rows with the columns. It appears to me you have way more columns than you do rows, which should fit better on the page.
I suppose you are using the database field directly in the cross tab which is the reason you are getting -. Possible approach would be to write a condition and use that in cross tab. something like below
Create a formula #Formula1
if {Database.field}<>"-"
then {Database.field} //You can end the condition here if you wish
else "" // If you write else then check option supress empty rows or columns as per requirement
Now create a cross tab using Formula1 and display
Coming to your second problem , If you not wish to spread cross tab horizontally then you can pivote cross tab by Right click on cross tab or go to cross tab expert and give the fields that spread in rows part and that are static in column part.
Hope this helps

Excel - How do I find all relevant rows by typing unique invoice# listed Col A

I have a Worksheet with 10 columns and data range from A1:J55. Col A has the invoice # and rest of the columns have other demographic data. Goal is to type the invoice number on a cell and display all the rows matching the invoice number from col A.
Besides auto filter function, the only thing comes to my mind is VBA. Please advice what is the best way to get the data. Thanks for your help in advance.
Alright, I'm pretty proud of this one. Again avoiding VBA, this one uses the volatile formula OFFSET to keep moving its VLOOKUP search down the table until it's found all matches. Just make sure you paste enough rows of the formula that if there are many matches, there's room for all of them to appear. If you put a border around your match area then it would be clear if you ever ran out of room and needed to copy down the formula some more.
Again, in the main section, it's just a single formula (using index):
=IFERROR(INDEX($A$1:$J$200,$M3,MATCH(N$2,$A$1:$J$1,0)),"")
This gets to be so simple because the hard work of the lookup is done by an initial column which looks up the next row that matches the invoice number. It has the formula:
=IFERROR(MATCH($L$2,OFFSET($A$1:$A$200,M2,0),0)+M2," ")
Here is the working example that goes with those formulas:
Let me know if you need any further description of how it works, but it mostly uses the same rules as above so that it's robust in copying and moving around.
I've uploaded the Excel file so you can play with it, but everything you need to reproduce this feature should be in this solution.
Google Docs - Click link and hit Ctrl+S to download and open in Excel.
A popular solution to this problem is a simple VLookup. Lookup the invoice the user types in on the table A1:J55, and then return an adjascent column's data.
Here's an example of it working:
The formula in the highlighted cell is:
=VLOOKUP($L3,$A:$J,MATCH(N$2,$1:$1,0),FALSE)
What's nice about this formula is you only need to type it once and then you can copy it across and it'll automatically pick out the correct column of the table (that's the match part). The rest is very simple:
The first part says lookup value $L3 (the invoice number typed in),
The second part says look it up in range $A:$J (which is where your table is located). I've shown how you can select the entire columns $A:$J so that you can add and remove data without worrying about adjustin the range in your lookups. (Excel takes care of optimizing the formula so that unused cells aren't checked)
The third part picks the column from which the resulting data will be drawn once a matching row is found.
The FALSE part is an indication that the invoice number must match exactly (no approximate matching allowed)
The $ signs ensure that fixed ranges like the location of your source table ($A:$J) and your lookup value ($L3) don't get automatically changed as you copy the formula across for multiple columns.
The formula is pretty easy to adapt if you want to move around your table and the area where you do your lookup. Here's an example:
Bonus
If you want to add a little spiff, you can add a dropdown to the Invoice # field so that the user gets auto-completion and the option to browse existing values like so:

Use columns.add(...) in Word with non-uniform column widths?

Problem I'm having is that table.Columns.add(ref Object BeforeColumn) requires a reference to another column in the table. However, when I try to access the last column in the table to pass as a reference using table.Columns.Add(table.Columns[table.Columns.Count])
I get the error:
"Cannot access individual columns in this collection because the table has mixed cell widths."
As my current work around, I catch the error, and call table.Columns.DistributeWidth() to make sure the columns are uniform and run the rest of the code. However, I lose the formatting of my cell widths this way, which is unfortunate.
Is there any way I can workaround this without losing the cell width?
(I realize one way is to store every cell's width before running this process, and then re-applying the widths afterward, but this seems like a very costly solution to something that should be simpler)
I've found one way to do it. Here's how I approached it.
*Caution, I'm assuming that the table is uniform. i.e. The number of columns is the same across all the rows. (Note, the API has a Table.uniform function, but the description is not complete. In the API it says "True if all the rows in a table have the same number of columns." However, it also checks if the columns have uniform width).
Instead of using table.Columns.Add(table.Columns[table.Columns.Count]) to add a column before the last below, I select a cell in the table and used the insert command:
//assuming table is the name of the table you want to add columns to
table.Cell(1, table.Columns.Count).Select();
word.Selection selection = table.Application.ActiveWindow.Selection;
selection.InsertColumns();
This might actually be a better way to add columns, as the api gives you way more options on how to insert (i.e. use InsertColumnsRight to insert to the right of the column). The Columns.Add(...) function by default inserts to the left of the select

SSRS - Producing a report that is not dynamic in size

I want to build a report that is completely static in size and shape. I'm attempting to mimic a hand-entered report that someone in my organization has been building from a word doc for years.
The critical piece appears to be fixing the number of rows that are produced in the various Table grids that fill the page. I would like them to always contain a set number of rows, whether data is present or not. It would seem that if I can just fix the size my tables, then all the other elements will not be forced to move because of stretching repeater sections.
All my grids are backed by stored procedures, so I'm open to SQL tricks as well.
Sorry i did miss-read the question.
If you know how many rows you need to return (say 20) maybe you could pad some bogus info into your records returned from the stored procedure. You might be able to count the records your query has returned before you send them back, and if you have less than 20 add some bogus ones to the record set, put something like 'NonDisp' or something in them.
Then in the report put an iif statement into the cells that checks for this bogus info, if it is found change the cell to display nothing, otherwise show the valid values
Not a direct answer, but perhaps a workaround you might consider: perhaps you can insert a page break after the table grids that have dynamic sizes, so that all elements that follow it have a fixed position (relative to the top of the page).
Add a parent group to tablix with =Ceiling((RowNumber(Nothing)) / 10000) expression. (10000 or whatever is required no. of rows)
In page break properties of group, check box for insert break between groups, leave the bottom boxes un-checked.
Optionally, we may chose to set hidden property true for text boxes added because of new parent group.
In tablix properties, check box for "Keep together on one page".