Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Thursday, March 29, 2012

Exporting query result into excel file

Hi i am newbie . I want to transfer the query result into excel file throgh asp code. can any one help me out.

Also how can i automate my routing task that is data in excel to be updated in the table which is in SQL server. Say x.xls is the daily file maintaned by me and i want y table in sql server to be appended once this file is saved.Writing a macro in Excel could be one of the solutions!!!sql

Exporting Problem in crystal reports

Hi all

I am dispalying the data in crystal reports using selection formula from table.I am using Asp.net 1.1 version.Data is coming properly according to the selection criteria. But while exporting to any format like (pdf,excel,word) irrespective of the selection formulae all the data from the table is exporting.
Can any one help me.

Regrds
Syamreply

Tuesday, March 27, 2012

Exporting from MSDE to SQL Server

Hi All,

I recently created my entire site before even starting to look at hosting providers. It's a very complex ASP.NET e-Commerce site built on SQL Server. I've (nearly) got it to a point where I want it to go live.

I found a host that caters for all my needs and is a good price. What I need to do now is migrate all my data, as well as all my tables and stored procedures, into the database with my host.

Is there an easy wy to go about this?

- Mina

I would install SQL Server backup your databases and restore it in SQL Server with same name if you use the restore from Device option in the backup wizard and SQL Server will move everything for you including permissions. Then moving to the host provider will be easy because SQL Sever Enterprise Manager is needed to move your databases with most Host Companies. Hope this helps.|||You need to talk to your hosting provider -- the easiest way toaccomplish this will be to simply send them the detached MDF and LDFfiles and have the provider attach them. Whether or not they'rewilling to do that is another questionBig Smile [:D]

Wednesday, March 21, 2012

Exporting a MS-SQL database

I have an asp site connected to an MS-SQL database, I need to export
the database and import it in to a MySQL database? How would I be able
to do this? My only way of communicating with the MS-SQL database is
via asp scripts.

Thank You
Ben Sagal

PS. i have no problem fixing the SQL code manually to be compatible
with MySQL.TI know you only have access via an asp script , but MySQL do offer a
migration toolkit

--

Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com/SQL
<bsagal@.gmail.comwrote in message
news:1191321416.670361.48860@.50g2000hsm.googlegrou ps.com...

Quote:

Originally Posted by

>I have an asp site connected to an MS-SQL database, I need to export
the database and import it in to a MySQL database? How would I be able
to do this? My only way of communicating with the MS-SQL database is
via asp scripts.
>
Thank You
Ben Sagal
>
PS. i have no problem fixing the SQL code manually to be compatible
with MySQL.
>

Monday, March 19, 2012

Export/Import ASP.NET Membership data

Greetings All,
I need to export/import the ASP.NET Membership data which is installed in my database via aspnet_regsql.exe. Does anyone have the Cliff notes on how to do this?

Thanks in advance.
Since this is just a set of standard SQL Server tables, you should be able to use any SSIS tool or technique to do this. The import/export wizard in SQL Server Management Studio should work just fine.|||That's what I was hoping, but unfortunetly that is not the case.

When I run the package created with the wizard specifying only the following tables:

aspnet_Users
aspnet_Applications
aspnet_Roles
aspnet_UsersInRoles
aspnet_Membership
aspnet_SchemaVersions

