ssrs 2005 page break issue - reportingservices-2005

am working on 2005 reporting server and am facing an issue in page break.
my scenario is
i have 5 data tables say
tab1
tab2
tab3
tab4
tab5
and user can choose to publish any of the above tables(i have 5 parameter to support the above)
my requirment is if user select to display say tab2 tab4
in my report i need to have 2 sheets one for tab2 and other for tab4
if user select to display say tab1 tab2 and tab5
in my report i need to have 3 sheets one for tab1 next for tab2 and other for tab5
in 2008 am able to achieve this by the page break setting
where as in 2005 same settings doesnt work.
i tried the below setting
for each table the visibility expression is:
IIF(parametername = true , false , true)
and choosing setting... page break after table and page break before table but i was not able to get the required output
i saw a solution saying rectangle inside a rectangle and i tried the same
i moved my table to the inner rectangle and
the outer rectangle has visibility expression the inner recatngle has the page break option(page break after rectangle/before rectangle/tried with both as well)
it works only for one control say table one
in my case i have 5 table and i did this solution for all 5 tables with 2 rectangle each for a table but error still persist
any work around for the above?? will be highly appreciated

I managed to get round this with a horrible solution (but it works).
I placed a small transparent triangle just after each table (they have to be visible as well for the page break to work, so they would need to share the same visibility logic as your tables).
Set Page break before the rectangle. This seemed to work for me, the only difference is I am not conditionally controlling the visibility of the tables. The principle should apply though.
I had the same bug as you with page break after table, very annoying.

right click table, and select properties, Check "insert a Page break before this table" under :Page Breaks" title

Related

How to map existing pages on navigation bar instead of groups

My home page is on your screen and as you see I have a collapsable navigation bar and navigation cards on the homepage. In my collapsable navigation bar, you can see that the menu part "Računi" has 2 subregions under it, while the 2 subregions are real working pages the element "RAČUNI" is just there to make it look good (doesn't lead to any page.
My problem is that when I click "RAČUNI" on the right navigation bar shown in the cards region it redirects me straight to the login screen of my workspace.
How do I fix this?
I'd suggest you to create your own table which contains the whole menu. As cards region is - actually - a classic report, it is you who should create query which will do what you want.
Here's an example of such a table:
PAGE_ID represents page on which cards report is located; if you have two (or more) cards regions on different pages, you'd keep them all in the same table; page_id will distinguish them
CARD_ID - primary key
TARGET_PAGE - can be used in CARD_LINK so that Apex would know where to navigate once you click on the card
in your question, it is unclear what you actually want to do when you click on "Računi" card. I don't know what code you used, but - if you do as I suggest, it is completely under your control; maybe you'll have to "split" that card into two and have separate "Pregled računa" and "Ispis računa" cards. Or, maybe you'll create a new page which will then let you redirect to one of these; can't tell
the rest of columns is, I think, self-explanatory
Example of a report query:
SELECT page_id,
card_id,
card_title,
card_subtitle,
card_text,
card_subtext,
-- UI and other attributes
NULL AS card_modifiers,
--
REPLACE (
REPLACE (REPLACE (card_link, '<<PAR_SESSION>>', :APP_SESSION),
'P116_YYYYMM',
:P116_YYYYMM),
'P116_ID_ORG',
:P116_ID_ORG) card_link,
--
card_color,
card_icon,
--
NVL (card_initials, apex_string.get_initials (card_title)) card_initials
FROM cards
WHERE page_id = 116
ORDER BY page_id, card_id;
That's it; basically, create your own query and fix CARD_LINK so that it does what you want.

Apex Search, place in holding area, repeat until submit

Yet another Apex question. I am using Apex 5, but suppose it will be similar for older apex versions.
I am basically trying to build a basic sales app that is taking stock out of a Table and adjusting the stock count accordingly.
It is a simple single search field that selects any column from a table and then displaying the result.
P1_Search is the Plain text field and below the SQL query on the search which will return a Tabular form.
select * from TABLE where regexp_like(NAME, :P1_SEARCH, 'i')
or regexp_like(BARCODE, :P1_SEARCH, 'i')
or regexp_like(STOCKCODE, :P1_SEARCH, 'i')
or regexp_like(DESCRIPTION, :P1_SEARCH, 'i')
This is all good and works for each of the columns.
Now the big question. Once I hit the search button I want to have a option to push a button or a text field for numeric values which should then add the selected item into a holding area in the bottom of the page.
So if I search for "bread" I will find the result, select quantity one, or press a add button and this is where the issue comes in. Once I have completed a search for bread and selected it, I start a new search for "milk" which should not clear the selection below for "bread". Once I then have selected all my items and added to holding area, I want to hit a Checkout "button" which carries all the values over to the next page.
It is not for a online site, but an actual Point Of Sales system, so would prefer if I could stick with the apex portion. I have considered moving to external procedures where I can have a perl process running the hold until I submit, but I am trying to do this in Apex mostly and not use my favourite perl language :)
APEX Collections are a perfect fit for this scenario
https://docs.oracle.com/cd/E14373_01/appdev.32/e11838/advnc.htm#HTMDB25878
The are the 'global temporary tables' of the APEX world (logically, not physically.)

