Showing posts with label fields. Show all posts
Showing posts with label fields. Show all posts

Monday, March 12, 2012

Extend the metadata

Hi,
I want to add more fields in report list. So instead of just showing the
report name and description, I want hyperlink to some other information as
well. Is it possible? if so how can I do that?
Any help would be highly appreciated
Regards,You can add additonal fields to the table on the report (where you drop the
report fields). Right mouse click on a column and add another column. Then
put some text in the field (like detail ...). I then make it blue and
underlined. The do a right mouse click, properties, advanced properties,
navigation tab and use the jump to URL.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"mna" <mna@.somewhere.com> wrote in message
news:%230qKrQ4YFHA.2124@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I want to add more fields in report list. So instead of just showing the
> report name and description, I want hyperlink to some other information as
> well. Is it possible? if so how can I do that?
> Any help would be highly appreciated
> Regards,
>|||Thanks Bruce!
I think this is not what I wanted to know.
What I want to know is when I have created one report, it goes to the main
reports list. That list contains all the reports. Now on that list I want to
add additional columns so before running the report if users want to see
additional information they can do so. For example besides report name I
want to see who actually approved that report or what is the name of the
department this report belongs to.
Regards,
Nadeem
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:uugoGU5YFHA.1368@.tk2msftngp13.phx.gbl...
> You can add additonal fields to the table on the report (where you drop
the
> report fields). Right mouse click on a column and add another column. Then
> put some text in the field (like detail ...). I then make it blue and
> underlined. The do a right mouse click, properties, advanced properties,
> navigation tab and use the jump to URL.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "mna" <mna@.somewhere.com> wrote in message
> news:%230qKrQ4YFHA.2124@.TK2MSFTNGP14.phx.gbl...
> > Hi,
> > I want to add more fields in report list. So instead of just showing the
> > report name and description, I want hyperlink to some other information
as
> > well. Is it possible? if so how can I do that?
> >
> > Any help would be highly appreciated
> >
> > Regards,
> >
> >
>|||The data needs to come from somewhere. If you modify the xml it is being
rendered and any modifications are going to be ignored. I don't think they
would even be accessible by the time the report runs. If you can get the
extra information from a database then you can have an additional dataset
that you get this information from.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"mna" <mna@.somewhere.com> wrote in message
news:eiiI8c9YFHA.3620@.TK2MSFTNGP09.phx.gbl...
> Thanks Bruce!
> I think this is not what I wanted to know.
> What I want to know is when I have created one report, it goes to the main
> reports list. That list contains all the reports. Now on that list I want
> to
> add additional columns so before running the report if users want to see
> additional information they can do so. For example besides report name I
> want to see who actually approved that report or what is the name of the
> department this report belongs to.
> Regards,
> Nadeem
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:uugoGU5YFHA.1368@.tk2msftngp13.phx.gbl...
>> You can add additonal fields to the table on the report (where you drop
> the
>> report fields). Right mouse click on a column and add another column.
>> Then
>> put some text in the field (like detail ...). I then make it blue and
>> underlined. The do a right mouse click, properties, advanced properties,
>> navigation tab and use the jump to URL.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>>
>> "mna" <mna@.somewhere.com> wrote in message
>> news:%230qKrQ4YFHA.2124@.TK2MSFTNGP14.phx.gbl...
>> > Hi,
>> > I want to add more fields in report list. So instead of just showing
>> > the
>> > report name and description, I want hyperlink to some other information
> as
>> > well. Is it possible? if so how can I do that?
>> >
>> > Any help would be highly appreciated
>> >
>> > Regards,
>> >
>> >
>>
>

expressions based on subtotals

How do I create calculated fields based on subtotals?

SSRS 2005 doesn't support aggregates over aggregates. You should try deriving the total from the details. If you need absolutely to use subtotals, you can write a simple function that let you set/get the total, e.g.

Dim _total as Double

Sub SetTotal (ByVal total As Double) As Double

_total = total

return total

End Function

Function GetTotal() as Double

return _total

End Function

Then, in subtotal textboxes, change their values to =Code.SetTotal(Fields!FieldName.Value). When you need the total call GetTotal, e.g. =Code.GetTotal(). Of course, in real life it may need to write more complex logic to maintain the totals.

