Diagonal line fill in table
I have just opened a calendar template I made last year. I put in diagonal line fills for some of the cells. I cant remember or find how to return the cell to being empty.
Any ideas anyone??
Many thanks
Select the cell. Go to the Diagonal Line option in the cells dialog. Select a line width of 0 pt, a line color of [None], or a line style of [None]. Or simply select the "No diagonal" button in the top row :-)
Similar Messages
-
How to make the diagonal line in the swing table cell?
Hi all,
How to make the diagonal line in the swing table cell just like the link below?
http://61.132.17.188/webber/table.gifOne improvement.. To get a line that is neat, use a bit of Graphics2D
public void paintComponent(java.awt.Graphics g)
int w = getSize().width;
int h = getSize().height;
// draw a line between (0,0) and (w,h)
g.setColor(getForeground());
if (strTop == null)
strTop = " ";
if (strBottom == null)
strBottom = " ";
java.awt.Graphics2D g2 = (java.awt.Graphics2D)g;
g2.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
//g2.setStroke(new java.awt.BasicStroke(14.0f));
g.drawLine(0, 0, w, h);
//the following lines will draw the two strings,
//one above the top of the line and the above below it.
g2.drawString(strTop, (w/2)+2, (h/2)-2);
g2.drawString(strBottom, 2, (h / 2) + 2);
//the x,y for drawString are only based on assumption. //do necessary changes to suit ur needs.
}Then create a TableCellRenderer and set it to the Table Header for ur table's 1st row.....
Cheers -
How to fill listbox for some lines in a table control
I have a table control associated to a database table. I would like to enable several lines in the table control for the user to input data. I have a field defined as a listbox with key. In PBO -> I fill the listbox based on the value of field u201CAu201D. I execute a select using value of field u201CAu201D.
If I maintain module tc_zmovi_wm_change_tc_attr OUTPUT as the wizard created it:
MODULE tc_zmovi_wm_change_tc_attr OUTPUT.
DESCRIBE TABLE i_zmov_wm LINES tc_zmovi_wm-lines.
ENDMODULE.
I have no problem with the listbox ( it is filled normaly) but user has a unique line enabled in the table control to input data.
If I change the module in this way:
MODULE tc_zmovi_wm_change_tc_attr OUTPUT.
DATA: v_lineas type i.
tc_zmovi_wm-lines = v_lineas + 10.
ENDMODULE.
There are 10 lines enabled to input data for the user but the list is not filled whenever user filles field u201CAu201D.
How could I solve this problem?
Thanks.With this Eventcase the mouse down of the specified cell will be ignored
Attachments:
Table.png 28 KB -
How can I fill a table of objects from cursor with select * bulk collect???
Hi All, I have a TYPE as OBJECT
create or replace type dept2_o as object (
deptno NUMBER(2),
dname VARCHAR2(14),
loc VARCHAR2(13));
I can fill a table of objects from cursor with out select * bulk collect...., row by row
declare
TYPE dept2_t IS TABLE of dept2_o;
dept_o_tab dept2_t:=dept2_t();
i integer;
begin
i:=0;
dept_o_tab.extend(20);
for rec in (select * from dept) loop
i:=i+1;
dept_o_tab(i):=dept2_o(
deptno => rec.deptno,
dname => rec.dname,
loc =>rec.loc
end loop;
for k IN 1..i loop
dbms_output.put_line(dept_o_tab(k).deptno||' '||dept_o_tab(k).dname||' '||dept_o_tab(k).loc);
end loop;
end;
RESULT
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
But I can't fill a table of objects from cursor with select * bulk collect construction ...
declare
TYPE dept2_t IS TABLE of dept2_o;
dept_o_tab dept2_t:=dept2_t();
begin
dept_o_tab.extend(20);
select * bulk collect into dept_o_tab from dept;
end;
RESULT
ORA-06550: line 6, column 39;
PL/SQL: ORA-00947: not enough values ....
How can I fill a table of objects from cursor with select * bulk collect???create or replace type dept_ot as object (
deptno NUMBER(2),
dname VARCHAR2(14),
loc VARCHAR2(13));
create table dept
(deptno number
,dname varchar2(14)
,loc varchar2(13)
insert into dept values (10, 'x', 'xx');
insert into dept values (20, 'y', 'yy');
insert into dept values (30, 'z', 'zz');
select dept_ot (deptno, dname, loc)
from dept
create type dept_nt is table of dept_ot
declare
l_depts dept_nt;
begin
select dept_ot (deptno, dname, loc)
bulk collect
into l_depts
from dept
for i in l_depts.first .. l_depts.last
loop
dbms_output.put_line (l_depts(i).deptno);
dbms_output.put_line (l_depts(i).dname);
dbms_output.put_line (l_depts(i).loc);
end loop;
end;
/ -
Diagonal line on SSRS line chart
Hi all,
I'm struggling with a charting issue that I was hoping someone here might be able to help with - I've looked through various blogs without success. I need to insert a diagonal line running the full width of a line chart, representing the linearly increasing
target value over a month. The actual data will then be a secondary series on the same vertical axis, showing progress against the target based on today's data.
This report has several limitations that I should emphasise before someone says "Well, why can't you just generate the target data in the SQL query?". It's for Dynamics CRM Online, so the only type of data source and query allowed is FetchXML.
I can't even use a simple SQL query that returns constant values, let alone an actual SQL DB query. It also doesn't seem to be possible to have any custom code in the report, which makes it even more frustrating. FetchXML is just not set up to do things like
return constant values in a query, or return a dataset which is the set of days in the current month.
What I do have is two datasets, one of which returns the actual data, which I've used as the first series in the table, and a second dataset that returns a single value that represents the target for the month. There's no way, as far as I'm aware, to cross-join
that with a set of dates and then use a calculated field in the dataset to turn it into a linear series.
I've set the min and max values of the X-axis to show me all dates, and my initial solution to the problem was to have a horizontal line at the target value, as shown below (red dotted line). However, I've been asked to change that to the solid red diagonal
line as shown:
Series 1 (Total order value) is the RunningValue of the daily order values, summed across the dates.
Series 1 data looks something like this:
[Date] [Order Value]
1 Mar 100
3 Mar 20
3 Mar 35
24 Mar 400
Series 2 data just has
[Target Name] [Target Value]
Sales Target 25000
Does anyone have ideas on how I can do this? I'm happy to take any suggestions; the line doesn't have to be interactive or be an action, so it could even be rendered directly onto the chart, if that's possible. The only limitation is that it needs to be
viewed on screen, and be printable. I'd prefer some sort of elegant approach that allows me to do it as two series on the same chart, but frankly at this point I'm beyond caring how it's done - so long as it works, it can be held together with chewing gum
and string.Hi Anuruddha,
When you want to see the diagonal line, you should divide the target value with number of values in x-axis,
let say Month March has 31 days, your target is 25000
then 25000/31=806.4516129032258
But to do dynamic you need to get the number of days in month
=day(DateAdd("d",-1,DateAdd("M",1,cdate(cstr(Month(First(Fields!workday.Value, "DataSet3")) )+"/01/" + cstr(Year(First(Fields!workday.Value, "DataSet3")))))))
Create another series like below shown:-
a Above expression :-
= (Sum(Fields!target.Value, "DataSet2")/ (day(DateAdd("d",-1,DateAdd("M",1,cdate(cstr(Month(First(Fields!workday.Value, "DataSet3")) )+"/01/" + cstr(Year(First(Fields!workday.Value, "DataSet3")))))))))*Fields!id.Value
Run the report:-
Orange Line is yours previously, Red Line is what you want.
I am doing calculation in series, so there is no problem for you as you can't write SQL query.
Below is the RDL code , which will help you to check the expressions.
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Body>
<ReportItems>
<Textbox Name="textbox1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Sparkline</Value>
<Style>
<FontFamily>Tahoma</FontFamily>
<FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>SteelBlue</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>textbox1</rd:DefaultName>
<Height>0.37in</Height>
<Width>5in</Width>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Chart Name="Chart1">
<ChartCategoryHierarchy>
<ChartMembers>
<ChartMember>
<Group Name="Chart1_CategoryGroup">
<GroupExpressions>
<GroupExpression>=Fields!workday.Value</GroupExpression>
</GroupExpressions>
</Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!workday.Value</Value>
</SortExpression>
</SortExpressions>
<Label>=Fields!workday.Value</Label>
</ChartMember>
</ChartMembers>
</ChartCategoryHierarchy>
<ChartSeriesHierarchy>
<ChartMembers>
<ChartMember>
<Label>value</Label>
</ChartMember>
<ChartMember>
<Label>target</Label>
</ChartMember>
<ChartMember>
<Label>id</Label>
</ChartMember>
</ChartMembers>
</ChartSeriesHierarchy>
<ChartData>
<ChartSeriesCollection>
<ChartSeries Name="value">
<ChartDataPoints>
<ChartDataPoint>
<ChartDataPointValues>
<Y>=RunningValue(Fields!value.Value,Sum,"DataSet3")</Y>
</ChartDataPointValues>
<ChartDataLabel>
<Style />
</ChartDataLabel>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<DataElementOutput>Output</DataElementOutput>
</ChartDataPoint>
</ChartDataPoints>
<Type>Line</Type>
<Style />
<ChartEmptyPoints>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<ChartDataLabel>
<Style />
</ChartDataLabel>
</ChartEmptyPoints>
<ValueAxisName>Primary</ValueAxisName>
<CategoryAxisName>Primary</CategoryAxisName>
<ChartSmartLabel>
<CalloutLineColor>Black</CalloutLineColor>
<MinMovingDistance>0pt</MinMovingDistance>
</ChartSmartLabel>
</ChartSeries>
<ChartSeries Name="IDDetails">
<ChartDataPoints>
<ChartDataPoint>
<ChartDataPointValues>
<Y>=Sum(Fields!target.Value, "DataSet2")</Y>
</ChartDataPointValues>
<ChartDataLabel>
<Style />
</ChartDataLabel>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<DataElementOutput>Output</DataElementOutput>
</ChartDataPoint>
</ChartDataPoints>
<Type>Line</Type>
<Style />
<ChartEmptyPoints>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<ChartDataLabel>
<Style />
</ChartDataLabel>
</ChartEmptyPoints>
<ValueAxisName>Primary</ValueAxisName>
<CategoryAxisName>Primary</CategoryAxisName>
<ChartSmartLabel>
<CalloutLineColor>Black</CalloutLineColor>
<MinMovingDistance>0pt</MinMovingDistance>
</ChartSmartLabel>
</ChartSeries>
<ChartSeries Name="Series">
<ChartDataPoints>
<ChartDataPoint>
<ChartDataPointValues>
<Y>= (Sum(Fields!target.Value, "DataSet2")/ (day(DateAdd("d",-1,DateAdd("M",1,cdate(cstr(Month(First(Fields!workday.Value, "DataSet3")) )+"/01/" + cstr(Year(First(Fields!workday.Value, "DataSet3")))))))))*Fields!id.Value</Y>
</ChartDataPointValues>
<ChartDataLabel>
<Style />
</ChartDataLabel>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<DataElementOutput>Output</DataElementOutput>
</ChartDataPoint>
</ChartDataPoints>
<Type>Line</Type>
<Style />
<ChartEmptyPoints>
<Style />
<ChartMarker>
<Style />
</ChartMarker>
<ChartDataLabel>
<Style />
</ChartDataLabel>
</ChartEmptyPoints>
<ValueAxisName>Primary</ValueAxisName>
<CategoryAxisName>Primary</CategoryAxisName>
<ChartSmartLabel>
<CalloutLineColor>Black</CalloutLineColor>
<MinMovingDistance>0pt</MinMovingDistance>
</ChartSmartLabel>
</ChartSeries>
</ChartSeriesCollection>
</ChartData>
<ChartAreas>
<ChartArea Name="Default">
<ChartCategoryAxes>
<ChartAxis Name="Primary">
<Style>
<FontSize>8pt</FontSize>
</Style>
<ChartAxisTitle>
<Caption>Axis Title</Caption>
<Style>
<FontSize>8pt</FontSize>
</Style>
</ChartAxisTitle>
<ChartMajorGridLines>
<Enabled>False</Enabled>
<Style>
<Border>
<Color>Gainsboro</Color>
</Border>
</Style>
</ChartMajorGridLines>
<ChartMinorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
<Style>Dotted</Style>
</Border>
</Style>
</ChartMinorGridLines>
<ChartMinorTickMarks>
<Length>0.5</Length>
</ChartMinorTickMarks>
<CrossAt>NaN</CrossAt>
<Minimum>NaN</Minimum>
<Maximum>NaN</Maximum>
<ChartAxisScaleBreak>
<Style />
</ChartAxisScaleBreak>
</ChartAxis>
<ChartAxis Name="Secondary">
<Style>
<FontSize>8pt</FontSize>
</Style>
<ChartAxisTitle>
<Caption>Axis Title</Caption>
<Style>
<FontSize>8pt</FontSize>
</Style>
</ChartAxisTitle>
<ChartMajorGridLines>
<Enabled>False</Enabled>
<Style>
<Border>
<Color>Gainsboro</Color>
</Border>
</Style>
</ChartMajorGridLines>
<ChartMinorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
<Style>Dotted</Style>
</Border>
</Style>
</ChartMinorGridLines>
<ChartMinorTickMarks>
<Length>0.5</Length>
</ChartMinorTickMarks>
<CrossAt>NaN</CrossAt>
<Location>Opposite</Location>
<Minimum>NaN</Minimum>
<Maximum>NaN</Maximum>
<ChartAxisScaleBreak>
<Style />
</ChartAxisScaleBreak>
</ChartAxis>
</ChartCategoryAxes>
<ChartValueAxes>
<ChartAxis Name="Primary">
<Style>
<FontSize>8pt</FontSize>
</Style>
<ChartAxisTitle>
<Caption>Axis Title</Caption>
<Style>
<FontSize>8pt</FontSize>
</Style>
</ChartAxisTitle>
<ChartMajorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
</Border>
</Style>
</ChartMajorGridLines>
<ChartMinorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
<Style>Dotted</Style>
</Border>
</Style>
</ChartMinorGridLines>
<ChartMinorTickMarks>
<Length>0.5</Length>
</ChartMinorTickMarks>
<CrossAt>NaN</CrossAt>
<Minimum>NaN</Minimum>
<Maximum>NaN</Maximum>
<ChartAxisScaleBreak>
<Style />
</ChartAxisScaleBreak>
</ChartAxis>
<ChartAxis Name="Secondary">
<Style>
<FontSize>8pt</FontSize>
</Style>
<ChartAxisTitle>
<Caption>Axis Title</Caption>
<Style>
<FontSize>8pt</FontSize>
</Style>
</ChartAxisTitle>
<ChartMajorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
</Border>
</Style>
</ChartMajorGridLines>
<ChartMinorGridLines>
<Style>
<Border>
<Color>Gainsboro</Color>
<Style>Dotted</Style>
</Border>
</Style>
</ChartMinorGridLines>
<ChartMinorTickMarks>
<Length>0.5</Length>
</ChartMinorTickMarks>
<CrossAt>NaN</CrossAt>
<Location>Opposite</Location>
<Minimum>NaN</Minimum>
<Maximum>NaN</Maximum>
<ChartAxisScaleBreak>
<Style />
</ChartAxisScaleBreak>
</ChartAxis>
</ChartValueAxes>
<Style>
<BackgroundGradientType>None</BackgroundGradientType>
</Style>
</ChartArea>
</ChartAreas>
<ChartLegends>
<ChartLegend Name="Default">
<Style>
<BackgroundGradientType>None</BackgroundGradientType>
<FontSize>8pt</FontSize>
</Style>
<ChartLegendTitle>
<Caption />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<TextAlign>Center</TextAlign>
</Style>
</ChartLegendTitle>
<HeaderSeparatorColor>Black</HeaderSeparatorColor>
<ColumnSeparatorColor>Black</ColumnSeparatorColor>
</ChartLegend>
</ChartLegends>
<ChartTitles>
<ChartTitle Name="Default">
<Caption>Chart Title</Caption>
<Style>
<BackgroundGradientType>None</BackgroundGradientType>
<FontWeight>Bold</FontWeight>
<TextAlign>General</TextAlign>
<VerticalAlign>Top</VerticalAlign>
</Style>
</ChartTitle>
</ChartTitles>
<Palette>BrightPastel</Palette>
<ChartBorderSkin>
<Style>
<BackgroundColor>Gray</BackgroundColor>
<BackgroundGradientType>None</BackgroundGradientType>
<Color>White</Color>
</Style>
</ChartBorderSkin>
<ChartNoDataMessage Name="NoDataMessage">
<Caption>No Data Available</Caption>
<Style>
<BackgroundGradientType>None</BackgroundGradientType>
<TextAlign>General</TextAlign>
<VerticalAlign>Top</VerticalAlign>
</Style>
</ChartNoDataMessage>
<DataSetName>DataSet3</DataSetName>
<Top>0.59667in</Top>
<Left>0.24667in</Left>
<Height>3.55in</Height>
<Width>4.53667in</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>White</BackgroundColor>
<BackgroundGradientType>None</BackgroundGradientType>
</Style>
</Chart>
<Textbox Name="Textbox2">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=day(DateAdd("d",-1,DateAdd("M",1,cdate(cstr(Month(First(Fields!workday.Value, "DataSet3")) )+"/01/" + cstr(Year(First(Fields!workday.Value, "DataSet3")))))))</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>4.33833in</Top>
<Left>2.21333in</Left>
<Height>0.25in</Height>
<Width>1in</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>4.71333in</Height>
<Style />
</Body>
<Width>5in</Width>
<Page>
<LeftMargin>1in</LeftMargin>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<BottomMargin>1in</BottomMargin>
<Style />
</Page>
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSource1">
<DataSourceReference>DataSource1</DataSourceReference>
<rd:SecurityType>None</rd:SecurityType>
<rd:DataSourceID>6abd5341-c043-4ab1-b449-c32e00efc4ac</rd:DataSourceID>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<DataSourceName>DataSource1</DataSourceName>
<CommandText>SELECT 1 ID, 1 MONTH, 50 VALUE
UNION
SELECT 1 ID, 2 MONTH, 30 VALUE
UNION
SELECT 1 ID, 3 MONTH, 20 VALUE
UNION
SELECT 1 ID, 4 MONTH, 10 VALUE
UNION
SELECT 1 ID, 5 MONTH, 25 VALUE
UNION
SELECT 1 ID, 6 MONTH, 50 VALUE
UNION
SELECT 1 ID, 7 MONTH, 10 VALUE
UNION
SELECT 1 ID, 8 MONTH, 20 VALUE
UNION
SELECT 1 ID, 9 MONTH, 30 VALUE
UNION
SELECT 1 ID, 10 MONTH, 40 VALUE
UNION
SELECT 1 ID, 11 MONTH, 45 VALUE
UNION
SELECT 1 ID, 12 MONTH, 50 VALUE
UNION
SELECT 2 ID, 1 MONTH, 25 VALUE
UNION
SELECT 2 ID, 2 MONTH, 30 VALUE
UNION
SELECT 2 ID, 3 MONTH, 10 VALUE
UNION
SELECT 2 ID, 4 MONTH, 30 VALUE
UNION
SELECT 2 ID, 5 MONTH, 45 VALUE
UNION
SELECT 2 ID, 6 MONTH, 35 VALUE
UNION
SELECT 2 ID, 7 MONTH, 10 VALUE
UNION
SELECT 2 ID, 8 MONTH, 50 VALUE
UNION
SELECT 2 ID, 9 MONTH, 20 VALUE
UNION
SELECT 2 ID, 10 MONTH, 14 VALUE
UNION
SELECT 2 ID, 11 MONTH, 40 VALUE
UNION
SELECT 2 ID, 12 MONTH, 45 VALUE</CommandText>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
</Query>
<Fields>
<Field Name="ID">
<DataField>ID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="MONTH">
<DataField>MONTH</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="VALUE">
<DataField>VALUE</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
</DataSet>
<DataSet Name="DataSet2">
<Query>
<DataSourceName>DataSource1</DataSourceName>
<CommandText>Select 25000 target</CommandText>
</Query>
<Fields>
<Field Name="target">
<DataField>target</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
</DataSet>
<DataSet Name="DataSet3">
<Query>
<DataSourceName>DataSource1</DataSourceName>
<CommandText>
select 1 id, '03/01/2015' workday , 100 value
union
select 2 id, '03/02/2015' workday , 50 value
union
select 3 id, '03/03/2015' workday , 400 value
union
select 4 id, '03/04/2015' workday , 300 value
union
select 5 id, '03/05/2015' workday , 250 value
union
select 6 id, '03/06/2015' workday , 200 value
union
select 7 id, '03/07/2015' workday , 500 value
union
select 8 id, '03/08/2015' workday , 700 value
union
select 9 id, '03/09/2015' workday , 50 value
union
select 10 id, '03/10/2015' workday , 450 value
union
select 11 id, '03/11/2015' workday , 350 value
union
select 12 id, '03/12/2015' workday , 100 value
union
select 13 id, '03/13/2015' workday , 100 value
union
select 14 id, '03/14/2015' workday , 100 value
union
select 15 id, '03/15/2015' workday , 200 value
union
select 16 id, '03/16/2015' workday , 700 value
union
select 17 id, '03/17/2015' workday , 450 value
union
select 18 id, '03/18/2015' workday , 100 value
union
select 19 id, '03/19/2015' workday , 700 value
union
select 20 id, '03/20/2015' workday , 300 value
union
select 21 id, '03/21/2015' workday , 100 value
union
select 22 id, '03/22/2015' workday , 200 value
union
select 23 id, '03/23/2015' workday , 700 value
union
select 24 id, '03/24/2015' workday , 100 value
union
select 25 id, '03/25/2015' workday , 100 value
union
select 26 id, '03/26/2015' workday , 450 value
union
select 27 id, '03/27/2015' workday , 200 value
union
select 28 id, '03/28/2015' workday , 100 value
union
select 29 id, '03/29/2015' workday , 450 value
union
select 30 id, '03/30/2015' workday , 300 value
union
select 31 id, '03/31/2015' workday , 700 value</CommandText>
</Query>
<Fields>
<Field Name="id">
<DataField>id</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="workday">
<DataField>workday</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="value">
<DataField>value</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
<Language>en-US</Language>
<ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
<rd:ReportUnitType>Inch</rd:ReportUnitType>
<rd:ReportID>59e8101c-8585-409d-82e7-c6719e928567</rd:ReportID>
</Report>
Thanks
Prasad
Mark this as Answer if it helps you to proceed on further. -
MODIFY ALL LINES IN INTERNAL TABLE
Hi,
How to modify more than one line in an internal table? I tried using update, failed as update is not for internal tables. Your help is appriciated .
thank you,
surya.To change one or more lines using a condition, use the following statement:
<b>MODIFY itab FROM wa TRANSPORTING f1 f2 ... WHERE cond.</b>
This processes all of the lines that meet the logical condition cond. The logical expression cond can consist of more than one comparison. In each comparison, the first operand must be a component of the line structure. If the table lines are not structured, the first operand can also be the expression TABLE_LINE. The comparison then applies to the entire line. If the line type of the internal table contains object reference variables as component comp or if the entire line type is a reference variable, the attributes of the attr object to which the respective line reference points can be specified as comparison values using comp->attr or table_line->attr.
The work area wa, which must be compatible with the line type of the internal table, contains the new contents, which in turn will be assigned to the relevant table line using the TRANSPORTING addition. Unlike the above MODIFYstatement, the TRANSPORTING addition is not optional here. Furthermore, you can only modify the key fields of the internal table if it is a standard table. If at least one line is changed, the system sets sy-subrc to 0, otherwise to 4.
REPORT demo_int_tables_modify .
DATA: BEGIN OF line,
col1 TYPE i,
col2 TYPE i,
END OF line.
DATA itab LIKE HASHED TABLE OF line WITH UNIQUE KEY col1.
DO 4 TIMES.
line-col1 = sy-index.
line-col2 = sy-index ** 2.
INSERT line INTO TABLE itab.
ENDDO.
line-col1 = 2.
line-col2 = 100.
MODIFY TABLE itab FROM line.
LOOP AT itab INTO line.
WRITE: / line-col1, line-col2.
ENDLOOP.
The list output is:
1 1
2 100
3 9
4 16
The program fills a hashed table with a list of square numbers. The MODIFY statement changes the line of the table in which the key field col1 has the value 2.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers -
Hi !
Sir I have some questions regarding word report generation using(C language in labwindows) Please.
1.How can i add border to a word page?.
2.How can i add border and grid lines to a table generated in word report(Not the " cvi table control" inserted from gui,i am asking about the table generated in word report)?
3.How can i fill a cell of word report table withe the data type other than "character"?.
And sir one question about use of timer in cvi labwindows please.
Sir i'm trying to set minimum delay interval of timer control to 1millisecond(0.001s),as i set ,timer don't cares of the interval that is set by me it responds only to the default minimum time interval which is i think 10milliseconds(i'am using windows xp service pack3 version 2002).
Regards
Imran
Pakistan
Solved!
Go to Solution.Hello sir!
Sir i'm using daq6251.But Sir before implimenting it to my final application now i'm just trying to achieve 1millisecond time interval for timer in a vary simple programe i mean at this time no hardware (daq device) is involved i,m just trying to achieve minimum time interval of 1millisecond.
Sir i read form "help" of labwindows how this time interval can be set,i'm trying for,as described in help notes but i could'nt.I'm attaching a screen shot sir for you it may helpful for you to explain me.
And sir also waiting for your kind reply regarding word report generation.
Thanks.
Imran.
Attachments:
screen_shot_rigistry.docx 65 KB -
Hallo all,
I have a problem with lines (borders) in tables. I can't make them thinner than 1pt and they will only rise in 1pt steps. Is that an error or is that a restriction of Pages? Line shapes I can only shrink to 0,25pt when trying to make them thinner than 1pt. This is a little bit disturbing, because 1pt lines are too thick for page filling tables. I think they are too dominant.
Thanks for your help.It was my only issue with Pages 1.0, which required doing certain things differently than if the issue was not there (such as using PDF backgrounds prepped in Illustrator and other haX). As I have dozens of custom templates this was fairly important. Thus it wasn't hard to remember and was one of the first things I tested when 2.0 arrived.
Not only is this fixed, it is fixed properly allowing 0.25, 0.5 and 0.75 fractional thickness on table borders.
Kudos to Apple for this and all the other improvements to the product. -
Hello everybody. I´ve create a dynamic table with this fields:
FIELD-SYMBOLS TYPE ANY TABLE.
Concept
Date
Date +1
Date +2
Date +n
After doing some calculations I´ve filled this internal table:
DATE COMPRAS TRANSITOS FABRICACION
01.02.2009 50 50 50
02.02.2009 50 50 50
03.02.2009 50 50 50
I´d like to fill my dynamic table like this:
CONCEPT 01.02.2009 02.02.2009 03.02.2009 ........ ......... .......
COMPRAS 50 50 50
TRANSITOS 50 50 50
FABRICACION 50 50 50
¿ Which is the way more eficient to do it with field symbols ?
Thanks a lot.
RegardsDynamic table using field symbols..
Example 2
TYPES:
BEGIN OF st_mytable,
name1 TYPE string,
name2 TYPE string,
age TYPE i,
END OF st_mytable.
DATA:
gi_mytable TYPE STANDARD TABLE OF st_mytable,
g_mytable TYPE st_mytable.
* Define field symbols
FIELD-SYMBOLS:
<myfield1> TYPE ANY,
<myfield2> TYPE ANY,
<myfield3> TYPE ANY,
<myline> TYPE ANY.
* Fill table with data
g_mytable-name1 = 'John'.
g_mytable-name2 = 'Johnson'.
g_mytable-age = 25.
APPEND g_mytable TO gi_mytable.
g_mytable-name1 = 'Claudio'.
g_mytable-name2 = 'Jensen'.
g_mytable-age = 45.
APPEND g_mytable TO gi_mytable.
* The normal way to do it
LOOP AT gi_mytable INTO g_mytable.
WRITE: / g_mytable-name1, g_mytable-name2 ,g_mytable-age.
ENDLOOP.
SKIP 2.
* Do it with field symbols
LOOP AT gi_mytable ASSIGNING <myline>.
ASSIGN COMPONENT 1 OF STRUCTURE <myline> TO <myfield1>.
ASSIGN COMPONENT 2 OF STRUCTURE <myline> TO <myfield2>.
ASSIGN component 3 OF STRUCTURE <myline> TO <myfield3>.
WRITE: / <myfield1>,<myfield2>,<myfield3>.
ENDLOOP.
* Unassign field symbols
UNASSIGN <myfield1>.
UNASSIGN <myfield2>.
UNASSIGN <myfield3>.
UNASSIGN <myline>.
Dynamically read fields, fieldnames and fieldcontents..
FIELD-SYMBOLS:
<fieldname> TYPE ANY, "Name of field
<line> TYPE ANY, "Line structure for table
<fieldvalue> TYPE ANY. "Value of field
DATA: l_shorttext LIKE dd03m-ddtext.
DATA: wa_dd03l LIKE dd03l.
SELECT * FROM dd03l INTO wa_dd03l
WHERE tabname = 'ZHR_INTER_PA1_DL'.
* Assign name of field
ASSIGN COMPONENT 2 OF STRUCTURE wa_dd03l TO <fieldname>.
* Assign structure for internal table
ASSIGN wa_pa1_delta TO <line>.
* Assign field value from structure
ASSIGN COMPONENT <fieldname> OF STRUCTURE <line> TO <fieldvalue>.
* Find DD text for field
SELECT SINGLE ddtext
FROM dd03m
INTO l_shorttext
WHERE tabname = 'ZHR_INTER_PA1_DL' AND
fieldname = <fieldname> AND
ddlanguage = 'EN'.
WRITE: / <fieldname>, l_shorttext, ' : ', <fieldvalue>.
ENDSELECT.
Regards,
Prabhudas -
How to fill internal table dynamically
Hi All,
how to fill internal table dynamically.
for example:
begin of itab occurs 0,
empid like pa0000-pernr,
empname like pa0001-ename,
grade(5),
end of itab.
now i want to append dynamically field itab-grade along with rest fields.
is this possible?? if yes kindly let me know how to do that.
Regards,
Kiran IHi kiran,
To fill and create and internal table dynamically you can use this code.
TYPE-POOLS: slis.
DATA: it_fcat TYPE slis_t_fieldcat_alv,
is_fcat LIKE LINE OF it_fcat.
DATA: it_fieldcat TYPE lvc_t_fcat,
is_fieldcat LIKE LINE OF it_fieldcat.
DATA: new_table TYPE REF TO data.
DATA: new_line TYPE REF TO data.
FIELD-SYMBOLS: <l_table> TYPE ANY TABLE,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
is_fieldcat-fieldname = 'FIELD1'.
is_fieldcat-ref_field = 'MATNR'.
is_fieldcat-ref_table = 'MARA'.
APPEND is_fieldcat TO it_fieldcat.
is_fieldcat-fieldname = 'FIELD2'.
is_fieldcat-ref_field = 'SPRPS'.
is_fieldcat-ref_table = 'PA0001'.
APPEND is_fieldcat TO it_fieldcat.
is_fieldcat-fieldname = 'FIELD3'.
is_fieldcat-ref_field = 'BEGDA'.
is_fieldcat-ref_table = 'PA0002'.
APPEND is_fieldcat TO it_fieldcat.
Create a new Table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = new_table.
Create a new Line with the same structure of the table.
ASSIGN new_table->* TO <l_table>.
CREATE DATA new_line LIKE LINE OF <l_table>.
ASSIGN new_line->* TO <l_line>.
Test it...
DO 40 times.
ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <l_line> TO <l_field>.
<l_field> = '12345'.
ASSIGN COMPONENT 'FIELD2' OF STRUCTURE <l_line> TO <l_field>.
<l_field> = 'X'.
ASSIGN COMPONENT 'FIELD3' OF STRUCTURE <l_line> TO <l_field>.
<l_field> = '20030101'.
INSERT <l_line> INTO TABLE <l_table>.
ENDDO.
LOOP AT <l_table> ASSIGNING <l_line>.
ASSIGN COMPONENT 'field1' OF STRUCTURE <l_line> TO <l_field>.
WRITE / <l_line>.
ENDLOOP.
regards,
Aashish Garg -
Dear all,
I need your help in this issue please,
I have this code that reads from a table A , fills an array and then insert into anoher table B the content of the array.
The table A has a matrix table data:
line column value
1--- 1--- 133
1--- 2--- 134
1--- 3--- 1566
2--- 1--- 5362
2--- 2--- 822
2--- 3--- 116
Table B has the following structure and should be filled as follows by the procedure code:
line ||| value_column_1 ||| value_column_2 ||| value_column_3
1 ||||| 133 |||||||||||||||| 134|||||||||||||||||| 1566
2 ||||| 5362 |||||||||||||| 822 ||||||||||||||||| 116
The problem is that the procedure code doen't fill the Table B with the correct data, any suggestions about how to fix it please:
+create or replace+
+PROCEDURE proc(+
+P_param1 IN DATE,+
+P_param2 IN VARCHAR2,+
+P_param3 IN VARCHAR2)+
+IS+
+V_DESC varchar2;+
+V_TabLine number(5):=-1;+
+V_PrvLine number(5):=-1;+
+V_TabVal number(18,3);+
+V_Tabcol number(5);+
+V_date date;+
+V_code varchar2;+
+V_grp number;+
+TYPE TabVal IS TABLE OF number(18,3)+
+INDEX BY BINARY_INTEGER;+
+W_ColVal TabVal;+
+CURSOR C_Crs IS+
+SELECT CDATE,CODE, GRP, CLINE, COL, RESULT+
+FROM TableA+
+WHERE cDATE = P_param1+
+AND CODE LIKE P_param2||'%'+
+ORDER BY CLINE, COL;+
+BEGIN+
+DELETE FROM TableB+
+WHERE CDATE =P_param1;+
+COMMIT;+
+For i_count in 1..10+
+Loop+
+W_ColVal(i_count) := 0;+
+End Loop;+
+open C_Crs;+
+Loop+
+fetch C_Crs into V_date, V_code, V_grp, V_TabLine, V_TabCol, V_TabVal;+
+exit when c_crs%notfound;+
+IF V_TabCol= 1+
+Then V_DESC:= null;+
+begin+
+SELECT DESC+
+INTO V_DESC+
+FROM DescTables+
+WHERE CODE =V_code+
+AND CLINE = V_TabLine+
+AND COL=1;+
+exception+
+when others then v_desc := null;+
+end;+
+END IF;+
+IF V_TabLine <> V_PrvLine and V_PrvLine <> -1+
+Then+
+INSERT INTO TableB(+
+CDATE ,Cind ,CODE ,Cline ,+
+FLD01 ,FLD02, FLD03)+
+values (+
+P_param1 ,P_param2 ,V_grp ,V_TabLine ,+
+W_ColVal(1) ,W_ColVal(2), W_ColVal(3));+
+For i_count in 1..10+
+Loop+
+W_ColVal(i_count) := 0;+
+End Loop;+
+End If;+
+W_ColVal(V_TabCol) := W_ColVal(V_TabCol) + V_TabVal;+
+V_PrvLine := V_TabLine;+
+End Loop;+
+Close C_Crs;+
+if V_TabLine <> -1+
+Then INSERT INTO TableB(+
+CDATE ,Cind ,CODE ,Cline ,+
+FLD01 ,FLD02, FLD03)+
+values (+
+P_param1 ,P_param2 ,V_grp ,V_TabLine ,+
+W_ColVal(1) ,W_ColVal(2), W_ColVal(3));+
+End if;+
+commit;+
+return;+
+End;+ Thank you in advance for your help.
Edited by: user562674 on 15/02/2012 05:32 م
Edited by: user562674 on 15/02/2012 05:34 م
Edited by: user562674 on 15/02/2012 05:35 مuser562674 wrote:
but the problem is that in the future the number of columns may increase Then you have a BROKEN data model, not?
too much so i need a dynamic way to fill the columns without enumarating them col 1, col 2, col3 because in the future they may be till col100Not possible - you will need to enumerate the columns to determine how to construct dynamic code to support variable columns. If this is a valid case for doing dynamic processing, then you need to write code that generates and uses dynamic SQL. And that adds complexity, potential run-time instability and security issues.
There is no easy way to do stuff dynamically. -
Fill a table with data coming from an RFC
Hello everyone:
I've followed the Weblog "How many lines of java code did i write for a simple Web Dynpro?"
/people/durairaj.athavanraja/blog/2004/10/17/how-many-lines-of-java-code-did-i-write-for-a-simple-web-dynpro
I've called an RFC and created a table with data coming from it (which is also a table). My question is, if in this table there's a field named "UserType" there are two possible values for this field:
"userA"
"userB"
How can I get the table only show me the "userA" registers? The RFC does return all of the users, but when filling the table, can I put an if-else somewhere on my code?
Thanks a lot
AlejandroHi Alejandro,
Referring to the link provided "The logic of the filter process is not implemented in Web Dynpro. The application developer must implement the action to be executed."
We would have to implement the action onFilter in the controller implementation. Ideally, we fill the data retrieved from backend into a List (java.util.List) (this could be done on init of view) and then subset the list after meeting the criteria in the action handler(say
onActionFilterData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent).
Having done this, you may bind the output list back to the node (shown in table)
Regards,
Chaitanya -
Line height of table in smartforms
Hi,
I have created a table in smartform. I want to set row height in the table as it is available in template. Is there any option available to set height for the table row???
Thanks in advance.
-SAIn table node it is not possible to define the height of a table line. Please find the bold paragraphs in the following text(SAP library)...
Table tab properties minimum height is set the total table height.
The line height depends on the font height used in Paragraph format for your text element.
Line Types for Tables
The height of a table depends of the amount of data to be displayed or printed in a table. Therefore, you cannot use the line types in the Table Painter alone to describe the table layout, as you do it with line types for templates:
With templates the view in the Table Painter directly maps the output on the form. This is possible because the structure of a template does not change at runtime.
With tables the view in the Table Painter is an overview of all existing line types. However, it does not indicate which line types are used when for table output.
Dynamic Cell Height
The height of a table depends on the number of table lines and on the height of all table lines included in the output. The height of each table line depends on the highest cell, which again depends on the contents to be displayed in this cell. When filling table cells with contents, nothing is truncated, instead, the cell height is increased.
In the Table Painter, the height of the line types is displayed as a constant because it has no meaning for the output.
Unlike with line types for tables, for templates you specify a fixed line height for the line type. Any output that does not fit into a cell is truncated. -
How to set cursor at the first line in a table control?
Hi,
I have a customized infotype screen where a table control is being used to input new values.The tab control has 30 lines.Now, the problem is that when the screen is displayed, the cursor always starts at 8th or 4th line.The behaviour is not very consistent.I tried the following statement in the PBO, but no effect.
SET CURSOR FIELD P9417-ZCOUNTRY LINE 1. ( P9417-ZCOUNTRY is the name of the tab control field where i want to set the cursor ).This is the last statement in the PBO.
Can someone please tell me why still I am not able to set the cursor at the first line? I have infact noticed that , in the debugging mode , sometimes the cursor starts at the first line.Please help. ThanksI have got a new requirement on this now. If the table control does not have any records , then the cursor position should be on the first row.Otherwise, if it already has some records, then the cursor should be at the first empty row.I wrote the code like below.
if sy-ucomm = 'INSERT'.
set cursor 'P9714-ZCOUNTRY' line 1.
else if sy-ucomm eq 'CHANGE'.
describe table itab lines fill.
fill = fill + 1.
set cursor 'P9714-ZCOUNTRY' line fill.
endif.
I am facing a strange problem now.The table control has some 10 rows when you see the screen for the first time.If the number of records already present is less than 10, I am able to position the cursor on the first empty row.But if the number is say 15, then the cursor position goes to eighth or fourth line or sometimes the first line.
Is there any way to display the last few records , ie, if there are 15 records , is there any way to display the last five rows when I see the screen for the first time, rather than showing the first 10 records?How can I position the cursor at the first empty row, when there are more records?
Thanks in advance..good answers will be rewarded.
Mahesh -
hi sdnrs,
i want to fill DDIC table from two different internal tables is this possible if yes how . kindly give the sytax.
rewards will be sured.
thanks in advance.Hi,
The Open SQL statement for inserting data into a database table is:
INSERT INTO <target> <lines>.
The Open SQL statement for changing data in a database table is:
UPDATE <target> <lines>.
To insert lines into a database table regardless of whether there is
already a line in the table with the same primary key, use the following:
MODIFY <target> <lines>.
Check this link:
For insert,
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm
For update,
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm
For modify,
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm
Regards
Adil
Maybe you are looking for
-
Could not overwrite rtf file on report template in BI Publisher
Hi All, I want to upload the rtf file for Bi publisher report. There is already an rtf file and I have edited the file and want to overwrite it . It shows that the only way is to delete the template and again create the template by uploading the rtf
-
Why don't pdf email attachments not open in pdf reader?
I have a series 1 iPad running the latest ios available for that model. I have an email with some PDF attachments that I want to open and store in PDF reader however the only options presented are to read the attachments using iBooks or Kindle. Why i
-
I cannot Split Deliv. Date in Sale Order
Hi expert Can anyone give some suggestions. - Sale order is MTO and have production order that generated from sale order but production order was closed by user. - User create new production order by tcode CO08. Users want to change Deliv. Date in Sa
-
hi everybody i wanna read and write xmls in movile application, somebody here told me to use kxml, i downloaded kxml2 but there is no documentation about how to write xml just how to read, any link you could provide me? pleaseeeeeee or another packag
-
Older versions of iTunes to download
Can anyone tell me if it is possible to find older versions of iTunes to download in the official apple website. I have given up trying to get 10.5.3 to work, which means I probably won't be able to sync my iPad2. I want to download Version 10.0. I h