Exclude Filtered data from Group Totals in Report Builder - filtering

I have a stored procedure pulling data based on a parameter based "list date" range and rolling it up by month. My output gives me rows based on the month. I need to filter out the "Previous" values which actually represent 'To Date'
Month-------# Listed--------$ Listed
Previous---------125--------1,000.00
January-----------25-----------100.00
February----------50-----------500.00
To Date----------200---------1,600.00
I can easily use a Group filter or even a Tablix filter to eliminate the detail row for the 'Previous' entries.
Month-------# Listed--------$ Listed
January-----------25-----------100.00
February----------50-----------500.00
To Date----------200---------1,600.00
However, I cannot find a way to exclude the filtered detail from the Group totals. What I need to see is:
Month-------# Listed--------$ Listed
January-----------25-----------100.00
February----------50-----------500.00
To Date-----------75-----------600.00
I don't have the option of modifying the stored procedure. Any thoughts on how I can do this in Report Builder?

Using Tablix filtering and filtering out Previous should do the trick.

Related

Filtering a Cross Tab by a Date Range in Crystal Reporting

I've got a cross tab that sums the number of records for each month across my data set, however I don't want all of the data set. I only want the cross tab to sum the data for each of the months for records that are related to the dates between 01/01/2022 to 31/12/2022.
Normally I would set a filter on the report to say this, but I am adding another section to the report which would not work if I had that filter set. I only want the filter to apply to the actual cross tab information.
Thanks in advance!

How to pass parameters in a query in report those are linked to each other

I want to use input controls in my report dashboard. I have 3 filters to apply. What I want to do is when I choose a date from the date filter the other filter must show the customers for that date only and when I select a customer then in third drop down list for third filter must show transactions carried out by that customer only.
In addition to these The dash board must display data for 'All' values in all the filters.
So that the user can view data for all transactions for all dates, all customers and also can select a particular date, customer and transaction
i guess you need to put parameters in the SQL queries, e.g you need to put a date_param in the second query(customers), then you need to put a cust_param in the transactional query. Before that you need to define those params in the designer too.
You can use cascading input parameters.
What is cascading parameters?
In cascading parameters the list of values for one parameter depends on the value chosen
in preceding parameter.
Order is important for cascading parameters because the dataset query for a parameter later in the list includes references to parameters earlier in the list.
For example suppose we have two input controls and names are Shipcountry and Shipcity, In this condition if we select Shipcountry then next input control Shipcity should show only those cities which belongs to that selected Shipping country.
You can refer this post for more detail Creating cascading input controls
You can add three input control p_date(DataType:Date), p_customer(Collection) and p_transaction(Collection), after adding parameters add condition in where clause of your query.
Where date_columns = $P{p_date}
AND $X{IN, customer,p_customer}
AND $X{IN, transaction,p_transaction}
Then create three input controls in JasperReport server with where clause in the query of 2nd and 3rd input controls.

Crystal Reports: Accessing printed records

I've been working on a report that uses subreports to print records.
The problem is: for the same information, there may be several records - i.e.:
There may be several records for the same product if those records differ in one single column. My goal here is to make a Record Selection Formula that says: "if that item is already shown, then don't show it once again."
I've tried to use (shared) variables for this, but can't seem to find the way, because of the evaluation time.
Selection formulas are already being used to apply some filtering criteria. The column that may differ between two ocurrences of the same record is not always the same, so using a simple Selection Formula is not likely to work...
Any suggestions?
Example:
I used the record selection to tell the report:
"Show me all the products according to these criteria (warehouse=parameter1 and category=parameter2 for example)".
But there may be more than one record for the same product of the same category and inside the same warehouse, if one or more fields are different (for example, different price, different lot)
I want not to display those repetitions.
Your approach is wrong... Record Selection Forumula is something that is applied at report level not on the row level or column level.
If you requirement is not to show the records that duplicates then you need to write the supress condition for those, As per your requirement apply supress condition to the rows or columns.

SSRS 2008 limiting scope based on expression

I have a fairly simple problem, but I don't think I understand SSRS and scopes well enough to figure this out.
What I have is a case (one entity) that can have multiple appointments (another entity). Appointments have a date and a status. I want to display the next soonest appointment date and its status. To display the date I'm using
=Min(IIf(Fields!appt_start.Value > Globals!ExecutionTime, Fields!appt_start.Value, Nothing))
The idea is that I first pick only those appointments that occur in the future, and then grab the soonest one. It seems to work great.
Now, I need to apply the same filtering logic, but display the appointment status rather than the date. From my understanding, this is where scopes would come in. I could limit my scope to just the appointment I want, and then show its status. But I don't understand how to do that.
One way to go about this particular problem would be to use a filter in combination with the First function. Add a filter to the table to only show dates greater than the current day. Use a table row with no grouping and use expressions like this:
=First(Fields!appt_start.Value)
=First(Fields!appt_status.Value)
Another option would be to add calculated fields to the dataset to only populate values such as status when the date is greater than the current day. This is useful if you need to show more information later on.
Edit: Yes, you would want to sort the data by date for the First function to work right. You can actually filter at 3 different levels in SSRS. Right-click on your dataset and go to Dataset Properties. Click on Filters. Click Add. Fill in the expression, operator, and value to meet your need. You can also do this in the group properties or the table properties.

Crystal Report-Running Total

I have a problem with running Total in Crsystal report9
if their is no values available for a Paticular field how can we return the running total as '0'
Instead of display the Running Total directly in your report create a Formula Field based on the Running Total and drag it into the report.
Your formula should look like this (Crystal Syntax)...
if ISNULL({#RunningTotalField}) then
"0.00"
else
ToText(RunningTotalField, 2)
If there is no data for that particular group, then Crystal won't show it easily. Your options are :
1) Use subreports to display the values for a particular group, and keep the main report just looking at the table(s) containing the group headers.
2) Use a stored procedure as the source so you have full control over the SQL that is run.
The problem is that as soon as you use a field to group, Crystal will only return records where that field has been used. If it was simply in the Details section you could modify the link to a LEFT JOIN and it wouldn't matter, but the group forces the INNER JOIN which means the groups without data are not returned.
Unfortunately Running Totals don't show up if there are no records that match your criteria. An alternative is to use a set of formulas calculated in various sections of the report. The technique is widely described in the Crystal literature. For example, this TekTips gives a very succinct overview of your options.
You set up an initialising formula in each header, with the evaluation time directive "WhilePrintingRecords". This approach was the only one available for doing running totals in the "good ol' days" before RunningTotal objects were available.