|||Thanks for the feedback, I'll give it a try I'm actually trying to create report to emulate growth over period(OLAP) for an Informix datasource I want to see the difference of the yearly subtotals Still exploring options|||was able to nest a table within a matrix and do all my calculations

expressions based on subtotals

How do I create calculated fields based on subtotals?

SSRS 2005 doesn't support aggregates over aggregates. You should try deriving the total from the details. If you need absolutely to use subtotals, you can write a simple function that let you set/get the total, e.g.

Dim _total as Double

Sub SetTotal (ByVal total As Double) As Double

_total = total

return total

End Function

Function GetTotal() as Double

return _total

End Function

Then, in subtotal textboxes, change their values to =Code.SetTotal(Fields!FieldName.Value). When you need the total call GetTotal, e.g. =Code.GetTotal(). Of course, in real life it may need to write more complex logic to maintain the totals.

|||Thanks for the feedback, I'll give it a try I'm actually trying to create report to emulate growth over period(OLAP) for an Informix datasource I want to see the difference of the yearly subtotals Still exploring options|||was able to nest a table within a matrix and do all my calculations

Friday, March 9, 2012

Expression to get the last word of the fields

Hi,

How do i get the last word of a field in an expression?

Thanks

MosheDeutsch wrote:

Hi,

How do i get the last word of a field in an expression?

Thanks

Its a string manipulation problem right? There are lots of string functions available to you in the expression language. Check them out in the top right hand corner of the expression editor.

-Jamie

|||

I am aware of all the string functions available in the expression editor, how would I last word of a field using the functions available?

Thanks

|||Well, with Perl this would be easy!

But for your issue, what defines a "word"? How many words are there in the field? Is the number of words in a field consistent across all rows? What if the field only has one "word"? Etc... Show us some data.|||

Its not consistent across all rows, a word is delimited by a space, will always have more then one word, I am sure its possible to do it with code but I would like to now how I can do it with the expression builder

Thanks

|||You'd probably be better off trying this in a script component.|||

I was trying to eliminate script, i am not so familiar with script, but it that’s the only way I will need a sample please

Thanks

|||Add a script component to your dataflow... Add an Output Column, LastWord, of type string. Make sure that the field you are working on is selected as an input to the script component.

Then, here's your script... Note the "your-field-here" location, which represents the input field name that you are trying to get the last word of.

Imports System
Imports System.Data
Imports System.Math
Imports System.Text.RegularExpressions
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

Public Class ScriptMain
Inherits UserComponent

Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
Dim WordArray As Array
Dim RegExprObj As Regex
Dim ArrayLength As Integer

RegExprObj = New Regex(" ")
WordArray = RegExprObj.Split(row.your-field-here)
ArrayLength = WordArray.Length
Row.LastWord = WordArray.GetValue(ArrayLength - 1).ToString
End Sub

End Class|||As an aside, I didn't know how to do this prior to you asking your question. Using Google was a big help, by the way. Search for "vb.net regular expressions" and go from there.

I don't guarantee that this is the best way to solve your problem, but it works with my test data.

You might also want to be sure that your field is trimmed before coming into this script component.|||

Thanks so much, I will try it

|||

MosheDeutsch wrote:

I am aware of all the string functions available in the expression editor, how would I last word of a field using the functions available?

Thanks

Have you actually attempted this or do you just want someone else to do your work for you?

A combination of FINDSTRING, SUBSTRING and REVERSE should be able to do it for you.

This worked for me (where [Column] is the name of a column with a sentance in it):

REVERSE(SUBSTRING(REVERSE([Column]),1,FINDSTRING(REVERSE([Column])," ",1)))

I'll stick a demo package up on my blog as well. Look in about an hour.

-Jamie

|||

Jamie Thomson wrote:

Have you actually attempted this or do you just want someone else to do your work for you?

A combination of FINDSTRING, SUBSTRING and REVERSE should be able to do it for you.

This worked for me (where [Column] is the name of a column with a sentance in it):

REVERSE(SUBSTRING(REVERSE([Column]),1,FINDSTRING(REVERSE([Column])," ",1)))

