Two different detail sections side-by-side with two different tables? - crystal-reports

I use two different excel files in one report. The columns of the excel files are stored in fields. I want to show the columns side-by-side:
Excel Data 1:
ID Name
1 Blub
2 Blub2
Excel Data 2:
ID Income
10 10134
20 134343
So the result should look like this:
ID Name ID Income
1 Blub 10 10134
2 Blub2 20 134343
I tried it with two different Detail sections (I have to use detail sections) and activate the overlaying of underneath sections for both detail sections.
The result looks like:
ID Name ID Income
1 Blub
2 Blub2
10 ....
20 ....
That is because we use a function model of BW that will give us the data back like this:
ExcelFile ID Name Income
1 1 Blub
1 2 Blub2
2 10 10134
2 20 134343
I can not use sub reports and cannot use single fields for each value because there are 100 cells in there...
Does anyone knows a solution?

You have to split your detail row vertically to do that. Something similar already solved by me here. Be careful when you width of data size.
If it doesn't help you enough, feel free to ask with additional questions.

I tried it:
Data looked like this:
After that it looked like this:
I did a Grouping on the names "GS_FC...." so there are two groups in the report. Than I put the Field which contains the name of the Excel File (GS..._TFCF and GS...._NFD) in the Detail section with this settings:
Is this the right thing to do?

Related

How can i get 2 or more SSRS tablix reasons to display on the same page including page breaks