I get the following output:

Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning.
Information: 0x40043006 at Data Flow Task, DTS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Data Flow Task, DTS.Pipeline: Pre-Execute phase is beginning.
Information: 0x4004300C at Data Flow Task, DTS.Pipeline: Execute phase is beginning.
Information: 0x402090DF at Data Flow Task, Destination 1 - aspnet_Membership [132]: The final commit for the data insertion has started.
Information: 0x402090DF at Data Flow Task, Destination 3 - aspnet_SchemaVersions [274]: The final commit for the data insertion has started.
Information: 0x402090DF at Data Flow Task, Destination - aspnet_Applications [28]: The final commit for the data insertion has started.
Information: 0x402090DF at Data Flow Task, Destination 2 - aspnet_Roles [222]: The final commit for the data insertion has started.
Information: 0x402090DF at Data Flow Task, Destination 4 - aspnet_Users [334]: The final commit for the data insertion has started.
Error: 0xC0202009 at Data Flow Task, Destination 3 - aspnet_SchemaVersions [274]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Violation of PRIMARY KEY constraint 'PK__aspnet_SchemaVer__4316F928'. Cannot insert duplicate key in object 'dbo.aspnet_SchemaVersions'.".
Error: 0xC0202009 at Data Flow Task, Destination 2 - aspnet_Roles [222]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK__aspnet_Ro__Appli__24E777C3". The conflict occurred in database "CommonPassDB", table "dbo.aspnet_Applications", column 'ApplicationId'.".
Information: 0x402090E0 at Data Flow Task, Destination 3 - aspnet_SchemaVersions [274]: The final commit for the data insertion has ended.
Information: 0x402090E0 at Data Flow Task, Destination 2 - aspnet_Roles [222]: The final commit for the data insertion has ended.
Error: 0xC0047022 at Data Flow Task, DTS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination 2 - aspnet_Roles" (222) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
Error: 0xC0047022 at Data Flow Task, DTS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination 3 - aspnet_SchemaVersions" (274) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread2" has exited with error code 0xC0202009. There may be error messages posted before this with more information on why the thread has exited.
Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread3" has exited with error code 0xC0202009. There may be error messages posted before this with more information on why the thread has exited.
Error: 0xC0202009 at Data Flow Task, Destination - aspnet_Applications [28]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Violation of UNIQUE KEY constraint 'UQ__aspnet_Applicati__3E52440B'. Cannot insert duplicate key in object 'dbo.aspnet_Applications'.".
Error: 0xC0202009 at Data Flow Task, Destination 4 - aspnet_Users [334]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK__aspnet_Us__Appli__25DB9BFC". The conflict occurred in database "CommonPassDB", table "dbo.aspnet_Applications", column 'ApplicationId'.".
Information: 0x402090E0 at Data Flow Task, Destination 4 - aspnet_Users [334]: The final commit for the data insertion has ended.
Information: 0x402090E0 at Data Flow Task, Destination - aspnet_Applications [28]: The final commit for the data insertion has ended.
Error: 0xC0202009 at Data Flow Task, Destination 1 - aspnet_Membership [132]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK__aspnet_Me__Appli__178D7CA5". The conflict occurred in database "CommonPassDB", table "dbo.aspnet_Applications", column 'ApplicationId'.".
Error: 0xC0047022 at Data Flow Task, DTS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination 4 - aspnet_Users" (334) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
Information: 0x402090E0 at Data Flow Task, Destination 1 - aspnet_Membership [132]: The final commit for the data insertion has ended.
Error: 0xC0047022 at Data Flow Task, DTS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - aspnet_Applications" (28) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread4" has exited with error code 0xC0202009. There may be error messages posted before this with more information on why the thread has exited.
Error: 0xC0047022 at Data Flow Task, DTS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination 1 - aspnet_Membership" (132) failed with error code 0xC0202009. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0202009. There may be error messages posted before this with more information on why the thread has exited.
Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread1" has exited with error code 0xC0202009. There may be error messages posted before this with more information on why the thread has exited.
Information: 0x40043008 at Data Flow Task, DTS.Pipeline: Post Execute phase is beginning.
Information: 0x402090DF at Data Flow Task, Destination 5 - aspnet_UsersInRoles [387]: The final commit for the data insertion has started.
Information: 0x402090E0 at Data Flow Task, Destination 5 - aspnet_UsersInRoles [387]: The final commit for the data insertion has ended.
Information: 0x40043009 at Data Flow Task, DTS.Pipeline: Cleanup phase is beginning.
Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "Destination - aspnet_Applications" (28)" wrote 1 rows.
Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "Destination 1 - aspnet_Membership" (132)" wrote 1 rows.
Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "Destination 2 - aspnet_Roles" (222)" wrote 1 rows.
Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "Destination 3 - aspnet_SchemaVersions" (274)" wrote 3 rows.
Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "Destination 4 - aspnet_Users" (334)" wrote 1 rows.
Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "Destination 5 - aspnet_UsersInRoles" (387)" wrote 0 rows.
Task failed: Data Flow Task
SSIS package "Package1.dtsx" finished: Failure.
The program '[5340] Package1.dtsx: DTS' has exited with code 0 (0x0).

Has anyone ever tried this before?

Thanks.
|||You need to ensure that you're running the packages in the correct order, so that the foreign key constraints aren't violated.|||The wizard creates a single package containing a single Data Flow Task. Inside the Data Flow Task is a pair of OLEDB Source and Destination Data Flow Sources. How do I control the order in which the OLEDB "pairs" execute?

Must I break each one of these out into its own Data Flow Task?
|||Yes. This default configuraion is running them in parallel; you need them to run in a specific serial order based on the FKs defined in the database, which cannot be done in a single data flow.|||Ok, thanks. That did it.

I appreciate your help.

|||Thanks for the feedback - good luck!

Sunday, February 26, 2012

Export to Excel -multiple sheets

Hi,

I am using .rdlc report in ASP.NET 2.0.

