显示标签为“format”的博文。显示所有博文
显示标签为“format”的博文。显示所有博文

2012年3月22日星期四

Flat File Normalization

Hi Can Any one help,

Well i got a flat file (in{CR}{LF} format) and needs to be imported into a sql server 2000.

now i need to know how can i create a package using DTS or some thing which kindoff breaks the data down and insert it into appropriate tables from the flat file. I need to find a way to carry it out in one process as the data is imported through the pipe. SO i have multiple tables which would eventaully contain the data from flat file.So ill Be getting the Data after every two weeks which will need to be imported into SQL server 2000. So is there any way i can automate the process.

regards

First, you have to know the column delimiter, next step is to run Import or Export wizard in Enterprise Manager with source that flat file and destination a table in your database ; don't forget to save the package and create a schedule for importing periodically during wizard!.

After that view the package saved with Enterprise for develop other things , which will be, getting a flat file as a global parameter.

Flat file format

I have a table that I want to export to a flat file. The problem I am running into is, the person I am sending it to needs it in a specific format. It is a comma serperated file and I need quotes on some of the data but not all.

For example : "1234",abc,"id"

I know how to make it all or none but not conditionally. Also I have some fields that the total in them is 0.00 and when this gets exported to the file the format become .00, is there a way to make it 0 with out changing the ones that have totals. Thanks.

95five0 wrote:

I have a table that I want to export to a flat file. The problem I am running into is, the person I am sending it to needs it in a specific format. It is a comma serperated file and I need quotes on some of the data but not all.

For example : "1234",abc,"id"

I know how to make it all or none but not conditionally. Also I have some fields that the total in them is 0.00 and when this gets exported to the file the format become .00, is there a way to make it 0 with out changing the ones that have totals. Thanks.

Well, you may just have to assemble the quotes yourself using a derived column transformation just upstream from the flat file destination. Basically, for those fields, concatenate the double quotes to your data.

For your other question, I think you'll need to ensure that the output datatype for 0.00 is of string, so that it doesn't remove the leading zero.|||The only way to do what you describe, would be to create varchars for each field and convert them to the exact format you want, then export the varchars.

The default for comma delimited with string quotes, is "strings" get quoted, but other fields do not. So in your case the ,abc, would result in ,"abc",.

You might see if they really need it in that exact format. Most import programs will work with slightly different input, like the quotes or .00 as a number.|||Thanks for the advise. Basically what I did was create a temp table and essemble each line into one varchar field. Then I just pushed the data from the temp table to the file.|||

95five0 wrote:

Thanks for the advise. Basically what I did was create a temp table and essemble each line into one varchar field. Then I just pushed the data from the temp table to the file.

Yet another way to make it work. Good deal.

Flat File Data Flow

any suggestions on dealing with a flat file in the format below. I only want to process the data columns in the middle of the file and want to ignore all other rows. This was a very simple task in DTS with a small amount of VBScript in the transformation but it doesn't seem as straightforward in SSIS. thanks

......... file example ......

start-of-file

header1

header2

...

start-of-data

col0|col1|col2|col3|....

col0|col1|col2|col3|....

col0|col1|col2|col3|....

end-of-data

end-of-file

Two steps.

Read the file in first as one big text string (for each row) and pass them through a Conditional Split transformation to filter off each row that you don't want. Then hook it to a flat file destination.

Then use another flat file source against the file just created to do your column parsing. Work with it as needed from there.

Searching this forum will also yield other options (substrings, etc...) that you can try.|||thanks phil. thats helps

Flat File Connection with different row types

I have a file format that uses many rows to describe relationships between one-to-many entries. Basically in many tables I one file with the only relations between tables been the order of the rows.

From what I’ve found so far, the Flat file Connection is not the correct Connection type to use for this. Is there something better suited, or documentation of creating Connection types.

Cheers Simeon.