I'll stick a demo package up on my blog as well. Look in about an hour.

-Jamie

More than one way to solve the problem... Let your testing be the judge of what's correct for you.|||

Yes I did try different ways to do it with a combination of FINDSTRING, SUBSTRING and LEN I never used the REVERSE now I will for sure know the different ways how to use it and how powerful it is.

Thanks for every one

|||

Phil Brammer wrote:


More than one way to solve the problem... Let your testing be the judge of what's correct for you.

Amen to that.

There's usually more than one way to solve a problem in SSIS.

-Jamie

|||

Here's the demo:

Extract last word from a sentance
(http://blogs.conchango.com/jamiethomson/archive/2006/11/22/SSIS_3A00_-Extract-last-word-from-a-sentance.aspx)

-Jamie

Expression problem

Using this expression to get the percentage of two fields. The problem is
when both fields contain values of 0 then I get 'NaN%' .
How can I rewrite the expression to give 0%
=ROUND(((SUM(Fields!P2_OPENED.Value)/SUM(Fields!P2_CLOSED.Value)) *100),2) &
"%" & vbcrlf & ""
Thanks,=IIF(SUM(Fields!P2_CLOSED.Value) <> 0,
ROUND(((SUM(Fields!P2_OPENED.Value)/SUM(Fields!P2_CLOSED.Value)) *100),2) ,
0) &
"%" & vbcrlf & ""
"cheilig" wrote:
> Using this expression to get the percentage of two fields. The problem is
> when both fields contain values of 0 then I get 'NaN%' .
> How can I rewrite the expression to give 0%
> =ROUND(((SUM(Fields!P2_OPENED.Value)/SUM(Fields!P2_CLOSED.Value)) *100),2) &
> "%" & vbcrlf & ""
> Thanks,
>

Expression help needed with filtering

I have a fcolum in my ssrs report that give me $ amounts. the problem is I only want to see the the fields that have $.01 dollars or greater it is now showing blanks and $0.00 in some of the fields I need tofilter this out in the expression statement can some on help me with this.

example

john doe | $102.00 | ( I need to keep this )

Jane doe | | ( I dont want this to show) This just shows a blank

Mark Doe | $0.00 | ( I dont want this to show)

Bill Doe | $200.00 | ( I want this)

my expression =FormatCurrency(Fields!MASRCAMOUNT.Value)

What do you want to show if the value is 0? Do the FormatCurrency only if the value is > 0. Something like this:

=IIF(convert.todecimal(Fields!MASRCAMOUNT.Value) > 0, FormatCurrency(Fields!MASRCAMOUNT.Value), '')

|||

I tried the expression but it is erroring sayin g it doesnt like the todecimal I get it underlined in red this is what I have.

IIF(convert.todecimal(FormatCurrency(Fields!MASRCVAMOUNT.Value) > 0, FormatCurrency(Fields!MASRCVAMOUNT.Value))

I t underlining the todecimal in red it there what do I do

|||

IIF(convert.todecimal(FormatCurrency(Fields!MASRCVAMOUNT.Value) > 0, FormatCurrency(Fields!MASRCVAMOUNT.Value))

IIF(CDec(FormatCurrency(Fields!MASRCVAMOUNT.Value) > 0, FormatCurrency(Fields!MASRCVAMOUNT.Value)) I tried this also butr it doesnt work can some on help me.

|||

Yeah Reporting Services is weird. Try this:

=IIF(CDec(Fields!MASRCAMOUNT.Value) > 0, FormatCurrency(Fields!MASRCAMOUNT.Value), '')

|||

I tried the below but I keep getting error the , ") at the end highlight in red. I have tried removing the ," and just leaving )) this doesnt work either. any suggestions.

=IIF(CDec(Fields!MASRCAMOUNT.Value) > 0, FormatCurrency(Fields!MASRCAMOUNT.Value), '')

|||

What do you want to show if the value is blank? It this good:

= IIF(CDec(Fields!MASRCAMOUNT.Value)>0, FormatCurrency(Fields!MASRCAMOUNT.Value), FormatCurrency(CDec(0)))

Expression help

Howdy, I think this will be aneasy question. I want to return the Max
of three database fields.
I might have Serious = 20 and Medium = 10 and Low = 30
In that case I want it to return 30.
if it is Serious = 2 Medium = 0 and Low = 5
I want it to return 5
If it is serious = 0 Medium =10 Low =3
I want it to return 10.
I am looking at the Max function (aggregate) and can't figure out the
syntaxt. Any help would be appreciated.try
=Math.Max(Fields!Low.Value,Math.Max(Fields!Medium.Value,Fields!Serious.Value))
"Mandoskippy" wrote:
> Howdy, I think this will be aneasy question. I want to return the Max
> of three database fields.
> I might have Serious = 20 and Medium = 10 and Low = 30
> In that case I want it to return 30.
>
> if it is Serious = 2 Medium = 0 and Low = 5
> I want it to return 5
>
> If it is serious = 0 Medium =10 Low =3
> I want it to return 10.
> I am looking at the Max function (aggregate) and can't figure out the
> syntaxt. Any help would be appreciated.
>

Wednesday, March 7, 2012

Expression Fields -> Constants?

When you go to create an expression, the very first set of fields is
Constants with a plus sign next to it. When I click it, however, it says "no
constants available for this property". What is this? What is it supposed
to do? And how does one get it populated?
Thanks,
Catadmin
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)Was wondering the same for myself.
We have a deployment issue where the hyperlinks are constants for a site,
but on each report server, the hyperlink could be pointing to a different
location.
( Not a point to a report, but to a web app location )
So a constant that a non-progammer can change would be very useful.
Whilst one can use a parameter as a constant, you have to set this for every
report!
This is painful if you have 50 reports!
A global constant would be very useful.
The other way is to write a dll which points to a text file where you put
your constants in.
But if the Constants collection could be set and used, that would simplify
deployment and even things like setting fonts for headings, could be listed
here.
"Catadmin" wrote:
> When you go to create an expression, the very first set of fields is
> Constants with a plus sign next to it. When I click it, however, it says "no
> constants available for this property". What is this? What is it supposed
> to do? And how does one get it populated?
> Thanks,
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: If a person is Microsoft Certified, does that mean that
> Microsoft pays the bills for the funny white jackets that tie in the back?
> @.=)|||Finally solved the constant problem.
When you are writing an expression, the constatns section will be there but
will only have values if you are writing an expression say in a background
color property.
To use contants used in all reports use the web.config file. This works
great and makes changing a constant in all reports quick and painless.
Regards,
Tom Bizannes
"Catadmin" wrote:
> When you go to create an expression, the very first set of fields is
> Constants with a plus sign next to it. When I click it, however, it says "no
> constants available for this property". What is this? What is it supposed
> to do? And how does one get it populated?
> Thanks,
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: If a person is Microsoft Certified, does that mean that
> Microsoft pays the bills for the funny white jackets that tie in the back?
> @.=)