My report consists of 10 subreport and 1 main report. I want to export each subreport in separate sheets like Shee1 is Subreport1 and Sheet2 is Subreport2 etc... How can i do this.

Thanks.

The Excel renderer creates new worksheet tabs for each page in your report. To get a new page for each Subreport, put each of them inside a Rectangle and set PageBreakAtStart on the Rectangle to True.

-Chris

|||

I haven't been able to get the sub reports to show when exported to excel. Is there a trick to this?

Dwayne

|||

This works for me. However, what does not work, is using a subreport in a cell of a table and export that to Excel.

Regards, Jeroen

Export to Excel -multiple sheets

Hi,

I am using .rdlc report in ASP.NET 2.0.

My report consists of 10 subreport and 1 main report. I want to export each subreport in separate sheets like Shee1 is Subreport1 and Sheet2 is Subreport2 etc... How can i do this.

Thanks.

The Excel renderer creates new worksheet tabs for each page in your report. To get a new page for each Subreport, put each of them inside a Rectangle and set PageBreakAtStart on the Rectangle to True.

-Chris

|||

I haven't been able to get the sub reports to show when exported to excel. Is there a trick to this?

Dwayne

|||

This works for me. However, what does not work, is using a subreport in a cell of a table and export that to Excel.

Regards, Jeroen

|||Hi, related to Jeroen's Question...
"This works for me. However, what does not work, is using a subreport in a cell of a table and export that to Excel."

As a solution for this problem, we can have a rectangle within the table and place the subreport inside it, it allows to export. There is again few limitaions further but at least we can export the data of the subreport. Hope this helps.

Export to Excel -multiple sheets

Hi,

I am using .rdlc report in ASP.NET 2.0.

My report consists of 10 subreport and 1 main report. I want to export each subreport in separate sheets like Shee1 is Subreport1 and Sheet2 is Subreport2 etc... How can i do this.

Thanks.

The Excel renderer creates new worksheet tabs for each page in your report. To get a new page for each Subreport, put each of them inside a Rectangle and set PageBreakAtStart on the Rectangle to True.

-Chris

|||

I haven't been able to get the sub reports to show when exported to excel. Is there a trick to this?

Dwayne

|||

This works for me. However, what does not work, is using a subreport in a cell of a table and export that to Excel.

Regards, Jeroen

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

Export to Excel Functionality (SQL RS 2005)?

Hi there,
We have an ASP.NET 2.0 application that we are currently using and
would like to tie in some SQL RS 2005 functionality. Specifically,
we'd like to be able to use the report exporting functionality to
generate Excel or Acrobat docs, without having to use the report
viewer or using Reporting Services to generate a report in any way
that would be sent to the client. In other words, we don't want
reporting services to display the report on the site in any way, we
just want it to return the doc type selected from a drop down list.
Is this possible?
Thanks in advance,
RichReporting services is built totally on web services. This is used by
everything you see. For instance, Report Manager (the portal that ships with
RS uses it). In 2005 the reportviewer control uses it. It is totally
documented and you can use it in your app and render to whatever format you
like (html, csv, excel, pdf etc). You stream it back to your app and then do
with it as you please.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"rchung77" <rich.chung@.gmail.com> wrote in message
news:1186758560.748324.102890@.e9g2000prf.googlegroups.com...
> Hi there,
> We have an ASP.NET 2.0 application that we are currently using and
> would like to tie in some SQL RS 2005 functionality. Specifically,
> we'd like to be able to use the report exporting functionality to
> generate Excel or Acrobat docs, without having to use the report
> viewer or using Reporting Services to generate a report in any way
> that would be sent to the client. In other words, we don't want
> reporting services to display the report on the site in any way, we
> just want it to return the doc type selected from a drop down list.
> Is this possible?
> Thanks in advance,
> Rich
>

Wednesday, February 15, 2012

Export Report Result into Word Format using ReportViewer in asp.net2.0

Hi,

I am very new to ReportViewer in asp.net2.0 web server control which is a part of data. I dont know how to export my report result into word format. I am not using crystal report or SQL server 2005 reorting services. Please give me a solution to export my report result into WordFormat?

Divya

Reportviewer local edition only allows you to export to Excel of PDF. Word format is not yet supported.

|||

Hi,

Thank you very much for your response.

Can I done it through programatically?

I have one more doubt. I bind my report with the ReportViewer control. But it shows the vertical scrollbar. Is any way to hide the scrollbar and set the no of reports displayed per page? Please reply me soon.

Thanking You

Divya

|||

I don't think you can export it to Word (check on that). For the scrollbars, set the Asyncrendering property to false and SizeToReportContent property to true. This will size the reportviewer according to the content rendered.