MS Access report sections challenge - ms-access

Thank you for reading
I have a subreport that lists a number of purchase orders (POs) and displays the total of the orders in the footer detail section of the subreport.
The subreport is locayes within the Detail section of the main report.
In the main report; right before the subreport I have an amount (control) that is the allowance for a client (clients cannot order more than a given amount every month).
So I have the allowance and the total of POs. I want to see the balance (Allowance minus Total of POs) in the "balance" control in the footer section of the detail of the main report but I don't know how to reference the control that hosts the total of POs.

You can certainly reference controls in subforms/subreports. Though site here uses forms, the same concept applies to reports.
Specifically for your situation. Add a Balance textbox control in header or footer of main report with following control source expression (pay heed to exclamation and period markers):
=[Allowance] - [Reports]![yourmainrptname]![yoursubrptcontrolname].[Report]![yoursubrptfooterPOstotalcontrolname]

Related

Finding the sum of subreport passed values in the main report in ms Access

I have a main report for orders and a subreport for payment installments for each order. I have been able to pass the values from the subreports to the main report using in a new textfield
IIf([rptPayments].[Report].[HasData],Nz([rptPayments].[Report].[txtTotalPayments],0),0)
I am having trouble with summing these values passed from the subreport so I can have total for all payments in the main report footer
One way to do it is to look for the Running sum property of the field and choose either of its options(Over Group), or(Over All)
I would use a text box on your main report that displays the total from the subreport:
Name: txtTotLabsRunSum
Control Source: =srptCtrlName.Report.txtTotalControlOnSub
Running Sum: Over All
Then add a text box to your main report's footer:
Control Source: =txtTotLabsRunSum
Duane MS Access MVP

Dynamics CRM Online - Can't open subreport with conditional expression

I created a report using Visual Studio.
I have a table with one column that contains total won opportunity per account. If an account has total won opportunity more than zero, I want to link the text to a sub report (account detail report). But if it is zero, then I don't want to link it anywhere. So I create an action for 'Go To Report', and put expression in 'Specify a report' like this :
=IIF(Count(Fields!opportunity_name.Value) > 0, "AccountDetailReport", Nothing)
It works well in Preview section, if I clicked on total won opportunity with value more than 0, it will directed to the subreport. But when I uploaded the report to Dynamics CRM online, and tried to click on total won opportunity, it throws an error says : "Details are not available because subreport is missing".
I guess it because the conditional expression when I specified a report. Because if I changed the Specifiy a Report using only AccountDetailReport (without expression), it works fine
Try creating two placeholders in your tables column, both in the same cell. The value expression will be the same (whatever you currently have in the column) .
You can then set the 1st placeholder to be visible when the total won > 0 and this placeholder can have an action to go to the sub report. The 2nd placeholder can be set to hidden when the total won value > 0 and have no action assigned.

passing multi valued parameter to sub report in SSRS

I have built a report which lists all the loans that are available for a specified date range(below is the screen shot of the report).There are a number of filters and data logic involved in pulling this report.The numbers high-lighted in yellow are the total no of loans in each bucket.When the user clicks on the totals I need to open a sub report with all loans falling in that bucket.I have created a sub report which accepts loan numbers as a parameter and set it to allow multiple values. Set the text box properties on the main report to go to the subreport when clicked on the totals.But I am unaware of how to pass multiple loan numbers from the main report to sub report.
Any help would be much appreciated.
What I am currently doing is passing required filters/details to the sub report , so that it can reevaluate. Reevaluating the report takes a lot of of time as there are many condition that need to be evaluated. It would be quicker if I could send the list of loan numbers.
Rather than pass a list, you'll need to pass in enough detail so your subreport can reevaluate and come back with the same set of loans.
This might be a little simplistic but base on your screen show you would pass in the Date Range column value. I'll assume for now (as I have no more information on your data) that the column is just a text column as it appears above.
So you sub-report would accept a daterange parameter and you would pass this as =Fields!DateRange.Value. The subreport would then do something like..
SELECT * FROM myLoansTable WHERE DateRange = #daterange
If there are more parameters set in the main report, you may need to pass those too so your subreport gives the same set of loans as displayed in the main report.
Hope that makes sense.

SSRS Reset Page Number on Tablix Group not working

I have a tablix (named TX_Order) associated to a dataset (named AccOrderDS) with the following columns:
Order Date
Order Amount
Order Quantity
Account Number (Hidden)
Account Address (Hidden and join from another dataset by using the LookUp function)
The tablix is grouped by the Account Number and Page break on "Between each instance of a group". This part works fine.
Now I need to add a page number on the Report Header and the page number should be reset when the group (Account Number) changed.
So I set the PageName for this tablix as:
=First(Fields!ACCOUNT_NUMBER.Value, "AccOrderDS")
and on the Report Header, I add the [&PageNumber] textbox
However, the page number was not being reset. It keeps increasing even the group (Account Number) changed. I googled and used the method mentioned in https://blogs.msdn.microsoft.com/robertbruckner/2010/04/25/report-design-reset-page-number-on-group/ but the page number still not reset.
Did anyone encounter this issue before? How to fix it? Any help would be highly appreciated. Thanks!

Display footer once in a multiple-page in SSRS

I am customising a SSRS report in MS report builder 2014.
Current Condition
In this report, the body displays invoice info per customer ID, which may varies from 1 to multiple pages. e.g. the customer TEST001, there are 100 invoice line from INVC10001.... to INVC10100 with coresponding amount info, which is pirnted in 3 pages.
The report will start a new page for each customer ID.
The Remittance info (contains variable data and dynamic data) in the footer currently displays on every single page of the report. Take TEST001 as example, the payment bank info will be printed 3 pages under TEST001.
New Requirement
for those customer ID report lasting more than 1 pages, how can I display the remittance info on last page of the footer only under that customer ID(e.g. only print the bank info on page 3)?
Place this code in the Hidden property for any objects you only want to show on the final page.
=iif(Globals!PageNumber=Globals!TotalPages,false,true)