This is script source component or custom source adapter territory. I recommend Don Farmer's book "Rational Guide To Scripting" which contains a step-by-step guide to building a script source component.

-Jamiesql

Flat file connection manager question

Hi,

I am having problems setting up columns in a flat file connection manager.

The text file I am trying to parse is in this format:

col1 col2 col3 col4 [] col1 col2 col3 col4 [] col1 col2 col3 col4

where [] = {LF}

I've tried all of the different column delimiters, but apparently this file does not use any of the built-in delimiters, such as tab. I think there are just blank spaces between the columns.

I've requested that the file be comma-delimited instead, but in the event that this is not possible, how should I handle this situation?

Thank you

Are you sure it isn't a fixed-width format?|||

Actually I think it is.

|||Yep, start there and see how far you get. Try working with either the fixed-width format or the ragged-right format.

2012年3月21日星期三

Flat File Connection Manager does NOT fail

I use Flat File connection manager where I have defined the format of the file as "Ragged Right" (CR,LF Dos file) with no header rows. The columns are fixed width with Row Delimiter "{CR}{LF}".

The problem is when I process a file with incorrect format. The file execution does not throw an error. Instead it throws a warning " There is a partial row at the end of the file.".

How can I force the Flat file connection manager to FAIL if the format of the file is not matched exactly. I would think this would be the default behavior of Connection manager.

ie. If I have Connection manager setup for a dos file with 2 columns. Column 1 is 5 characters long, column 2 is 3 character long, and the end of line characters are CR, LF. However, if I send in file with 10 rows of 1 character and CR LF, the data flow works and processes these rows incorrectly. How can I force the task to fail if incoming file is not in defined format.

The "Ragged Right" format does not have any limitation on the size of the last column (delimited one), so if your file is missing some row delimiters the flat file parser will continue to look for them and probably swallow succeeding row(s).

You can restrict the size of your "ragged right" column by setting the OutputColumnWidth property of those columns on the Advanced page of the Flat File Connection Manager UI. That will make the flat file source fail if the truncation happens. If you would rather to redirect such rows, you can do that by setting "Redirect Row" for Truncation on the Error Output page of the Flat File Source UI, and then define your error flow.

HTH.|||Thanks. It worked.

Flat file (CSV) source format

