How do I make one parameter dependent on another? - crystal-reports

I need two parameters in my report. I know how to make them, but I need the 2nd one to depend on what the person chose for the first answer. For example, if you choose USA as a country, I need the second one to show only states in the USA.
How can I do that?

while creating a parameter.
select option as dynamic.
Then start selecting the database fields in parameters, First select country and then states
by clicking on the 2nd column you name the parameters.. you can change the name as you wish after clicking ok by using rename option.
Now place parameters in report of set parameters in record selection formula.
When you refresh the report you get parameters with dependency.

Related

SSRS report need to show n-time based on dataset rows

I have designed two pages and each page have different table.Currently my dataset return only one user details.So i have bind all details in table.
Requirement
In case data set return two user details ,need to print two user details.First two pages for first user and second two page for second user.
Is this possible in SSRS report? If yes please guide me.
As you already have a report working for a single user then I would normally do this with subreports.
Asumming your current report accepts a userid or similar as a parameter....
Create a new new report.
Add a dataset that returns a list of users that you want to produce the report for
Add a table and set its dataset property to the name of the dataset you just created.
You can remove the header row and all columns except one from the table
In the remaining cell, right-click and choose "insert Subreport"
Right-click the subreport placeholder and choose properties
Choose your original report as the subreport
Click the parameters tab and choose the subreport property name on the left side, choose the field from your dataset that contains the userid (or whatever value you pass as a parameter) on the right side.
That's pretty much it, when you run the new report, it will produce 1 row per user, in each row it will run your subreport.
You will need to use a matrix, specifically row groups, grouping by using user details, and possible inserting a page break between each instance. This should get you going in the right direction.

Filtering Based on a Different Column on Tableau

I'm wondering if something like this is possible.
Assume I have a data table like this:
I want a filter, where user picks France for example, but the data is filtered based on corresponding Continent value, e.g., all Europe records should show up.
Is this possible?
Sure, We can do that. If you add country to Filters shelf, Tableau will show only records of selected value. In our case, if we filter "France", Tableau shows only records which has France. So we will miss other Europe records. Parameter can handle this scenario. Follow below steps.
1.Create a String parameter
2. Create a calculated field
3. Add the created calculated field to Filters shelf then choose 'show'
4. Right click parameter then 'Show parameter control'. So it will works like filter
Method 2: Dynamically change parameter value
Pros: No hard coding, dynamically changes value based on selection. It works, well on dashboard
Cons: You will not have drop down for selection like filter. So, you need to click a chart to trigger the changes.
1. Create a String parameter with allowable values as 'ALL'
2.Create a calculated field
3.Create a parameter action in dashboard.
Dashboard-> Actions-> Add Action -> Change Parameter
In Change Parameter dialogue box, set target parameter as 'Parameter Name' and value field as 'Continent'
4. Add the calculated field to filter and select 'True' on other sheets
5. Final Dashboard looks like
Click the icon on the selector sheet. It will automatically filter data on data sheet.
Inside the selector sheet

Heading repeated for every record in the table

My report handles several Members based on a 4-column Members table.
For some reason, each Member is being repeated on the report for every record in the table. How can I configure this such that every member has a separate set of records?
In other words, repeating should consider "MeberName + Test" as one single unit.
Add a Group section based on your Member field. Then right click on that Group and select Section Expert. Check the New Page Before option to configure the behavior you asked for.
Additional help:
Insert page breaks between report groups with two-sided printing

Listing multiple values from the same record multiple times in crystal reports

I have a PDF "student record" that we need to print the values on. Because of this, all values must be printed where they are listed on the pdf and I can't just put everything in a list format. I have attached a screenshot of the bottom lefthand corner of the PDF as an example.
Obviously, grouping wouldn't allow me to print out different values of the same record like this. It probably wouldn't allow me top specify which record goes on which line exactly either.
Is it possible to make a formula field that pulls the correct record for each line?
For example, dragging the "Student.Relationship.FirstName" field always lists whatever 'first' relationship is on their record.
Can I make a formula that specifies that will pull the second relationship record instead of defaulting to the first?
Can I make a formula that can specify "student.relationship.firstname" WHERE student.relationship.type = "father"?
SUBREPORTS.. I think that is what you need. Create a grouping on STUDENT, add Extra sections for the same group and on each section insert a different Subreport that has details as required.
Pass the Student ID as the sub-report link.

