I have a problem during creating a crystal report which will show a part of one manufacturing process.
So, I need your help....
I have a four different components that forms a one bigger component (or product). Every of this small components pass through different production operations, but the same component don't pass through all production production operations.
And, I need a crystal report which shows every article (component) with a number of finished component in each operation.
Here is the example of SQL result (ordery by operations):
so, you can see that article with articleID = '29183' is going through first and last operation... also, articleID = '17275' is going through the second and last operation... I think that is all clear from the picture...
And, all I need is report that this will show in the columns like this:
In the report, I made a group by ArticleID, so the article (component) appears only in one row... And after that, I need a values in columns (columns for operations) which correspond to every article...
Very thanks... I try this solve for a few days, but I don't know how to solve this... I tried crosstabs, dictionaries, lists but nothing helps me
You've already grouped by Article ID so that each article has its own single line, so that's a good start. Now, you just need to separate the 3 operations with 3 formulas and aggregate them to the group level.
For example, the formula for the first operation would look like:
//If row is a "first operation" then display the finished data element
if {table.Operation}="first operation" then {table.Finished}
Then to display in the Group Footer you could just use a max() summary function on the formula you just created.
Related
I have an SSRS report that combines 5 reports into one. Each report is populated from a different stored procedure. The first page is a summary that is to provide a record count from each report. I've created fields in the stored procedure that provides the counts for each individual report: phycount and nonphyscount. I'm trying to create a table similar to this:
Active comes from one data set, Initial comes from another, Recert comes from another, etc.
I've been playing around with the Lookup and LookupSet but I'm just getting errors, plus I'm not sure if that's even the right direction.
Does anyone know how to do this?
Lookup and Lookupset are more for getting specific values out of a dataset. Very useful but not necessary for what you're trying to accomplish.
You can use aggregate functions SUM and COUNT to accomplish what you want to do. The cool thing about these functions is you can actually embed IIF statements inside of them.
I'm not sure exactly how your datasets look and are named but it would be something like this...
SUM(IIF(Fields!Type.Value = "PhyCount", 1, 0), "Active")
The sum function goes through every row of your dataset and sums the values you pass to it. The iif statement checks to see if the type field in the dataset is "PhyCount". If so, it returns 1, if not, 0. Since this will happen for every row, your SUM function will return a count of each row with status active.
edit: "Active" after the iif statement specifies the name of the dataset.
EDIT AGAIN: This solution apparently does not work in SSRS 2008.
I am still fairly new to SSRS, and I do not know what I need to/can provide as examples to help clarify my issue.
I am developing an SSRS report that accesses a NAV database and generates a report for an equipment number. My task is to generate a master report that can print multiple of those kind of reports(currently 10 max). I am using sub-reports to get the content that I need for an equipment number.
I am looking for a way to make this dynamic, where I can generate 1 to n sub-reports based on how many values were picked for the multi-value parameter. The end result should be one PDF file that contains the full report for each equipment number listed. I am trying to only use SSRS.
I have seen where I could hide sub-reports then make them visible if a condition is met, but this isn't the functionality that I am looking to use. So, what would be the best way to dynamically generate sub-reports based on a multi-value parameter?
I figured it out. I made the sub-report parameter equal no value. I made the main report with a parameter that can select multiple equipment numbers, a list, and a data set which filtered down to the appropriate equipment numbers to avoid duplication. I made the sub-report object in the main take in the cell value from the list equipment number. When the list proceeded to the next row, it copied all of the objects in the box area.
In several notes applications, instead of handling related data as separate documents, if the size of the data is small (less than the 32k limit), I'll make several multi valued fields and display it in what I call a "List Panel". It's a table where each column displays one multi-value field. Since fielda(1) goes with fieldb(1) that goes with fieldc(1) there is a concept of rows. (I did a similar thing in my auditing routine discussed here )
It is always assumed that each field has exactly the same number of elements.
All the multi-value fields are then stored on the single document. This avoids several coding conventions that made my eyes bleed like having date changed, who changed it, new value fields for each field we wanted to audit. Another thing that this kept to a minimum was having to provide multiple fields for the same thing that locked you into a limit. Taxrate1, Taxrate2, Taxrate3, etc...
In my "Listpanel" the first column is a vertical checkbox. (One for each element in my lists) This is so I can select one item to bring up and edit, or select multiple values to delete "rows" or apply some kind of mass change to them.
What would be the best way to handle this under xPages to get this functionality? I tried making a table but am having the devil of a time to get the checkboxes to line up with their corresponding data items.
Views and dojo-grids seem to assume we're using a document for each row.....
This TableWalker may provide what you want http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Tutorial-Introduction-to-XPages-Exercise-23
It was created when XPages was all very new, so it's SSJS rather than Java. But if you're comfortable wiith Java, converting it probably won't be a challenge.
You could use a repeat control to display the values and build a table using the table row tags in the repeat. You would want to calculate the id of the checkbox to be able to take an action on that selected row. The repeat var would be just one of your multi-value fields and you use the index of the repeat to get the value for that row from the other multi-value fields.
Hopefully the title says it all.. But just in case. I am in the midst of reworking some custom-built in-house software, written in vb.net, that queries the database, gathers the returned data and processes it within the vb.net, then outputs the results to Crystal Reports to display.
We have found this to be incredibility wasteful of resources, and cruelly slow. Like I mentioned before I am reworking this program so that the Crystal Report itself gathers the information and displays it. This morning I am reworking a seemingly simple portion, a Monthly Report that just counts the total records, sums somethings and other small tasks.
So my question is this, what is the crystal syntax to count the number of records that is returned, that is between two dates.(parameters that are passed in from the vb side)
I want to write this:
COUNT({Table.Column} in {?FromDate} to {?ToDate});
Crystal Reports then highlights everything inside the count and tells me a field is required here.
I also tried to create a running total, but it only tallied 1. So if that is the correct course of action please explain.
Thanks!!
Crystal reports formula syntax does not allow for a conditional count in this way. I usually perform this sort of thing with two separate formulas: The first populates 1 or 0 for the logic test, the second sums the first, e.g.
{#InRange}:
if {Table.Column} in {?FromDate} to {?ToDate} then 1 else 0
{#sumInRange}:
sum({#InRange}
I'm pretty sure I've achieved similar results in a single formula, but it makes the code less readable and harder to maintain, sometimes requiring While Printing commands that make the formula results inaccessible for use in other areas of the report. Using two formulas also allows for easy filtering on this first one.
I have a very simple task. I have two datsets. The first is a single value that has returned me a number of calls that has been made. The second is a list of targets. I want to be able to divide the first number of calls by its call target in order to calculate the total %.
The lookups of these are dependant on the criteria that is selected in the report itself. I know it's possible to do inside SQL its just a huge pain in the ass. I want to be able to calculate two fields and I thought something so simple would be a breeze for SSRS but apparently not. So the error i get is:
*The expression used for the calculated field'=fields!DMCP.Value / FIRST(Fields!DMCTarget.Value,"AllTargets")' includes an aggregate,rownumber,runningvalue, previous or lookup function. aggregate,rownumber,runningvalue, previous and lookup functions cannot be used in calculated field expressions.*
I can take the first function out but it doesn't help me. It says it can only calculate in the same dataset, problem is these values can never co-exist in the same dataset. Anything I can do????
Thanks in advance