Expression as criteria

I have tables

tbl_Last_Update
Last_Update (dd:mm:yyyy hh:mm:ss)

tbl_Imported_data

Fields....
Create_stamp (dd:mm:yyyy hh:mm:ss)

I need to create a view showing records from tbl_Imported_data where tbl_Imported_data.Create_stamp > tbl_Last_Update.Last_Update

Problem is how to set criteria into the view.

Expression 'Dmax("[Last_Update]","tbl_Last_Update")' as criteria works fine in MS ACCESS.

Is there any solutions for SQLServer, how to set corresponding expression (referring to other tables or queries) as criteria ?

Thanks in advance

- MarkWhat is the data type you are using datetime/smalldatetime/timestamp ?|||rnealejr:

What is the data type you are using datetime/smalldatetime/timestamp ?

--

Data type is datetime.

Thank a lot for your interest !

BR,

Mark

--|||I am not sure, you may want something like this:

select *
from tbl_Imported_data
where Create_stamp>
(
select max(Last_Update) from tbl_Last_Update
)|||--

I am not sure, you may want something like this:

select *
from tbl_Imported_data
where Create_stamp> (select max(Last_Update) from tbl_Last_Update)

--

This syntax works fine. THANK YOU !

- Mark

Friday, February 17, 2012

Exporting to CSV add "_Value" or "_Value2" to the field name

