Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Wednesday, March 21, 2012

Exporting a table to Excel using bcl utility (Newbie)

I am trying to learn SQL 2005 Express and I am having a problem exporting (if that is the correct word) a table to Excel.

I have created a view in the Northwind database called MyCustomerView and want to practice working with the table.

From the command prompt:

bcp Northwind.dbo.MyCustomerView out MCV.xls -S -T

I then get the error message:

c:\> bcp Northwind.dbo.MyCustomerView out MCV.xls -S -T

SQLState = 08001, NativeError = 10061

Error = [Microsoft][SQL Native Client]TCP Provider: No connection could be made because the target machine actively refused it.

SQLState = HYT00, NativeError = 0

Error = [Microsoft][SQL Native Client]Login timeout expired

SQLState = 08001, NativeError = 10061

Error = [Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

This is on a single machine running Widows XP Home.

Help Please

Did you enable remote connections on the SQL Server express machine ? See the Screencast on my site for more information and a walkthrough. Do you have SQL Browser started ? SQL Server will pick a port to bind it to the service. If SQL Browser is not started you will have to specify it within the server declaration. If started it will directly redirect you to the appropiate instance.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Thanks Jens

Everything you suggested I have tried, but am still getting the errors.

Monday, March 19, 2012

export with a webservice

Hi,
I have created an application with VIsual Studio.NET in C#. I used a
webservice in order to view my reports.
I want export my report in format that I want with this application.
How can I do? What is the solution?I've done this by putting into a dropdownlist the available export formats
for a particular report. then when i go to render the report i have the
following code:
try
{
report =rs.Render(reportPath,format,historyID,devInfo,parameters,credentials,showHideToggle,out
encoding, out mimeType, out optionalParams, out optionalWarnings, out
streamIDs);
switch(format)
{
case "PDF":
Response.ClearContent();
Response.AppendHeader("content-length", report.Length.ToString());
Response.ContentType = "application/pdf";
Response.BinaryWrite(report);
Response.Flush();
Response.Close();
break;
case "CSV":
Response.ClearContent();
Response.AppendHeader("content-length", report.Length.ToString());
Response.ContentType = "application/vnd.ms-excel";
Response.BinaryWrite(report);
Response.Flush();
Response.Close();
break;
case "EXCEL":
Response.ClearContent();
Response.AppendHeader("content-length", report.Length.ToString());
Response.ContentType = "application/vnd.ms-excel";
Response.BinaryWrite(report);
Response.Flush();
Response.Close();
break;
default:
Label1.Text = System.Text.Encoding.Default.GetString(report);
break;
}
}
catch (SoapException se)
{
Console.WriteLine(se.Detail.OuterXml);
}
"r388042" wrote:
> Hi,
> I have created an application with VIsual Studio.NET in C#. I used a
> webservice in order to view my reports.
> I want export my report in format that I want with this application.
> How can I do? What is the solution?|||Thanks you!!!
It's run very good!!!
Do you know how we can do in order to export in XML or TIFF?

Export window does not close

Report Server 2005; .NET framework 2.0; IE 6.0

I view a report in Report Manager, then I click the drop-down box and select an output type, select Save, and a new blank web page opens, then the small export window opens asking for the filename. The file is created, then I close the export window, but the blank web page window does not close. I can see that the web page showing my original view of the report is still open, but I have to close the blank web page myself. While not really an error, this is an annoyance for users. Is there a setting that will help prevent this problem? Is this a bug?

Thanks for any help.

Getting same problem as mentioned by DawnJ..

i want to rectify this problem as soon as possible..Reply back friends if u have relevant information for this thread...

Thanks in Advance

Bhoopathi...

Export window does not close

Report Server 2005; .NET framework 2.0; IE 6.0

I view a report in Report Manager, then I click the drop-down box and select an output type, select Save, and a new blank web page opens, then the small export window opens asking for the filename. The file is created, then I close the export window, but the blank web page window does not close. I can see that the web page showing my original view of the report is still open, but I have to close the blank web page myself. While not really an error, this is an annoyance for users. Is there a setting that will help prevent this problem? Is this a bug?

Thanks for any help.

Getting same problem as mentioned by DawnJ..

i want to rectify this problem as soon as possible..Reply back friends if u have relevant information for this thread...

Thanks in Advance

Bhoopathi...

Export view result using transferdatabase

I am trying to export the results of a view from an .adp to an .mdb
using TransferDatabase. The code I am using is
DoCmd.TransferDatabase acExport, "Microsoft Access", _
"C:\___work\WayAhead\Implementation\XTRA_Samples.md b" _
, acTable, "x_loe_vw", "LOE_tbl"

When I run this I get an error that states
" can't find the object 'x_loe_vw'".
Yet it is defined as a view.

Any ideas?
Thanks,
JerryJer (jerry.w.black@.saic.com) writes:
> I am trying to export the results of a view from an .adp to an .mdb
> using TransferDatabase. The code I am using is
> DoCmd.TransferDatabase acExport, "Microsoft Access", _
> "C:\___work\WayAhead\Implementation\XTRA_Samples.md b" _
> , acTable, "x_loe_vw", "LOE_tbl"
> When I run this I get an error that states
> " can't find the object 'x_loe_vw'".
> Yet it is defined as a view.
> Any ideas?

The one idea I get is that you should probably post to
comp.databases.ms-access, or some other Access forum, where people
may know Access better than in this forum.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||See if specifying "acQuery" instead of "acTable" helps.
If not try posting this on comp.databases.ms-access

"Jer" <jerry.w.black@.saic.com> wrote in message
news:1118070165.662857.296420@.z14g2000cwz.googlegr oups.com...
> I am trying to export the results of a view from an .adp to an .mdb
> using TransferDatabase. The code I am using is
> DoCmd.TransferDatabase acExport, "Microsoft Access", _
> "C:\___work\WayAhead\Implementation\XTRA_Samples.md b" _
> , acTable, "x_loe_vw", "LOE_tbl"
> When I run this I get an error that states
> " can't find the object 'x_loe_vw'".
> Yet it is defined as a view.
> Any ideas?
> Thanks,
> Jerry

Friday, March 9, 2012

Export to PDF Error: Index was out of range

When I view the report in HTML it works fine. It gives the following error when exported to PDF:

Index was out of range. Must be non negative and less than the size of the collection. Parameter name: Index.

Please help!

Hello,

Could you please provide some more info:

RS version

RDL file

Thanks!

Sunday, February 26, 2012

Export to Excel Link - Inactive -Critical - Need Help

Hi all,
I am using asp.net control(Reportviewer) to view the report in the web, but
when I render the report, the export link is inactive and when I choose the
refresh button, the Export link is activated.
For the first time the Export link button is inactive.
This issue is very critical, please need your help
Thanks
Balaji
--
Message posted via http://www.sqlmonster.comCan anyone answer this.
Balaji
--
Message posted via http://www.sqlmonster.com

Sunday, February 19, 2012

Export tables to csv file

Hi...

I have 4 connected table in sql, and i have view that query this 4 and create 1 table, can i export that to csv file?

thank you...

Once you have the SELECT written, export is quit easy. See http://www.codeproject.com/aspnet/Excel_CSV_export_button.asp An extended ASP.NET button control for exporting/downloading Excel or CSV file.

|||

Yes, you can!

How? By using DTS in SQL Server 2000 or SSIS in SQL Server 2005.

Justright click on the database and select "Tasks" then "Export".

Decide yoursource (your sql server andyour databasethat you are working on) then decide about yourdestination selectFlat File Destination from the drop down menu.

Click onBrowse, select your destination .cvs file.

Tip: You maycheck the box tomake table's columns in the first line of the .cvs file.

Select theFormat: (for example: Delimited)

Select theText Qualifier: (for example " or ' depends on your case).

Click onNext.

Now you can either to get dump thefull data in the table into the .cvs fileby selecting thefirst option,

OR

you may getpart of the data and dumpt it into the .cvs file by selecting thesecond option.

Click onNext.

Specify thesource Table OR View from the drop down menu. (usually you don't need to change the values of the others two drop down menues).

Click onNext, thenFinished.

We areDONE! Cool

I hope this steps will solve the issue.

Regards,
CS4Ever

-------------

If you find this post useful & helpful, please click on "Make as Answer" button.

Wednesday, February 15, 2012

export session details

My (pull subscription) replication agents allow me to view each agent's job
history and seasson details in the replication monitor (Enterprise Manager).
How I can export this list to examine more closely outside of EM?
TIA,
Set HistoryVerboseLevel to 3. Now your history will not be overwritten, but
you will have a slight performance degradation. Now as you are using pull
the history will be retained on the Subscribers. DTS is locally. History by
default only hangs around 2 days, you might want to set the history
retention period to something larger. Do this by right clicking on
Replication Monitor and selecting Distributor Properties. Click on the
Properties button and set History Retention to something larger.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"TCorp" <tcorpus@.hotmail.com> wrote in message
news:e$aY7jeqFHA.2876@.TK2MSFTNGP12.phx.gbl...
> My (pull subscription) replication agents allow me to view each agent's
job
> history and seasson details in the replication monitor (Enterprise
Manager).
> How I can export this list to examine more closely outside of EM?
> TIA,
>
>