Crystal Reports - Dynamic Cascading Parameter based on another parameter - crystal-reports

I'm using Crystal Reports 2008 and have a cascading parameter that pulls data from a table that has ~35,000 rows. It creates entries off of 5-6 different columns which can total about 12,000 rows. The values that are returned are not static and change due to re-orgs and such that happen once a month or so (such as some name changes and so forth).
Effective Date, Area, region, state, city, store, employee
Is there a way to pull the corresponding set of 12,000 records based on the period without turning the "table" into a 100,000+ behemoth that would take several minutes to pick parameters?
I would like to have it pick the period the data is for (Effective Date), then pass that value to the stored proc that drives the dynamic cascading parameter.
EDIT:
Here is a sample of what my data looks like
EffectiveDt Area Region State City Store StoreID
5-1-13 Northwest NW-1 OR Bend KMart#1153 1153-42
5-12-13 Northwest NW-1 OR Bend KMart#1124 1124-31
5-11-13 Northwest NW-2 CA Faar Burgerss 8245
6-5-13 Northwest NW-1 OR Bend KMart 1153-42
6-12-13 Southwest SW-4 AZ Hawt Bally 9352
6-17-13 Midwest MW-3 OK Windy Nails 3524-1
So I do not want to have to try to add Effective Date in the complete set. The Effective date sort of drives what is picked and I want to pass that in without including the effective date in the cascading parameter set.
The parameter list the user has to pick from would look like:
Northwest
Southwest
Midwest
Then drive to each lower level from that.
I'm confused on how to base this cascading parameter list without adding another column with the effective date.
Thanks

You can do this by creating a command to retrieve the LOV for the parameter. Add the dates for the period as parameters for this command. When you run the report it will try to run the command and will find that there are parameters for the command. The report will show parameters' dialog for the period, when you set the period it will run the command and show another parameters' dialog to choose the actual report parameters (including the dynamic one). In this dialog the LOV for the dynamic parameter will contain just values within the period set in the first parameters' dialog.
So what you are trying to do is possible but you will get 2 separate prompts for parameters. If you choose wrong period you cannot go back and change it, you will need to cancel the report and run it again.
Another option is to use a viewer, which supports real cascading parameters. The only one I know is demonstrated here: Video. You can add your dates as parameters in the viewer (not necessary to change the report) and the dynamic parameter will be recalculated when dates are changed.

Related

Crystal Reports Parameters - One List rather than pages

All,
My first ever post - here goes!
I am using a Dynamic Parameter to filter a report based on Purchase Order Number.
I have created the Parameter, but only so many results are on the list, then you have to change to page 2 and start looking through again, is there anyway to get all values on a single list.
I have am awaiting my IT Department to do the Registry edit to increase the search size, as I have well over 1,000 records.
Finally, I assume the user couldn't search for a relevant value in the list?
I am using Crystal Reports 2011 64 Bit Version
Any help would be great.

Jaspersoft Studio: Force input parameter of subreport to be entered manually

In my main report I get a (small) list of string values from the data base. I then want to use this list for selecting records in a subreport, along with other input parameters:
The user shall be able to select records based on a range of begin and end date -- this is easy using an input parameter of type java.util.Date with "Is For Prompting" set to true. Another criteria shall be one or more items from a list showing values from a data base field. I could define the list in the report template, but then I'd have hard-coded strings (filled from the data base, but at definition time only).
Now the dilemma is: If I define the input parameters in the main report, I cannot get the values for the list beforehand; if I define them in the subreport, I get no prompt at all, so there's no way to set any of them.
So the report requires values for start and end date, and a list of string values to select from (multiple itmes can be selected). This list shall be built from values from the data base. In the subreport all these values shall be joined into a filter for the records. A user shall be able to define the dates and select items from the list manually before executing the report.
Is there a way to achieve this?
After some more hours of trial & error, and some more research, of course, I found that the keyword is "Query-based Input Controls". This documentation describes their creation on the JasperReports Server. Such input controls can be edited in Jaspersoft Studio as well, however, they actually work on the server only. Anyway, this is the solution to my problem.

Displaying different sheets at user's demand in a single dashboard -- Tableau

I am new to Tableau. I am not sure if I can use Tableau to create the following type of interactive dashboard.
Say I have two almost irrelevant data sources. The first one contains daily revenue for some department stores.
Store Name Date Revenue
-----------------------------
Macy 6/29/16 50,000
Century 21 6/29/16 46,000
Macy 6/28/16 45,000
Century 21 6/28/16 48,000
...
I want to use line chart to study the Revenue. So I would use Date as the horizontal axis, and Revenue as the measure, while using Store Name as the color dimension. As a result, it will render several color lines to capture the revenue in terms of date.
For my other data source, it contains similar things. But instead of doing department stores, it contains information about fast food chain restaurants.
Restaurant Date Revenue
----------------------------
KFC 5/1/16 50,000
McDonald 5/1/16 46,000
KFC 5/2/16 45,000
McDonald 5/2/16 48,000
...
I use line chart to study the revenue again.
Now with the dashboard, is there any way I can have a control with menu Fast Food and Department Store, so that if the user clicks Fast Food, the line chart involving Fast Food appears and if the user clicks Department Store, the line chart involving Department Store appears?
So far, I've been able to use this helpful article http://kb.tableau.com/articles/knowledgebase/multiple-sources-one-worksheet to display Fast Food and Department Store at request. But if the user clicks Fast Food, he will get only one line, instead of multiple lines (one for each restaurant).
I hope I have described my problem clearly.
You can fairly easily do this using a parameter control and using it as a filter in your sheets.
First, create a parameter control "View Control":
Next, create a calculated field based on the parameter for each data source:
The calculation should match the data source ('Fast Food' for the fast food source, and so on)
Then place the calculated fields in the filter card and set to True. This should hide one of the sheets and show the other. They should never be shown or hidden at the same time.
Lastly, place both sheets and the parameter control onto a dashboard. It is best to place the two sheets within the same layout container. You should get the following result:
change parameter:

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.

Real time alert for JasperServer

I am having two input for dates as below & want to set alert for that
Alert:- If difference between StartDate & EndDate is more than 6 months,it must generate alert / prompt panel showing text "Month Period exceed than 6",
& report should not proceed further, untill & unless the user select dates between six months.
As far as I know you cannot configure this in JaperReports Server as is, you'd need to implement some logic around import control validation which might be rather complex given the fact that input control rendering is based on a single template and lots of configuration.
However, you can implement the desired validation easily in the report itself:
create another parameter datediff that contains as default expression the calculation of the date difference in months (the parameter needs to be specified below the 2 date parameters)
The way to utilize this information depends now on your particular report design, here an example:
extend your report query with where clause and 6>=$P{datediff}. This would only return results if the date difference is less or equal to 6 months
add the no data band to your report and add there the desired error message.
modify your report configuration for when no data to no data section.
redeploy your report to JasperReports Server.
The desired behavior is now available.