Hi,

When I'm export a report that has been build in the "Report Builder" to csv to all fields caption added at the end of the field name the word "_Value" or "_Value2"

example:

field name in the report: EmployeeName

field in the csv : EmployeeName_Value

How can I remove this adding?

Thanks

Assaf

Assaf,

There is no easy way to change CSV heading in ReportBuilder, but you can save the report uploaded to the Report Server on a local disk, modify RDL and change names of the column headings, and upload it back to the server.

To do this, you can either search for "_Value" in the textbox names in RDL file and remove it, or add a child XML element node DataElementName in the RDL for each text box with column heading you want to modify:

<Textbox Name="Component_Value">
<DataElementOutput>Output</DataElementOutput>
<DataElementName>Component</DataElementName>
<CanGrow>true</CanGrow>
<Action>
....

The value of <DataElementName> element becomes a column heading in CSV output.

Note though that if you modify the uploaded report in ReportBuilder after you applied your changes, the changes will be lost as ReportBuilder re-generates RDL.

Thanks!

exporting to CSV (comma delimited)

Hi,
I've done a report based on several fields and i want to export my report in
a CSV file. Unfortunatly my fields have commas in it. So, is there a
opportunity to change
the deliminator to e.g. ; or #?
Thanks for answering
Tom.Sufix the report URL with &rs:format=CSV&rc:FieldDelimiter=%23 for #
delimiter and &rs:format=CSV&rc:FieldDelimiter=";" for semi-colon delimiter.
Refer to
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_soapapi_dev_34fa.asp
for an explanation on FieldDelimiter CSV device info setting.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tom" <tom.suhr@.bbtsoftware.ch> wrote in message
news:uoNyKwlaEHA.996@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've done a report based on several fields and i want to export my report
in
> a CSV file. Unfortunatly my fields have commas in it. So, is there a
> opportunity to change
> the deliminator to e.g. ; or #?
> Thanks for answering
> Tom.
>
>|||Hello,
thanks for your help. Unfortunatly I still have the problem.
because I do not wan't to programm enything. Is it possible
to define the deliminator in the report.rdl or whithin the report-manager?
My solution should be independent from any program, and I want,
that the administrator only has to define the time of the job. My locig
is all in a stored procedure.
Thanks for helping
Tom.
"Ravi Mumulla (Microsoft)" wrote:
> Sufix the report URL with &rs:format=CSV&rc:FieldDelimiter=%23 for #
> delimiter and &rs:format=CSV&rc:FieldDelimiter=";" for semi-colon delimiter.
> Refer to
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_soapapi_dev_34fa.asp
> for an explanation on FieldDelimiter CSV device info setting.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Tom" <tom.suhr@.bbtsoftware.ch> wrote in message
> news:uoNyKwlaEHA.996@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> > I've done a report based on several fields and i want to export my report
> in
> > a CSV file. Unfortunatly my fields have commas in it. So, is there a
> > opportunity to change
> > the deliminator to e.g. ; or #?
> >
> > Thanks for answering
> >
> > Tom.
> >
> >
> >
>
>|||Hello,
thanks for your help. Unfortunatly I still have the problem.
because I do not wan't to programm enything. Is it possible
to define the deliminator in the report.rdl or whithin the report-manager?
My solution should be independent from any program, and I want,
that the administrator only has to define the time of the job. My locig
is all in a stored procedure.
Thanks for helping
Tom.
"Ravi Mumulla (Microsoft)" wrote:
> Sufix the report URL with &rs:format=CSV&rc:FieldDelimiter=%23 for #
> delimiter and &rs:format=CSV&rc:FieldDelimiter=";" for semi-colon delimiter.
> Refer to
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_soapapi_dev_34fa.asp
> for an explanation on FieldDelimiter CSV device info setting.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Tom" <tom.suhr@.bbtsoftware.ch> wrote in message
> news:uoNyKwlaEHA.996@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> > I've done a report based on several fields and i want to export my report
> in
> > a CSV file. Unfortunatly my fields have commas in it. So, is there a
> > opportunity to change
> > the deliminator to e.g. ; or #?
> >
> > Thanks for answering
> >
> > Tom.
> >
> >
> >
>
>|||No. You'd have to specify the device info settings while accessing the
report via URL or rendering a report using SOAP API.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"tomline.se" <tomline.se@.discussions.microsoft.com> wrote in message
news:5298DD2A-AD06-4EE0-90B6-549746B063C4@.microsoft.com...
> Hello,
> thanks for your help. Unfortunatly I still have the problem.
> because I do not wan't to programm enything. Is it possible
> to define the deliminator in the report.rdl or whithin the report-manager?
> My solution should be independent from any program, and I want,
> that the administrator only has to define the time of the job. My locig
> is all in a stored procedure.
> Thanks for helping
> Tom.
>
> "Ravi Mumulla (Microsoft)" wrote:
> > Sufix the report URL with &rs:format=CSV&rc:FieldDelimiter=%23 for #
> > delimiter and &rs:format=CSV&rc:FieldDelimiter=";" for semi-colon
delimiter.
> > Refer to
> >
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_soapapi_dev_34fa.asp
> > for an explanation on FieldDelimiter CSV device info setting.
> >
> > --
> > Ravi Mumulla (Microsoft)
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > "Tom" <tom.suhr@.bbtsoftware.ch> wrote in message
> > news:uoNyKwlaEHA.996@.TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > >
> > > I've done a report based on several fields and i want to export my
report
> > in
> > > a CSV file. Unfortunatly my fields have commas in it. So, is there a
> > > opportunity to change
> > > the deliminator to e.g. ; or #?
> > >
> > > Thanks for answering
> > >
> > > Tom.
> > >
> > >
> > >
> >
> >
> >