Multiple detail rows and page breaks on report

I have a problem with a rdlc page breaking and table with multiple detail rows. Tried everything that crossed my mind, none works.
As you can see on the picture below, the table has 7 detail rows.
Now, when report is rendered, the page gets spitted between, for example, rows 2 and 3 which is bad.
I wish to keep all of detail rows (that belong to one record) on the same page. How can I accomplish this?
I think you should create a group based on whatever joins the one record together, let's call it PlaceID. So right click, Add Group, choose what to group by.
Then, under the row groups you should have a group by PlaceID, and underneath that, a row marked "Details". Highlight Details in the lower section, which should highlight in the report the rows involved. Set the KeepTogether property of that section to True, should keep details on the same page.
If you don't want to use the Group option mentioned by Jerry, this option in the Table Properties may help...

SSRS Conditionally remove rows from a table

I am new to SSRS and need to get this working for my project(work not school)
I have implemented the data to be hidden on expression
=IIF(Fields!Offset1.Value = "",true,false)
Problem is that It leaves the empty space where those values would have been in my Report. I need the space to disappear too. Any help would be GREATLY appreciated!!
EDIT: Forgot to mention that I am getting my data from a MS Access DB (if that matters)
After much head scratching and thinking about it differently. #django made me think visibility not hidden properties. I righ clicked the row header tab and clicked on the Row Visability... option. That brings up the Change display options dialog box. I selected the Show or hide based on an expression andthen the fx button to build the expression. The expression i used was
=IIF(ISNOTHING(Fields!Offset1.value),true,false)
clicked OK
Ran Preview and this is what i got as a result:
It sounds more like you need a 'visibility' on a grouping more than a hidden expression and you can use ISNOTHING() instead of = "". I believe (not sure don't quote me ;) ) that SSRS evaluates hidden to only hide values not the object container itself(the row). You may be better with your group or 'details' group to have an evaluative expression on the 'visibility' rather than an element you used instead. Let's give a very simple example to drive home the concept:
Create a simple dataset in a new report. DataSource does not matter as this is only a table variable that is self contained.
declare #Temp table ( Code char(1), Value int)
insert into #Temp values ('A', 1), ('B', 2), ('A',null);
select * from #Temp
Create a table from the toolbox and populate both columns with the data from your set.
Copy and paste this table right below itself in the report.
Now for the second report click anywhere inside it but in the lower left you should see 'Row Groups' in the 'Design' view of Business Intelligence Development Studio (or the web creator if you are using that). Right Click '=(Details1)' (or similar) and choose 'Group Properties.
Now select 'Visibilty' on the left pane. This relate to the entire grouping, not just a cell in an element. Hit the 'Fx' under 'Show or hide based on an expression'.
Enter in the expression:
=IIF( ISNOTHING(Fields!Value.Value) , true, false)
Preview the report. You should see the first table with three rows and the second table IGNORES the third row because it qualifies as nothing which it evaluates for the ENTIRE GROUPING to mean 'do not show'.

How to populate dynamically generated select boxes with ajax

I haven't been able to find a solution for the particular problem I'm having with this project. I need to the following: dynamically add rows to a table that contain two select boxes AND use ajax to auto-populate the select options of the 2nd select box, based on the value of the first select box... in the respective table row (that was dynamically added on the fly by some js).
Still with me?
I can easily populate, dynamically, a select drop-down using ajax/javascript based on the value of the first drop-down, in the first row. I can even populate three or more select boxes in the same row, using ajax/js functions to load each additional select. Yet, this is not my goal.
Here's what I have... My form contains a simple table with 3 columns. First is a checkbox, the second is the "State" select box and the third column is the "City" select box. I have two buttons above the table that allow me to "Add Row" and "Delete Row". Mind you, the first row (which is programmed-in), works perfectly for loading the city names of a state using ajax.
Upon clicking the Add Row button, I'm able to create the second row dynamically, which contains the checkbox, state select and city select fields. The state select is populated based on the innerHTML content of the original column, but the city select is obviously null because it is expecting ajax to fill it. Note: the names and ID names of these fields are iterative... city_id, city_id_1, city_id_2, city_id_3 and so on... so I have that uniqueness to work with.
My problem lies in the fact that when I select a state from the 2nd or 3rd (and so on) rows, only the firstcity select changes. Why? Because the js/ajax processing function says to operate only on the element with name "city_id"!! Which is the name of the city select box in the first row.
I have not (yet) found a way to dynamically pass the name of the element I need updated to the onreadystate ajax function. When I've needed to populate two or three select boxes in a row (same row), I've had to have complementary ajax functions for each drop-down - which are static, mind you... but what if I create the element dynamically?? I can't pre-program that many functions into my page... or must I?
If you have any ideas on how to accomplish this I would be soo damn appreciative!!!
Thanks!
var i=1; // put here the number of the column being added now.
var x=document.getElementById("city_id_"+i);
// populate x

Resources