I have a SSIS package loading a lot of CSV file, which first line is the column head. Some file are ordered differently. However, package still try to load the file use predefined column order (it seems it doesn't check the head of each file see if it matchs the predefined column order).

Any way to force the package the check each file's head? or I had to manually check it using VB.Net script?

No, the Flat File connection manager cannot adapt to dynamic file formats. You can workaround with script. These threads should be helpful.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1408850&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1438953&SiteID=1

2012年3月9日星期五

Fit in 1 page in a list doesn't work??

This is a multi-part message in MIME format.
--=_NextPart_000_0014_01C4AAC9.04BD4DC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I've a report with some queries :
1. CLient infos (which return the client name and other text info)
2. Orders
3. Historical sales
My query 1 and 2 are displayed in top of my report.
My historical sales is displayed in 3 charts
I want to group these charts in 1 page (specially when exported in PDF), = but these charts appears AFTER the "orders" query.
and I want to display the name of the client in top of these 3 charts = (because I can't put it in the header of my page)
I've setup a list around my query 3
I've setup the keeptogether option for this list
My charts are in the list I've added a textbox in the same list with the formula:
=3DFirst(Fields!NomBT.Value, "ClientInfos")
When I display the result in PDF or TIFF, the name of the client appear = at the end of the first page and not in top of the second page.
But I there is enough space in the second page to display this name.
So why RS don't group the content in my list?
I don't want to setup "page break before" because if the user display = the result other the web, I prefer to scroll the page instead-of = clicking "page 2"
Thanks.
Jerome.
--=_NextPart_000_0014_01C4AAC9.04BD4DC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Hi,

I've a report with some queries = :
1. CLient infos (which return the = client name and other text info)
2. Orders
3. Historical sales

My query 1 and 2 are displayed in top = of my report.

My historical sales is displayed in 3 charts
I want to group these charts in 1 page = (specially when exported in PDF), but these charts appears AFTER the "orders" query.
and I want to display the name of the = client in top of these 3 charts (because I can't put it in the header of my = page)

I've setup a list around my query = 3
I've setup the keeptogether option for = this list
My charts are in the list
I've added a textbox in the same list = with the formula:
=3DFirst(Fields!NomBT.Value, "ClientInfos")

When I display the result in PDF or = TIFF, the name of the client appear at the end of the first page and not in top of = the second page.
But I there is enough space in the = second page to display this name.
So why RS don't group the = content in my list?

I don't want to setup "page break = before" because if the user display the result other the web, I prefer to scroll the = page instead-of clicking "page 2"

Thanks.

Jerome.

--=_NextPart_000_0014_01C4AAC9.04BD4DC0--This is a multi-part message in MIME format.
--=_NextPart_000_00D2_01C4AADA.172F1310
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
All charts and text boxes instances are part of the list, not only the =content of one group. You need to add a reactangle around your text box and chart.
-- Nico Cristache [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no =rights.
"J=E9j=E9" <willgart@._A_hAotmail_A_.com> wrote in message =news:Oee5RpuqEHA.1712@.tk2msftngp13.phx.gbl...
Hi,
I've a report with some queries :
1. CLient infos (which return the client name and other text info)
2. Orders
3. Historical sales
My query 1 and 2 are displayed in top of my report.
My historical sales is displayed in 3 charts
I want to group these charts in 1 page (specially when exported in =PDF), but these charts appears AFTER the "orders" query.
and I want to display the name of the client in top of these 3 charts =(because I can't put it in the header of my page)
I've setup a list around my query 3
I've setup the keeptogether option for this list
My charts are in the list I've added a textbox in the same list with the formula:
=3DFirst(Fields!NomBT.Value, "ClientInfos")
When I display the result in PDF or TIFF, the name of the client =appear at the end of the first page and not in top of the second page.
But I there is enough space in the second page to display this name.
So why RS don't group the content in my list?
I don't want to setup "page break before" because if the user display =the result other the web, I prefer to scroll the page instead-of =clicking "page 2"
Thanks.
Jerome.
--=_NextPart_000_00D2_01C4AADA.172F1310
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

All charts and text boxes =instances are part of the list, not only the content of one group.
You need to add a reactangle around =your text box and chart.
-- Nico Cristache [MSFT]Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no =rights.
"J=E9j=E9" wrote in message news:Oee5RpuqEHA.1712=@.tk2msftngp13.phx.gbl...
Hi,

I've a report with some queries =:
1. CLient infos (which return the =client name and other text info)
2. Orders
3. Historical sales

My query 1 and 2 are displayed in top =of my report.

My historical sales is displayed in 3 = charts
I want to group these charts in 1 =page (specially when exported in PDF), but these charts appears AFTER the "orders" query.
and I want to display the name of the =client in top of these 3 charts (because I can't put it in the header of my page)

I've setup a list around my query =3
I've setup the keeptogether option =for this list
My charts are in the list = I've added a textbox in the same list =with the formula:
=3DFirst(Fields!NomBT.Value, "ClientInfos")

When I display the result in PDF or =TIFF, the name of the client appear at the end of the first page and not in =top of the second page.
But I there is enough space in the =second page to display this name.
So why RS don't group the =content in my list?

I don't want to setup "page break =before" because if the user display the result other the web, I prefer to scroll the =page instead-of clicking "page 2"

Thanks.

Jerome.


--=_NextPart_000_00D2_01C4AADA.172F1310--|||This is a multi-part message in MIME format.
--=_NextPart_000_0032_01C4AAF9.4301DA30
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I've also try this without more result.
I've this:
content from Query 1 & 2 (some textboxes and tables)
List (based on query 3)
--> Rectangle
--> Textbox (=3Dfirst...)
--> chart 1
--> chart 2
--> chart 3
--> end of rectangle
End of list
and my list continue to not fit in 1 page.
"Nico Cristache [MSFT]" <nipirvan@.microsoft.com> a =E9crit dans le =message de news:et1hETxqEHA.3428@.TK2MSFTNGP11.phx.gbl...
All charts and text boxes instances are part of the list, not only the =content of one group. You need to add a reactangle around your text box and chart.
-- Nico Cristache [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no =rights.
"J=E9j=E9" <willgart@._A_hAotmail_A_.com> wrote in message =news:Oee5RpuqEHA.1712@.tk2msftngp13.phx.gbl...
Hi,
I've a report with some queries :
1. CLient infos (which return the client name and other text info)
2. Orders
3. Historical sales
My query 1 and 2 are displayed in top of my report.
My historical sales is displayed in 3 charts
I want to group these charts in 1 page (specially when exported in =PDF), but these charts appears AFTER the "orders" query.
and I want to display the name of the client in top of these 3 =charts (because I can't put it in the header of my page)
I've setup a list around my query 3
I've setup the keeptogether option for this list
My charts are in the list I've added a textbox in the same list with the formula:
=3DFirst(Fields!NomBT.Value, "ClientInfos")
When I display the result in PDF or TIFF, the name of the client =appear at the end of the first page and not in top of the second page.
But I there is enough space in the second page to display this name.
So why RS don't group the content in my list?
I don't want to setup "page break before" because if the user =display the result other the web, I prefer to scroll the page instead-of =clicking "page 2"
Thanks.
Jerome.
--=_NextPart_000_0032_01C4AAF9.4301DA30
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

I've also try this without more result.
I've this:
content from Query 1 & 2 (some =textboxes and tables)
List (based on query 3)
--> Rectangle
--> Textbox =(=3Dfirst...)
--> chart 1
--> chart 2
--> chart 3
--> end of rectangle
End of list
and my list continue to not fit in 1 page.
"Nico Cristache [MSFT]" =a =E9crit dans le message de news:et1hETxqEHA.3428=@.TK2MSFTNGP11.phx.gbl...
All charts and text boxes =instances are part of the list, not only the content of one group. = You need to add a reactangle around =your text box and chart.
-- Nico Cristache [MSFT]Microsoft SQL Server Reporting Services

This posting is provided "AS IS" with no warranties, and confers =no rights.


"J=E9j=E9" wrote in message news:Oee5RpuqEHA.1712=@.tk2msftngp13.phx.gbl...
Hi,

I've a report with some queries =:
1. CLient infos (which return the =client name and other text info)
2. Orders
3. Historical sales

My query 1 and 2 are displayed in =top of my report.

My historical sales is displayed in =3 charts
I want to group these charts in 1 =page (specially when exported in PDF), but these charts appears AFTER the = "orders" query.
and I want to display the name of =the client in top of these 3 charts (because I can't put it in the header of my page)

I've setup a list around my query 3
I've setup the keeptogether option =for this list
My charts are in the list = I've added a textbox in the same =list with the formula:
=3DFirst(Fields!NomBT.Value, "ClientInfos")

When I display the result in PDF or =TIFF, the name of the client appear at the end of the first page and not =in top of the second page.
But I there is enough space in the =second page to display this name.
So why RS don't group the =content in my list?

I don't want to setup "page break =before" because if the user display the result other the web, I prefer to =scroll the page instead-of clicking "page 2"

Thanks.

Jerome.


--=_NextPart_000_0032_01C4AAF9.4301DA30--

2012年2月26日星期日

First returns incorrect row

This is a multi-part message in MIME format.
--020206060805020100000401
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
It seems First is returning the first row returned by the Dataset, not
the first row according to the sorting of the dataregion or grouping (as
the First function's documentation implies). This ends up with some
mysterious results in my reports. I created a simple example using the
SQL Northwind that shows the problem and attached it. Is this a bug or
intended behavior? It makes some of my reports using sorted groups have
seemingly bogus results when viewed.
Thanks,
Aaron
--020206060805020100000401
Content-Type: text/xml;
name="FirstLastAnomaly1.rdl"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="FirstLastAnomaly1.rdl"
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<RightMargin>1in</RightMargin>
<Body>
<ReportItems>
<Table Name="table1">
<Height>1in</Height>
<Style />
<DataSetName>Northwind</DataSetName>
<Top>0.125in</Top>
<Width>3.25in</Width>
<TableGroups>
<TableGroup>
<Header>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox10">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>#8080ff</BackgroundColor>
<TextAlign>Left</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>7</ZIndex>
<rd:DefaultName>textbox10</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!FirstName.Value & " " & Fields!LastName.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox11">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>#8080ff</BackgroundColor>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>6</ZIndex>
<rd:DefaultName>textbox11</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox16">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>#8080ff</BackgroundColor>
<TextAlign>Left</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>5</ZIndex>
<rd:DefaultName>textbox16</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>="1st:" & First(Fields!City.Value)</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox17">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>#8080ff</BackgroundColor>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>4</ZIndex>
<rd:DefaultName>textbox17</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>="1st:" & First(Fields!OrderID.Value)</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox3">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>#8080ff</BackgroundColor>
<TextAlign>Left</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>3</ZIndex>
<CanGrow>true</CanGrow>
<Value>="Last:" & Last(Fields!City.Value)</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox2">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>#8080ff</BackgroundColor>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>2</ZIndex>
<rd:DefaultName>textbox2</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>="Last:" & Last(Fields!OrderID.Value)</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Header>
<Grouping Name="table1_Group1">
<GroupExpressions>
<GroupExpression>=Fields!FirstName.Value & " " & Fields!LastName.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Sorting>
<SortBy>
<SortExpression>=Fields!FirstName.Value & " " & Fields!LastName.Value</SortExpression>
<Direction>Ascending</Direction>
</SortBy>
</Sorting>
</TableGroup>
<TableGroup>
<Header>
<TableRows>
<TableRow>
<Height>0.25in</Height>
<TableCells>
<TableCell>
<ReportItems>
<Textbox Name="textbox19">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>#80ff80</BackgroundColor>
<TextAlign>Left</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<rd:DefaultName>textbox19</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!City.Value</Value>
</Textbox>
</ReportItems>
</TableCell>
<TableCell>
<ReportItems>
<Textbox Name="textbox20">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>#80ff80</BackgroundColor>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<rd:DefaultName>textbox20</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=First(Fields!OrderID.Value)</Value>
</Textbox>
</ReportItems>
</TableCell>
</TableCells>
</TableRow>
</TableRows>
</Header>
<Grouping Name="table1_Group2">
<GroupExpressions>
<GroupExpression>=Fields!City.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Sorting>
<SortBy>
<SortExpression>=Fields!City.Value</SortExpression>
<Direction>Ascending</Direction>
</SortBy>
</Sorting>
</TableGroup>
</TableGroups>
<TableColumns>
<TableColumn>
<Width>1.5in</Width>
</TableColumn>
<TableColumn>
<Width>1.75in</Width>
</TableColumn>
</TableColumns>
</Table>
</ReportItems>
<Style />
<Height>1.25in</Height>
</Body>
<TopMargin>1in</TopMargin>
<DataSources>
<DataSource Name="Northwind">
<rd:DataSourceID>b54bf116-08cc-4b39-aa96-57013b5de15d</rd:DataSourceID>
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>data source=localhost;initial catalog=Northwind</ConnectString>
<IntegratedSecurity>true</IntegratedSecurity>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>3.375in</Width>
<DataSets>
<DataSet Name="Northwind">
<Fields>
<Field Name="CompanyName">
<DataField>CompanyName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="CustomerID">
<DataField>CustomerID</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="OrderID">
<DataField>OrderID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="LastName">
<DataField>LastName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="FirstName">
<DataField>FirstName</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="EmployeeID">
<DataField>EmployeeID</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="City">
<DataField>City</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>Northwind</DataSourceName>
<CommandText>SELECT Customers.CompanyName, Customers.CustomerID, Orders.OrderID, Employees.LastName, Employees.FirstName, Employees.EmployeeID,
Customers.City
FROM Customers INNER JOIN
Orders ON Customers.CustomerID = Orders.CustomerID INNER JOIN
Employees ON Orders.EmployeeID = Employees.EmployeeID</CommandText>
</Query>
</DataSet>
</DataSets>
<LeftMargin>1in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<rd:ReportID>c31d746f-9224-4fcd-8568-e5376409e635</rd:ReportID>
<BottomMargin>1in</BottomMargin>
<Language>en-US</Language>
</Report>
--020206060805020100000401--Yes, you're right. Do your sort in the dataset query not in the dataregion
Sorting tab.
Use ORDER BY in the query, that is.
Charles Kangai, MCT, MCDBA
"Aaron S." wrote:
> It seems First is returning the first row returned by the Dataset, not
> the first row according to the sorting of the dataregion or grouping (as
> the First function's documentation implies). This ends up with some
> mysterious results in my reports. I created a simple example using the
> SQL Northwind that shows the problem and attached it. Is this a bug or
> intended behavior? It makes some of my reports using sorted groups have
> seemingly bogus results when viewed.
> Thanks,
> Aaron
>|||Thank you for the reply. I have added an order by to the SProc in my
production report and it works, this is not ideal for me as I'd rather
not have the SProc's sort dependent on a report. So is this a bug we
should expect to be corrected?
Thanks again for responding.
Charles Kangai wrote:
> Yes, you're right. Do your sort in the dataset query not in the dataregion
> Sorting tab.
> Use ORDER BY in the query, that is.
> Charles Kangai, MCT, MCDBA
> "Aaron S." wrote:
>
>>It seems First is returning the first row returned by the Dataset, not
>>the first row according to the sorting of the dataregion or grouping (as
>>the First function's documentation implies). This ends up with some
>>mysterious results in my reports. I created a simple example using the
>>SQL Northwind that shows the problem and attached it. Is this a bug or
>>intended behavior? It makes some of my reports using sorted groups have
>>seemingly bogus results when viewed.
>>Thanks,
>>Aaron|||I just want to confirm that SRS ignores the Sort order of the table and
uses the sort order of the SP query. Is version 2 out yet ?!!
Aaron S. wrote:
> Thank you for the reply. I have added an order by to the SProc in my
> production report and it works, this is not ideal for me as I'd
rather
> not have the SProc's sort dependent on a report. So is this a bug we
> should expect to be corrected?
> Thanks again for responding.
>
> Charles Kangai wrote:
> > Yes, you're right. Do your sort in the dataset query not in the
dataregion
> > Sorting tab.
> > Use ORDER BY in the query, that is.
> >
> > Charles Kangai, MCT, MCDBA
> >
> > "Aaron S." wrote:
> >
> >
> >>It seems First is returning the first row returned by the Dataset,
not
> >>the first row according to the sorting of the dataregion or
grouping (as
> >>the First function's documentation implies). This ends up with some
> >>mysterious results in my reports. I created a simple example using
the
> >>SQL Northwind that shows the problem and attached it. Is this a bug
or
> >>intended behavior? It makes some of my reports using sorted groups
have
> >>seemingly bogus results when viewed.
> >>
> >>Thanks,
> >>
> >>Aaron
> >>