exporting to CSV

I have a need to run an export of fields from a table into a CSV text file located on my e:\exports. Is there a simple way to do this?

Hi jim,

Why cant you use DTS service to transfer the tables datas into CSV file ?

|||

use the following query...

master..xp_cmdshell 'bcp "select * from master..sysobjects" queryout e:\exports\exported.csv -SMYSERVER -UMyUserName -pMyPassword -c -t "," -r "\n"'

|||thanks I will do!

Exporting text file and populate it as table using SQL

Hi,
I have a problem, I have some text files in the server. I have to export that file and read it line by line and then cut it into fields and populate it as a table in SQl with SQL commnads.

Could you anybody help mw with some hints, any relevent readings etc..
How can i use sql framework for thisIf you have control over how the text files can look like, I would recommend using the FOR XML and XML Shredding mechanisms (OpenXML, nodes() method).

Otherwise in SQL 2005, I would look into CLR user-defined functions to write the parsing code in your fav .Net language.

In SQL 2000, you would have to do it in TSQL or the mid-tier.

Also, if the data is not yet in the database but in a file, you can look into OpenRowset(BULK) in SQL Server 2005. Otherwise you need to read it in the mid-tier...

Exporting TEXT Field into CSV file

I have a record set I have to export on a weekly basis into a CSV file for a customer/client. One of the fields being included in the export is a TEXT field. When I export this field, the CSV file is truncating the record significantly.

Is there a way I can get the export to pass all the data in the TEXT field, or is this a limitation on the data transformation, or is it a limitation on the CSV file (because of the size/nature of the TEXT field).After taking a break, I tinkered around some more and got this to work with the DTS. Apparently a different result occurs if I use the DTS to save the TEXT field, as opposed to using the Query Analyzer and saving the results (which I was using for testing).

Wednesday, February 15, 2012

Exporting sorted data

Hi,

I have created a crystal report using visual studio. I have three fields in the report - Date, Time and No. of Clients. On loading report is sorted by Date and Time Fields. At run time I sort the report by number of cliets. It shows on Html fine but when i export it to PDF, it shows me the original data sorted by Date and Time. Has anyone run into similar problem ... any help would be appreciated.

Thanks,
DKOpen the report and Uncheck the option Save Data With reports option(from File menu), save the report and try|||hi,

I am using web application to show my crystal report and it does not have the option you told me to change.

I looked into all the options available ... and could not find "Save Data With reports option".

Thanks,
DK|||Hi dsaxena,

I don't think your problem is a "Save Data" problem. It sounds like you've discovered a bug/limitation with the viewer...there are a few.