Filemaker 12 -- display one value, store another

I'm building a database in FileMaker 12 that will, among other things, keep a list of jobs (indicated by numeric ID) and the employees who had billable time for that job.
Given three tables:
Employee ( empName, empID, salary, ... )
JobHours ( empID, jobID, hrsWorked, ... , refID)
JobCost ( jobID, expenses, profit, ... , refID)
Where:
Employee is my personnel roster matching names to numeric employee IDs and stats (salary, et al) ;
JobHours is a list of employee participation -- whenever an employee spends time on a job, this table has a line that shows their ID, the job ID, hours worked, and a few other things;
JobCost is a daily record of jobs. One entry in this table refers to the activity for a single job on a single day. Additionally, each entry gets a system generated unique ID (since neither jobID nor date is unique) to relate to JobHours (resulting in a list of who worked on a particular job on a particular day).
I have a form showing records from JobCost. For each record, I can see in a portal, showing records from JobHours, who worked on that job on that day.
Now, the issue.
In my portal, I want to have a drop-down list of employee names pulled from a value list to create records in JobHours with the following criteria:
1) I need it to be a drop-down rather than a pop-up so it will respond to auto-fill from the keyboard. A drop-down will show the secondary value (employee name) from a value list while dropped down, and will respond properly to keyboard autocomplete on the secondary value, but once you've made your selection, it only displays the primary value (employee ID).
2) I need it to display names, not IDs, at all times. The pop-up does this perfectly. However, it doesn't seem to respond to the keyboard for typing autocompletes.
3) I need to store the numeric ID rather than the name.
I know how to satisfy any two of these criteria at once, but that's all. The whole database is working beautifully otherwise. Is this behavior possible?
One common technique is to use two fields, one directly on top of the other.
On the bottom, put your JobHours::EmpID field. Set it up as the drop-down list with the value list that you've specified.
On top of the JobHours::EmpID field put the related Employee::EmpName field. Set the field so that it cannot be entered in browse or find mode.
Now your users will see the Employee Name, but when they click that click will go through the top field and into the Employee ID field where they will choose the name from the value list.
pft's solution is one that I have long used, but I do still find it inelegant because the user still sees an existing id number in the field when changing the value.
If the type-ahead is important, I would use the popup menu. Once the menu has been activated either by tabbing into it or by clicking into it, the user is able to type from the keyboard and the selection will change based on what's entered.
I came to this thread looking for a solution to this same issue (allowing the user to pick from a list, show their choice, but store a related value instead). For example, choose a plant species name from a dropdown, show the plant species name in the dropdown field, but have it store the taxonomic serial number (TSN; which is more likely to stay the same over the years). This is easy to do in MS Access, but took a litlte more messing around to do it in FMP12.
How I solved it:
I created two fields in the table that would be storing the values: Plant_TSN and Plant_SciName. A relationship must exist between the values in these two fields. In my case, I store a SciName for each TSN in a lookup table. I then created two fields in my layout, one for each new field.
For the value you wish to store (ex. Plant_TSN):
Make the corresponding layout field a dropdown and include the show/hide arrow. Edit the value list you will populate the dropdown with to show the second (reader friendly) column but store the first column value. In the layout shrink the field to only show the arrow.
For the field you wish the user to see (ex. Plant_SciName):
make the other layout field a Edit Box and prevent field entry in either Browse or Find mode. But it up against the dropdown arrow created in the previous step to make what looks like one field.
Finally, back in the first field (arrow-only drop down) write a script to push the user friendly number (Plant_SciName) to the edit box when the user-ugly (Plant_TSN) value is picked in the drop down. I used the OnObjectSave script trigger of the dropdown formatted field. Script should be something along the lines of 1) Freeze window, 2) Go to Related Record (based on relationship in lookup table 3) Set Field (i.e. the edit box) and 4) GotoLayout[original] to offset the Freeze.
Probably not an entirely clear explanation, but I bet you will get it on your third read through! I would have posted a screenshot, but I apparently need 10 "reputation points".
Cheers.