im building a report that has multiple tablix in it and i am grouping each one by name. i want to display each table, grouped by the name so that all of the tables for a particular name are on the same page. for example on the first page of the report i should have something like:
name
address
city
bob
123 main st
los angeles
name
hobbies
age
bob
fishing
44
name
net worth
salary
bob
$2,400,000
$78,000
and then the second page of the report should have something like:
name
hobbies
age
felicia
54 gordon ct
atlanta
name
hobbies
age
felicia
yoga
33
name
net worth
salary
felicia
$750,000
$224,000
where the data for each of these tables comes from either one large query or multiple queries(I've tried it both ways). I have tried multiple approaches to solve this but the one that got me the closest was creating 3 separate subreports (each grouped by name and with page breaks) and putting them all in a main report. When i do this the main report does not respect the page breaks in the subreports and instead puts all of the data for each subreport in a clump like this:
name
address
city
bob
123 main st
los angeles
felicia
54 gordon ct
atlanta
I have also tried creating 3 separate tablixes and putting them one after another with page breaks but the tables dont show up on the same page, so i end up with everything on separate pages
I've tried tinkering with group settings and also tried to use rectangles but get the same output. Can this be done in SSRS?
There are a few ways to do this but my preference would be using a single sub report.
Create a report that takes 'name' as a parameter (e.g. pName). Build the report as normal so it handles just the data that relates to the name parameter, so make sure your dataset query only returns data for the 'pName' provided. Include all three tablixes and whatever else you want.
Test the report and then..
Create another report with a dataset that contains just a distinct list of the names you want to report on.
Add a tablix (table of list) to the report and set it's dataset to be the dataset containing the list of distinct names. This will generate one row per name. Inside the first textbox in the tablix, you need to insert a subreport. Go to the subreport properties, select the report you created at the start of this. In the subreport's parameters section set the pName parameter to the name field of the dataset.
Finally, in the rowgroups panel, go to the rowgroup properties (there will probably only a be a details row group- that's OK) and then set the pagebreak property to 'between each instance'
That should do it.

Print the Values from list in JasperReports version 3

I want to get the values from the list and show it in a tabular form. I m using sub reports. However, I am able to get the first row values from the list, i can't access the rest of the values.
I am using Ireports version 3.
Here is the Sub report:
The first row matches the Pojo fields. I need to print from second row, the other values from list.
However, The error shows that Cant' retrieve the value from material1....
As suggested in the prevoius comments, you should probably better understand how the detail band works.
The detail band iterates every "row" of your datasource, so unless you did something unconventional in your datasource, you just need a single field for every "column" in your datasource.
Basically, if your data source is something like:
Material Quantity Actual_Cost
AAA 100 5
BBB 200 10
CCC 150 7
DDD 50 8
Having 3 "columns" to show, you need only 3 fields in your detail band.
Running your report, you will get 4 rows (like your datasource should suggest you).
Thanx Fabio.
I solved my problem. It was a mistake at the java end. i didn't iterate through the list and set the values in the Hashmap. I set the values directly in the main report. ;)

Select value in table in tableau

I am quite new to Tableau, so have patience with me :)
I have two tables,
Table one (T1) contains all my data with the first row being Year-Week, like 2014-01, 2014-02, and so on. Quick question regarding this, how do I make Tableau consider this as a date, and not as string?
T1 contains a lot of data that looks like this:
YearWeek Spend TV Movies
2014-01 5000 42 12
2014-02 4800 41 32
2014-03 2000 24 14
....
2015-24 7000 45 65
I have another table (T2) that contains information regarding some values I want to multiply with the T1 columns, T2 looks like:
NAME TV Movies
Weight 2 5
Response 6 3
Ad 7 2
Version 1 0
I want to create a calculated field (TVNEW) that takes the values from T1 of TV, and adds Response(TV) to it, and times it with the weight(TV),
So something like this:
(T1[TV]+T2[TV[Response]])*T2[TV[Weight]]
This looks like this for the rows:
(42+6)*2
(41+6)*2
(24+6)*2
...
(45+6)*2
So the calculation should take a specific value from T2, and do the calculation for each value in T1[TV]
Thanks in advance
The easy answer to your question will be: No, not natively.
What you want to do sounds like accessing a 2 dimensional array and that's not really the intention of Tableau. Additionally you have 2 completely independent tables without a common attribute to JOIN on. Tableau is just not meant to work that way.
I cannot think of a way to dynamically extract that value (I assume your example is just that, an example; and in your case you don't just use two values in the calculation, otherwise you could create 2 parameters that you can use in your calculated fields)
When I look at your tables it looks like you could transpose and join them that they ideally look like this: (Edit: Comment says transposing is not an option)
Medium Value YearWeek Spend
Movies 12 2014-01 5,000
Movies 32 2014-02 4,000
Movies 14 2014-03 2,000
Movies 65 2015-24 7,000
TV 42 2014-01 5,000
TV 41 2014-02 4,000
TV 24 2014-03 2,000
TV 45 2015-24 7,000
and
Medium Weight Response Ad Version
TV 2 6 7 1
Movies 5 3 2 0
Depending on the systems you work with you could already put it in one CSV or table so you wouldn't have to do a JOIN in Tableau.
Now you can create the first table natively in Tableau (from Version 9.0 onwards), if you open your data source, in the Data Source Preview choose the columns TV and Movies, click on the small triangle and then on Pivot. (At this point you can also choose the YearWeek column click on the triangle and Split to create a seperate field for Year and Week. You won't be able to assign the type date to it put that shouldn't give you any disadvantages.)
For the second table I can think of two possibilities:
you have access to a tool that can transpose your table (Excel can do that see: Convert matrix to 3-column table ('reverse pivot', 'unpivot', 'flatten', 'normalize') Once you have done that you can open it in Tableau and join the two tables on Medium
You could create calculated fields depending on the medium:
Field: Weight
CASE [Medium]
WHEN 'TV' THEN 2
WHEN 'Movies' THEN 5
END
And accordingly for Response, Ad and Version
Obviously that is only reasonable if you really just need a handfull of values.
Once this is done it's only a matter of creating a calculated field with
([Value]+[Response])*[Weight]
And this will calculate all the values for your table

How to group depending on values in Crystal Reports?

I have a bunch of data about people attended or unattended, and I want to sepparate them. In one column I have '0' for unattended people, and some number for the attended ones. How can I show that in a report? I want a pie chart that divides them, and I've spent many hours in this, I don't even know how to search about it and I have almost no experience with Crystal Reports.
I've tried making two summarize formulas for acumulated totals like this (the other one looks almost the same):
StrCmp(ToText({table.Atendido}),"0") <> 0
But I can't use that in a pie chart. And it doesn't even stores the data as it supposed to do, in my data I have 8 unattended, 1 attended. This formula gives me 9 as result.
Any help is greatly apreciated, thanks!
My data looks like this:
IDPerson Person Attended
1 John 0
2 Mary 0
3 Graves 1
4 Paula 0
In the report I need:
Who was attended (list of people)
A pie chart of attended, unattended with percentages and all
If I group by Attended, the groups form like this:
There will be many groups of numbers > 0, I just need groups sepparated by:
attended = 0
attended != 0
I hope i understand your question but if you group on Attended then you should be able to get what you want with count functions.
I was over complicating it, because I'm inexperienced and in a hurry...
I made a formula to separate both values:
if tonumber({PacientesAtendidosYNoAtendidos.Atendido}) = 0 then 0 else 1
Then, I just grouped by that. Very silly, indeed.

Variable Number of Plots in an MS Access Chart

I have the following problem with MS Access:
Suppose I have a list of companies with monthly performance values. I can view the performance of a single company in a chart by hooking the chart into a query with a Month column and a Performance column.
Now suppose I want to display a chart for N companies. I could theoretically do this if I were to generate a query with a Month column and N Performance columns (one for each company). Is there any way to create a query with a variable column count like this? I have a SQL backend that I can use if necessary, and I'm fine with putting together any VBA code necessary to support it. The only impediment I'm seeing is that I'm stuck using MS Access, which I am not very familiar with.
So here are my main questions:
Is this even possible?
How would I go about tackling this issue? I'm trying to minimize research time, so it would be great if I could just get pointed in the right direction.
Thanks!
With this table:
company pmonth performance
1 1 10
2 1 8
3 1 15
1 2 15
2 2 5
3 2 25
1 3 5
2 3 4
3 3 20
I create this query:
SELECT p.company, p.pmonth, p.performance
FROM MonthlyPerformance AS p;
Then change the query to PivotChart View and drag company field to "Drop Series Fields Here", drag pmonth to "Drop Category Fields Here", and drag performance field to "Drop Data Fields Here".
If you prefer, you can create a form using the same query SQL as its data source, then set the form's Default View to PivotChart, and set up the chart the same way as I did for PivotChart view on the query.
If that's not what you want, give us some more information about the type of chart you want and the context in which you will display it.