Groups and Multi Column Reports
I'm using CR for .Net 2003. I've been running into a problem with the grouping feature, where groups are spanning multiple columns and are not being kept together, but only when spanning b/w columns. However, the groups aren't being broken between pages. Anyone else running into this? Here's my setup:
Page Header
Group Header
Details
Group Footer
Page Footer
The "Group Header", "Details" and "Group Footer" are all set to Keep Together in the Selection Expert. The layout of the "Details" section has "Format Groups with multiple Columns" checked. (I only have two columns) And my group options has the option "Keep Group Together" selected.
I was under the impression that if I have "Keep Group Together" it would keep the group together regardless of an end of page, or an end of column...but, maybe I have something misconfigured.
advTHANKSance for any help!
Confirm version of Crystal Reports and version of .NET.
Also, have you applied any Service Packs to your version of CR?
Ludek
Similar Messages
-
Multi Column Report - printing Across and then Down
Is there any setup option for a multi column report to go across and then down instead of down & across as a default. The problem I am experiencing is that some where and some how the two columns are not horizontally aligned properly - neither in the
report view nor in the exported PDF.
The added difficulty is the problems created by this misaligned labels while printing on a custom paper that is smaller in size. Though I can setup the custom dimensions and get the desired 4x2 labels on the screen the printing doesn't sit in proper places
on a preformatted paper.
Is there any solution(s). Thanks in advance.Hi Christal,
Based on my understanding, you want to make multi columns go across then down in the report.
For your requirement, on query level, we should add an additional field(DisplayColumn) in the dataset, the field indicates the column in which the corresponding records will display. When designing a report, we add a group in the report, then insert some
tablixes into the detail row. Within the nested tablix, we specify filter expression based on the value of DisplayColumn field. So that we can decide which data should display on which column. When previewing the report, you can find the report displays like
newsletter-style. Besides, if we design the report like this, the report can supports all renders. For detail information about how to design the report step by step, please refer to this article:
Creating Multiple-Column Reports [SSRS] .
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
I am using the Crystal Reports edition bundled with Visual Studio 2005. I have a problem with a multi-column report. It is a two column member directory with family members. It lists the member name, contact info, spouse, and children. I want each family group to stay together, and not break cross a column or a page. Each group may have from 3 to a dozen or so lines.
The family groups will not break across a page (which is good), but they will break across a column (bad). I have tried many combinations of settings to make this work without success.
So I wonder if anyone has seen and resolved this problem, or if perhaps it works better in the full version of Crystal.In some sub-sections, I have checked 'Suppress Blank Section' checked. In others, I have a suppression formula.
Each section has only a single field.
The record set that the report uses has a single row for each person. The sorting and grouping is arranged so that the first record in each family group is the 'main' member. The report displays this person's name, and also shows the sections which include address and phone number info. Subsequent records are for family members (spouse and/or children). For these records, I display the name, but suppress the address and phone sections.
There is also a detail sub-section used as a group header. This group breaks when the first letter of the last name changes, so it an display a single letter heading ("A"). I had tried this as a regular group header too, but it didn't help.
I have tried combining all the sections into a single one with each field on a separate line (which means the section can have some blank space), and also combined into a text box. No luck.
I also have the group itself set to "Keep Together' in the group expert. Doesn't help/ -
Helllo,
I"m using Application Express 3.1.2.00.02
I want to do a 3 columned report.
I just saw this thread ( from 2005 - that's why I started a new)
Multi-columned report
When I applied the template to my report region, I got the following error:
ERR-1025 Erreur lors du traitement de l'expression PL/SQL. mod(1,3)0
Can someone tell me why?
thanks,
Roseline
My Query - select ename from emp
The template I created step by step:
Create a report row template....
Workspace>Builder-Application>Shared Components>Themes>Templates...Create
Template Type: Report
Creation Method: From Scratch
Name: One Field - Three Column
Theme: your choice
Template Class: Standard
Template Type: Named Column (row template)
Edit the report Template you just created and modify the following:
Row Template 1: <td width="150">#1#</td>
Row Template Condition: Use Based on PL/SQL Expression
Row Template 1 Expression: mod(#ROWNUM#,3)0
Row Template 2: <td width="150">#1#</td></tr><tr>
Row Template Condition: Use Based on PL/SQL Expression
Row Template 2 Expression: mod(#ROWNUM#,3)=0
Before Rows: <tr>
After Rows: </tr>
Create a query based report region. For my test I used "select ename from emp". Have the report use the row template.
This is just a quick and dirty sample. For better look and feel you'll need to do your own formatting...Yes, that's it.
However, that I SEE is only 4 name ( every 3 name of the list) on the same line:
ENAME WARD ENAME BLAKE ENAME KING ENAME JAMES
1 - 14 But when I cut and paste from Internet Explorer to a text file,m=, even if I see all the result on the same line, when I past it, it's formated :
ENAME WARD
ENAME BLAKE
ENAME KING
ENAME JAMES
1 - 14
I have 14 results in my database:
In My SQL
select * from emp
EMPNO ENAME JOB MGR SAL DEPTNO
7369 SMITH CLERK 7902 800 20
7499 ALLEN SALESMAN 7698 1600 30
7521 WARD SALESMAN 7698 1250 30
7566 JONES MANAGER 7839 2975 20
7654 MARTIN SALESMAN 7698 1250 30
7698 BLAKE MANAGER 7839 2850 30
7782 CLARK MANAGER 7839 2450 10
7788 SCOTT ANALYST 7566 3000 20
7839 KING PRESIDENT - 5000 10
7844 TURNER SALESMAN 7698 1500 30
7876 ADAMS CLERK 7788 1100 20
7900 JAMES CLERK 7698 950 30
7902 FORD ANALYST 7566 3000 60
7934 MILLER CLERK 7782 1300 10
What I would like, is having this display:
SMITH ALLEN WARD
JONES MARTIN BLAKE
CLARK SCOTT KING
TURNER ADAMS JAMES
FORD MILLER
How can I modify the template?
thanks again Roseline -
Context v catsearch and multi-column scoring
hi everybody-
i'm a newbie to text search. need to eval oracle text and lucene for our application.
the docs aren't answering my questions, and i have done some searching here, but no luck.
here is our app.
DATA
we have a database of genes (for the malaria parasite). it is like a catalog of genes. however, like many other catalogs these days, we have commentary, which we store in clobs. so, most fields are short but a couple are clobs.
QUERYING
it seems to me that we would be very well served by the google model: the user types one or more words, and the results are ranked.
(a) i don't see the need for boolean or NEAR. like google, a simple rule should hold: the more words that are matched, the better. the closer together the better. i would like a score that indicates how good the match is, based on these criteria.
- does oracle text have an implementation of this?
- if not, how can i do it?
(b) we will be searching many columns, presumably each with its own CONTAINS query. they need to be ranked. i think that if the score returned by contains can reflect the rules in (a) then i can do all the ranking i need by just multiplying each contains by a ranking. (this seems simpler for our needs than the very confusing solutions described in this thread: Re: Multi column with CONTEXT index and ranking
(c) because i want to search multiple columns, and because some of them are clobs, am i correct in thinking this will force me to go uniformly with CONTAINS instead of somehow mixing CATSEARCH (for the small columns) and CONTAINS (for the clobs) in one sql query?
thanks much,
steve(1) in the template query you show above, can i do
the trick where i multiply each different WITHIN by
a weight for that field?Yes, I demonstrated that by multiplying the within clause for commentary1 by 2.
(2) i am looking at SNIPPET now as well. would i
be able to pass the complex query template into the
text_query param of CTX_DOC.SNIPPET?No, The progressive query relaxation uses a query template and according to the documenteation:
"CTX_DOC.SNIPPET does not support the use of query templates."
However, you can use the query with the progressive query relaxation template to find
the rows you want and rank them by score, then use ctx_doc.snippet to mark the
words and get the surrounding words, as demonstrated below. It may be a little hard to
view, as the marking of the words conflicts with some of the formatting on this forum.
SCOTT@orcl_11g>
SCOTT@orcl_11g> CREATE TABLE malaria_catalog
2 (gene VARCHAR2 (5),
3 commentary1 CLOB,
4 commentary2 CLOB)
5 /
Table created.
SCOTT@orcl_11g> INSERT ALL
2 INTO malaria_catalog VALUES ('gene1',
3 'This is a little bit longer entry with word1 followed by word2 and word3 to demonstrate the snippet function.',
4 'This is a second line with word1 word2 word3 in commentary2.')
5 SELECT * FROM DUAL
6 /
1 row created.
SCOTT@orcl_11g> BEGIN
2 CTX_DDL.CREATE_PREFERENCE ('your_datastore', 'MULTI_COLUMN_DATASTORE');
3 CTX_DDL.SET_ATTRIBUTE ('your_datastore', 'COLUMNS', 'gene, commentary1, commentary2');
4 CTX_DDL.CREATE_SECTION_GROUP ('your_sec_group', 'BASIC_SECTION_GROUP');
5 CTX_DDL.ADD_FIELD_SECTION ('your_sec_group', 'commentary1', 'commentary1', TRUE);
6 CTX_DDL.ADD_FIELD_SECTION ('your_sec_group', 'commentary2', 'commentary2', TRUE);
7 END;
8 /
PL/SQL procedure successfully completed.
SCOTT@orcl_11g> CREATE INDEX your_index ON malaria_catalog (gene)
2 INDEXTYPE IS CTXSYS.CONTEXT
3 PARAMETERS
4 ('DATASTORE your_datastore
5 SECTION GROUP your_sec_group')
6 /
Index created.
SCOTT@orcl_11g> VARIABLE search_string VARCHAR2 (100)
SCOTT@orcl_11g> EXEC :search_string := 'word1 word2 word3'
PL/SQL procedure successfully completed.
SCOTT@orcl_11g> EXEC CTX_DOC.SET_KEY_TYPE ('ROWID')
PL/SQL procedure successfully completed.
SCOTT@orcl_11g> COLUMN snippet FORMAT A60
SCOTT@orcl_11g> SELECT SCORE (1),
2 CTX_DOC.SNIPPET
3 ('YOUR_INDEX',
4 ROWID,
5 REPLACE (:search_string, ' ', ' OR ')) AS snippet
6 FROM malaria_catalog mc
7 WHERE CONTAINS
8 (gene,
9 '<query>
10 <textquery lang="ENGLISH" grammar="CONTEXT">
11 <progression>
12 <seq>'
13 || '(' || REPLACE (:search_string, ' ', ' NEAR ') || ' WITHIN commentary1) * 2 OR '
14 || REPLACE (:search_string, ' ', ' NEAR ') || ' WITHIN commentary2' ||
15 '</seq>
16 <seq>'
17 || '(' || REPLACE (:search_string, ' ', ' ACCUM ') || ' WITHIN commentary1) * 2 OR '
18 || REPLACE (:search_string, ' ', ' ACCUM ') || ' WITHIN commentary2' ||
19 '</seq>
20 </progression>
21 </textquery>
22 <score datatype="INTEGER" algorithm="COUNT"/>
23 </query>',
24 1) > 0
25 ORDER BY SCORE (1) DESC
26 /
SCORE(1) SNIPPET
67 is a little bit longer entry with <b>word1</b> followed by <
b>word2</b> and <b>word3</b> to demonstrate the snippet func
tion<b>...</b>line with <b>word1</b> <b>word2</b> <b>word3</
b> in commentary2
SCOTT@orcl_11g> -
SWT table widget and multi column sorting
Hello,
I want to make the standard SWT table widget support multi column sorting.
Searching on the web didn't lead to useful results. The Nebula project should be the last option.
I guess I need a comparator chain, but how do I realize aspects like let columns appear blue when marked or mark multiple columns by pressing shift key and left mouse button?
Any examples are much appreciated.
Thank you very much!
Regards,
MickHello,
I want to make the standard SWT table widget support multi column sorting.
Searching on the web didn't lead to useful results. The Nebula project should be the last option.
I guess I need a comparator chain, but how do I realize aspects like let columns appear blue when marked or mark multiple columns by pressing shift key and left mouse button?
Any examples are much appreciated.
Thank you very much!
Regards,
Mick -
Changing details layout for a multi column report
I have a report that contains linked 2 subreports. The report has a details layout width of 2.5 inches which will create a 3 column report (Format groups with multiple columns is checked) . This works fine for my first subreport as it is small enough to fit that width. However that isn't enough room for my second sub report. Ii need to change the details layout width from 2.5 inches to 3.5 for a 2 column report then back again when that section is finished. Is this possible?
i believe you can depends on where you place you subreports
insert a 2nd group under the first, place 2nd report in the new details section
in the section expert next to the details section check off underlay.
this will lay them out next to each other but grow independetly -
Multi Columns Report Switch replacement
Hi, I have a multiple columns report with 2 fix columns and 10 selectable ones.
I'm selecting the columns with a checklistbox an it works
The Header is easy just have to put "=Parameters!Columns.Label(0-10)" as an expression in each columns heading
The hard part that I'm not getting is that I'm currently using a Switch statement in the fields values and I want to put it into Custom Code.
Why Custom Code is that I was ask to insert 15 other fields value in my selection list. I just don't want to be ask to add more fields x 10 columns.
Here's part of my Switch, I have 10 of them (0-10) for each columns.
=Switch(Parameters!Columns.Value(0)="Phone"
,Fields!Phone.Value,
Parameters!Columns.Value(0)="FirstTime"
,SSRS.Utility.TimeFromMilliSeconds(Fields!RingTime.Value),
Parameters!Columns.Value(0)="ProcessTime"
,SSRS.Utility.TimeFromMilliSeconds(Fields!ProcessTime.Value),
Parameters!Columns.Value(0)="TalkTime"
,SSRS.Utility.TimeFromMilliSeconds(Fields!TalkTime.Value),
Parameters!Columns.Value(0)="Transferred"
,Fields!Transferred.Value)
Notes that some of the fields are FIELDS and others are call in function (assembly's)
Here's one of my many variation of custom code
Public Shared Function FixColumns(Byref Colonne as String) As String
SELECT CASE Colonne
CASE "Phone"
Return "Fields!Phone.Value"
CASE "FirstTime"
Return "SSRS.Utility.TimeFromMilliSeconds(Fields!RingTime.Value)"
END SELECT
End Function
in the value columns fields
=CODE.Fixcolumns(Parameters!Columns.Label(0))
I would greatly appreciate any help
Denis B.Hi Denis B,
If I understand correctly, you want to use custom code replace Switch expression in your report. Please refer to the following custom code:
Public Shared Function FixColumns(Byref Colonne as String, A as String, B as String, …… , F AS String) as String
Select Case Colonne
Case "Phone"
Return A
Case "FirstTime"
Return B
Case Else
Return F
End Select
End Function
Then, we can use following expression to calculate the values:
=CODE.Fixcolumns(Parameters!Columns.Label(0), Fields!Phone.Value, SSRS.Utility.TimeFromMilliSeconds(Fields!RingTime.Value), …… , Fields!Transferred.Value)
As per my understanding, Return Statement in a Function, Get, or Operator must return a value, we cannot return an expression via custom code. So, we use this fields or assembly as a variable in the custom code.
Hope this helps.
Regards,
Alisa Tang
If you have any feedback on our support, please click
here.
Alisa Tang
TechNet Community Support -
Group and workspace Participant report
I've a large beehive group for a customer with many participants and workspaces. I need to generate a report for all participants in the group with details of what access they have to each workspace. Is there any easy way to do this?
ThanksHi,
Go to https://beehiveonline.oracle.com/BOLAdmin.html - navigate to the "My Managed Workspaces" > click on the Workspace and there is a grey button which will generate a Workspace membership report.
Phil -
Multi-column report that repeats columns
I don't know if this is possible:
COL A | COL B | COL C | COL A | COL B | COL C
1 | 2 | 3 | 4 | 5 | 6
7 | 8 | 9 | 10 | 11 | 12
So it would be a report being pulled from a single table, but the columns would be repeated across the page.
Has anyone ever done something like that?Okay, firstly, the column titles can be defined any way you want except that they have to be unique names. This is called "aliasing" the columns.
select colA as A1, colB as B1, colC as C1, colA as A2, colB as B2, colC as C2
from my_table
...What I am struggling with is the fact that you seem to have 12 distinct values (ostensibly coming from 12 distinct columns), so why would you want to show the same column name repeatedly?
If you are trying to combine information from several columns but place them in different rows, you can use a union and sort in this manner:
select A1, B1, C1, A2, B2, C2
from (
select ID, 1 as SORT_BY, colA as A1, colB as B1, colC as C1, colD as A2, colE as B2, colF as C2
from my_table
union
select ID, 2 as SORT_BY, colG as A1, colH as B1, colJ as C1, colK as A2, colM as B2, colN as C2
from my_table
order by ID, SORT_BYCan you give us an example of a record to go with the output? -
Grouping and input columns ALV
HI ,
my requirement is to group the columns that have same value in my ALV ( like fonction sort/subtotal in standard ALV) and have other input coloums in my ALV .
I observe that groupement don't work if have one of columns as input .
have you any idea to have on the same time grouping fonction and other iput columns , on my ALV grid
thanksThere is a layout property cell_merge in ALV layout. You can try with that. But not sure whether it works with a editable column.
Kesav -
Hi,
I am newbie in Crystal report. I stuck into a design problem of crystal report. I would like to design a report as per the desired-report.png (attached).
My dataset is like report2.xml and relationship specified in relationship-diagram.png (attached)
The problem is crystal report make the Cartesian product of these two table which result in several rows. I am using .Net windows application to build this report.
Could anyone please suggest how to design this type of report ?This is the desired report format
Id
StoneDescription
Rate
Weight
Value
Carat
Id2
Metal
Rate3
Weight4
Value5
1
Diamond
0.35
0.07
4375
0.35
1
Loose Diamond
0
0
0
2
Diamond
1.15
0.23
15525
1.15
2
Silver Utensils
48
20550
976125
3
Diamond
4.25
0.85
63750
4.25
3
Gold 18K
2250
103.21
232223
4
Diamond
0.8
0.16
12800
0.8
4
Gold 22K
2750
204.3
561825
5
Diamond
0.2
0.04
3300
0.2
5
Sovereign
2810
88
247280
6
Diamond
1
0.2
17000
1
7
Diamond
9.43
1.89
165025
9.43
8
Diamond
0.5
0.1
9000
0.5
9
Diamond
1.7
0.34
127500
1.7
This is the Cartesian product what I am getting in report. For example every diamond row is multiplied to metal rows. As shown in example below-
Id
StoneDescription
Rate
Weight
Value
Carat
Id2
Metal
Rate3
Weight4
Value5
1
Diamond
0.35
0.07
4375
0.35
1
Loose Diamond
0
0
0
2
Diamond
1.15
0.23
15525
1.15
1
Loose Diamond
0
0
0
3
Diamond
4.25
0.85
63750
4.25
1
Loose Diamond
0
0
0
4
Diamond
0.8
0.16
12800
0.8
1
Loose Diamond
0
0
0
5
Diamond
0.2
0.04
3300
0.2
1
Loose Diamond
0
0
0
6
Diamond
1
0.2
17000
1
1
Loose Diamond
0
0
0
7
Diamond
9.43
1.89
165025
9.43
1
Loose Diamond
0
0
0
8
Diamond
0.5
0.1
9000
0.5
1
Loose Diamond
0
0
0
9
Diamond
1.7
0.34
127500
1.7
1
Loose Diamond
0
0
0
1
Diamond
0.35
0.07
4375
0.35
2
Silver Utensils
48
20550
976125
2
Diamond
1.15
0.23
15525
1.15
2
Silver Utensils
48
20550
976125
3
Diamond
4.25
0.85
63750
4.25
2
Silver Utensils
48
20550
976125
4
Diamond
0.8
0.16
12800
0.8
2
Silver Utensils
48
20550
976125
5
Diamond
0.2
0.04
3300
0.2
2
Silver Utensils
48
20550
976125
6
Diamond
1
0.2
17000
1
2
Silver Utensils
48
20550
976125
7
Diamond
9.43
1.89
165025
9.43
2
Silver Utensils
48
20550
976125
8
Diamond
0.5
0.1
9000
0.5
2
Silver Utensils
48
20550
976125
9
Diamond
1.7
0.34
127500
1.7
2
Silver Utensils
48
20550
976125
1
Diamond
0.35
0.07
4375
0.35
3
Gold 18K
2250
103.21
232223
2
Diamond
1.15
0.23
15525
1.15
3
Gold 18K
2250
103.21
232223
3
Diamond
4.25
0.85
63750
4.25
3
Gold 18K
2250
103.21
232223
4
Diamond
0.8
0.16
12800
0.8
3
Gold 18K
2250
103.21
232223
5
Diamond
0.2
0.04
3300
0.2
3
Gold 18K
2250
103.21
232223
6
Diamond
1
0.2
17000
1
3
Gold 18K
2250
103.21
232223
7
Diamond
9.43
1.89
165025
9.43
3
Gold 18K
2250
103.21
232223
8
Diamond
0.5
0.1
9000
0.5
3
Gold 18K
2250
103.21
232223
9
Diamond
1.7
0.34
127500
1.7
3
Gold 18K
2250
103.21
232223
1
Diamond
0.35
0.07
4375
0.35
4
Gold 22K
2750
204.3
561825
2
Diamond
1.15
0.23
15525
1.15
4
Gold 22K
2750
204.3
561825
3
Diamond
4.25
0.85
63750
4.25
4
Gold 22K
2750
204.3
561825
4
Diamond
0.8
0.16
12800
0.8
4
Gold 22K
2750
204.3
561825
5
Diamond
0.2
0.04
3300
0.2
4
Gold 22K
2750
204.3
561825
6
Diamond
1
0.2
17000
1
4
Gold 22K
2750
204.3
561825
7
Diamond
9.43
1.89
165025
9.43
4
Gold 22K
2750
204.3
561825
8
Diamond
0.5
0.1
9000
0.5
4
Gold 22K
2750
204.3
561825
9
Diamond
1.7
0.34
127500
1.7
4
Gold 22K
2750
204.3
561825
1
Diamond
0.35
0.07
4375
0.35
5
Sovereign
2810
88
247280
2
Diamond
1.15
0.23
15525
1.15
5
Sovereign -
How to combine update stmts with different filters and multi-columns?
Hi,
I found these following update stmts in one of our long running jobs. I'd like to see if it is possible to combine it in one update or merge stmt so I can reduce the scan time on the same table from 4 times to 1 time. But I'd need some expert suggestions for how to do that. Here are the stmts:
UPDATE table1 c
SET (polnum,polren,polseq,vehnum,
compgrp,prodgrp,uwsys,comp,
state,prod,rrdate,brand,
agycode,AGYCLASS,valid)=(SELECT DISTINCT polnum,polren,polseq,vehnum,
compgrp,prodgrp,uwsys,comp,
state,prod,rrdate,brand,
agycode,AGYCLASS,'A'
FROM table2 v
WHERE v.polnum=c.pol# AND
v.polren=c.ren# AND
v.polseq=c.seq# AND
v.vehnum=c.veh#)
WHERE c.polnum IS NULL;
UPDATE table1 c
SET (polnum,polren,polseq,vehnum,
compgrp,prodgrp,uwsys,comp,
state,prod,rrdate,brand,
agycode,AGYCLASS,valid)=(SELECT DISTINCT polnum,polren,polseq,vehnum,
compgrp,prodgrp,uwsys,comp,
state,prod,rrdate,brand,
agycode,AGYCLASS,'B'
FROM table2 v
WHERE v.polnum=c.pol# AND
v.polren=c.ren# AND
v.polseq=c.seq# AND
v.mainveh='Y')
WHERE c.polnum IS NULL;
UPDATE table1 c
SET (polnum,polren,polseq,vehnum,
compgrp,prodgrp,uwsys,comp,
state,prod,rrdate,brand,
agycode,AGYCLASS,valid)=(SELECT DISTINCT polnum,polren,polseq,vehnum,
compgrp,prodgrp,uwsys,comp,
state,prod,rrdate,brand,
agycode,AGYCLASS,'C'
FROM table2 v
WHERE v.polnum=c.pol# AND
v.polren=c.ren# AND
v.polseq=0 AND
v.mainveh='Y')
WHERE c.polnum IS NULL;
UPDATE table1 c
SET (polnum,polren,polseq,vehnum,
compgrp,prodgrp,uwsys,comp,
state,prod,rrdate,brand,
agycode,AGYCLASS,valid)=(SELECT DISTINCT polnum,polren,polseq,vehnum,
compgrp,prodgrp,uwsys,comp,
state,prod,rrdate,brand,
agycode,AGYCLASS,'D'
FROM table2 v
WHERE v.polnum=c.pol# AND
v.polren=0 AND
v.polseq=0 AND
v.mainveh='Y')
WHERE c.polnum IS NULL;
Table1 has 800000 rows, Table2 has 200 million rows. In table1, about 12.5% rows has a null polnum, so 12.5% data will be updated.
Thank you in advance with all your suggestions!the reason I never specified the joins is because I thought the joins were there to derive the Valid indicator, in which case they are not required if you are using the CASE statement. The join, "V.Polnum = C.Pol#" is still required as this is across all rows! If that is the case, then it can be simplified even more so;
update Table1 C
set (Polnum,Polren,Polseq,Vehnum,Compgrp,Prodgrp,Uwsys,Comp,State,Prod,Rrdate,Brand,Agycode,Agyclass,Valid) =
( select distinct Polnum
,Polren
,Polseq
,Vehnum
,Compgrp
,Prodgrp
,Uwsys
,Comp
,State
,Prod
,Rrdate
,Brand
,Agycode
,Agyclass
,case
when (Polren + Polseq=0) and (Mainveh='Y') then
'D'
when (Polren=0) and (Polseq>0) and (Mainveh='Y') then
'C'
when (Polren>0) and (Polseq>0) and (Mainveh='Y') then
'B'
when (Polren>0) and (Polseq>0) and (Mainveh!='Y') then
'A'
end as Valid
from Table2 V
where V.Polnum = C.Pol#
where C.Polnum is null;However if you are returning more rows than what you are expecting from the above update statement because the joins are being used to limit the data as well, then this might be more appropriate:
update Table1 C
set (Polnum,Polren,Polseq,Vehnum,Compgrp,Prodgrp,Uwsys,Comp,State,Prod,Rrdate,Brand,Agycode,Agyclass,Valid) =
( select v2.PolNum
,v2.Polren
,v2.Polseq
,v2.Vehnum
,v2.Compgrp
,v2.Prodgrp
,v2.Uwsys
,v2.Comp
,v2.State
,v2.Prod
,v2.Rrdate
,v2.Brand
,v2.Agycode
,v2.Agyclass
,case
when (v2.Polren + v2.Polseq=0) and (v2.Mainveh='Y') then
'D'
when (v2.Polren=0) and (v2.Polseq>0) and (v2.Mainveh='Y') then
'C'
when (v2.Polren>0) and (v2.Polseq>0) and (v2.Mainveh='Y') then
'B'
when (v2.Polren>0) and (v2.Polseq>0) and (v2.Mainveh!='Y') then
'A'
end as Valid_Flag
( select distinct Polnum
,Polren
,Polseq
,Vehnum
,Compgrp
,Prodgrp
,Uwsys
,Comp
,State
,Prod
,Rrdate
,Brand
,Agycode
,Agyclass
,Mainveh
from Table2 V
where V.Polnum = C.Pol#
) v2
where (v2.Polren = C.Pol# or v2.Polren = 0)
and (v2.Polseq = C.Seq# or v2.Polseq = 0)
where C.Polnum is null;As before, both remain UNTESTED! -
Formatting a multi-block report
I am having trouble with formatting a multi-block report. For some reason, when I get to the second page - the builder automatically starts putting in extra white space at the top of each page thereafter which really throws off my formatting.also, for one of the blocks, the builder puts each record onto its own page. does anyone have any suggestions?
i was unable to resolve the issue -
it is as follows
i am creating a complex report that includes several different reports and graphs - so the report that i am referring to had to be created manually -
it is a manually created group above report -
the group above works nicely - but between each group there is a page break -
although there is no page break between the last group and the next report block. -
Group and Owner fields blank when viewing Service Request results via UWQ
When looking at a row that represents a service request in either the UWQ or View Service Requests (search form) the group and owner columns are blank only for some of my users.
If you look at the detail for the SR, there is a owner and group.
Not sure what the issue is..? Inherited this role.
-JPWhich release is this occuring? At the first glance it looks like an issue that cropped up in 11.5.3. and has been fixed since.
Maybe you are looking for
-
How do I set Safari to prompt me to choose a filename when downloading?
I can't figure this out at all. How do I set Safari to give me a dialog box in which I can choose my own filename when downloadiing a file? Right now, as soon as I click "download linked file" it just puts the files straight on my desktop with whatev
-
I have an external hard drive that I used with my mini mac. I want to use it on my MacBookPro. I plugged it in found it on my computer, it flashes seemed okay until it tipped over and came unplugged to the computer. I set it back up turned it on
-
How do you create sprite reference in javascript format?
I am a flash developer who is new to director. I am using java script syntax. I have done a bit of looking around with no luck, I assume I am missing something obvious. I declare a global array and try to add sprite references to it. Basically like I
-
Is there a substitute for Silverlight for the i pad 2
Is there a substitute for Silverlight for the i pad 2 I use an AP on MSN Money hat reuires Silverlight
-
Hi, I have installed Solution Manager 7.0, can anyone guide me configuring the same in monitoring our ECC 5.0 system. Thanks & Regards, Prashanth