How to display values in the same line in Crystal Report - csv

I want to display result in crystal report in same line for example i have :
1.
G1
a b c
d e f
g h i
and i want :
G1
a b c d e f g h i

If you can fix the max number of fields per line:
Section expert
Details section
Format with multiple columns
Layout tab
Width = set the desired width of each column
Printing direction = across and down

Related

Design a super decoder using logic gates

Truth Table
I need to design a decoder using the table given and logic gates. I dont need a complete solution but an approach or headstart on this problem. Any help is appreciated.
Some quick tips when reading the table:
A = E
B = E
C = E and Q2
D = E and (Q1 or Q2)
E = E
F = E and Q1 and Q2
G = not C
This is not the only solution; it is also possible to use variable Q0.
It is a bit strange to have a variable and an output named E.

SSRS - grouping with ceiling

I'm creating a SSRS-report where I need to group my values and do another grouping based on the grouped values. Then I also want to limit the records on each row.
Now my table look like this (but with maybe 50 values):
A
A
A
B
C
C
D
E
E
F
(ignore the bullets, it was the only way to get the values vertical)
I want my table to fit in one page and become horizontal and be grouped.
The result I'm after look like this:
A, B, C,
D, E, F
I writing this in MDX because I need to have data direct from the cube.
I would have a great solution if i didn't have to group the values together.
It's was to use the ceiling-function (ceiling(rownumber(nothing) mod 6)) in ColumnGroup and (=ceiling(rownumber(nothing) / 6)) in RowGroup.
Has someone a solution, maybe a nested expression to both group the values and then do the ceiling trick?
Perhaps you can add a calculated field to the dataset, GroupID, with a value based on the position in the alphabet and your paging requirement.
For example :
Letter GroupID
A-F 1
G-L 2
M-Q 3
Next you can group similar to below.
Column Group 1 Expression = GroupID
Column Group 2 Expression = Letter
You may wish to place a page break after group for Group1 to force repeats on a new page.

Creating a relational database containing zip codes that need to be matched to 3 diffrent suppliers

I am trying to make a price comparison module in php which pulls records from a database the comparison module makes a calculation based on user input.
One of these inputs are the first 3 digits of the zip code, the zip code then gets matched with the correct variables in order to make the calculation. The variables being: gasregion (1, 2, 3, 4, 5, 6,7,8) energysupplier: (a, b, c, d, e, f, g, h) gassupplier:(a, b, c, d, e, f).
zipcodes can be matched in all possible combinations e.g.:
zipcode 334 could be gasregion 3, energysupplier b and gassuplier d
zipcode 335 could be gasregion 3, energysupplier c and gassuplier e
to make matters more confusing energysupplier a, b, c, d, e, f are the same as gassupplier: a, b, c, d, e, f only have diffrent tarrifs for gas and energy.
I know how to code the comparison module the diffculty for me is designing the database as i have little experince with relational databases.
Could anyone give me a nod in the right direction?
The simplest way (for the programmer) to do this is to build a 1000-row table, with each row containing columns like these.
zip3 gasregion energysupplier gassuplier
000 2 q r
001 3 a b
002 7 w x
...
999 1 a z
Then you can join this table to a possible customer table.

Access Crosstab Report Update Columns

I have a query running in MS Access which displays employees in the first column and then pivots the status of their training tasks in the remaining columns. Statuses are simply given as completed, not required or required as shown below:
Employee Computer Business Communication
=========================================
samiro05 C NR R
bobmarley NR NR C
einstein NR R R
With this query I can run a report and change the design to be better looking and conditionally formatted to highlight areas where training is required (R). If I add more people to the source tables along with their training I can press refresh on the report and it will add a new line for the employee name just as the crosstab query now has a new row for the new employee's training. However, if I add a new training task, say Science, and update the employees' training to include Science then my crosstab query looks like this:
Employee Computer Business Communication Science
=================================================
samiro05 C NR R C
bobmarley NR NR C NR
einstein NR R R C
sheldon C C R C
...but my report when refreshed looks like this:
Employee Computer Business Communication
=========================================
samiro05 C NR R
bobmarley NR NR C
einstein NR R R
sheldon C C R
Is there a way to get the columns of my crosstab query to change within my report as my crosstab query columns increase/decrease just by refreshing the report rather than having to create the whole report again each time I add a new training/each time a new column is added or taken away from my crosstab query?
Many thanks for any help you can give with this. I will add my thoughts on how to solve this in the comments below.

How to fill a column based on first column

I am making a mySQL table which lists ~70 products and information on whether they are compatible or not. For the sake of simplifying the question, I will pretend there were only four products.
Product1 Product2 Compatible?
A A Yes
A B No
A C Maybe
A D Yes
B A Yes
B B Yes
B C Yes
B D No
C A Yes
C B Maybe
C C Yes
C D Yes
D A Yes
D B No
D C Yes
D D Yes
If I already have a table like (every product is obviously compatible with itself)
Product1 Product2 Compatible?
A A Yes
B B Yes
C C Yes
D D Yes
Is there a way I can quickly fill out the first two columns so they follow the correct pattern? (so I dont have to be doing it manually)
One way to do this would be to use nested loops: If you know how many products you have, lets call it n products.
2^n total rows will be in your table. Additionally, product 1 will have each inventory item n times. (In your example 4 items, so 2^4 = 16 total rows and each item occurs in product1 column n=4 times.
Thus a nested loop can be achieved to do the insert...
$inventory = array(A, B, C, D);
for(i=0;i<2^n;i++){
for(j=0; j<n; j++){
//insert Column1=$inventory[i], Column2=$inventory[j];
}
}
Insert-After triggers!
And when inserting with phpMyadmin leave the column blank. let the trigger fill last column.
insert into compatibleProducts
select distinct p1.ProductID, p2.ProductID, 'Maybe'
from productTable p1
join productTable p2 on p1.ProductID <> p2.ProductID
I assumed that you already have them compatible with themselves, based on your second list.