Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Thursday, March 29, 2012

Exporting pdf from RS to a Win Form

I'm using Reporting Services 2005 and .Net framework 2.0 and want to display
reports from RS in my Windows form. My questions are:
1) I've got the pdf from the Render-method in the RS Web Service, and tried
to display the pdf in a WebBrowser in my Windows Form using the
WebBrowser.DocumentStream property. But I don't know how set the content type
to application/pdf. I only get the binary displayed in the browser.
Suggestions?
2) If I access, from the same browser as in 1), a pdf through an URL, it
works fine. So, is if possible to retreive a report as a pdf through an URL
reference directly?
3) I could try to display the pdf some kind of other pdf container in my
winform. Does anyone know some nice tools to do this?
Regards,
Tomsi2) According to Books online for SQL Server CTP April 2005, it should be
possible to specify rs:Format=PDF as a parameter in the URL. But this doesn't
help me. It just seems to ignore the parameter... What could be wrong? Or
just simply doesn't the 2005 version support URL access directly?
"Tomsi" wrote:
> I'm using Reporting Services 2005 and .Net framework 2.0 and want to display
> reports from RS in my Windows form. My questions are:
> 1) I've got the pdf from the Render-method in the RS Web Service, and tried
> to display the pdf in a WebBrowser in my Windows Form using the
> WebBrowser.DocumentStream property. But I don't know how set the content type
> to application/pdf. I only get the binary displayed in the browser.
> Suggestions?
> 2) If I access, from the same browser as in 1), a pdf through an URL, it
> works fine. So, is if possible to retreive a report as a pdf through an URL
> reference directly?
> 3) I could try to display the pdf some kind of other pdf container in my
> winform. Does anyone know some nice tools to do this?
> Regards,
> Tomsi|||I ran into this problem as well. I need to display pdf documents
within windows forms and I am trying to utilize the webbrowser control
but can't seem to set the contenttype to 'application/pdf'. Did you
ever find a solution?
Tomsi wrote:
> I'm using Reporting Services 2005 and .Net framework 2.0 and want to display
> reports from RS in my Windows form. My questions are:
> 1) I've got the pdf from the Render-method in the RS Web Service, and tried
> to display the pdf in a WebBrowser in my Windows Form using the
> WebBrowser.DocumentStream property. But I don't know how set the content type
> to application/pdf. I only get the binary displayed in the browser.
> Suggestions?
> 2) If I access, from the same browser as in 1), a pdf through an URL, it
> works fine. So, is if possible to retreive a report as a pdf through an URL
> reference directly?
> 3) I could try to display the pdf some kind of other pdf container in my
> winform. Does anyone know some nice tools to do this?
> Regards,
> Tomsi|||1) As a temporary solution I save the pdf-stream to a file, and access the
file with the WebBrowser.Url-property:
--
string fileName = Path.GetTempFileName() + ".pdf";
FileStream fs = new FileStream(fileName, FileMode.Create);
fs.Write(bytes, 0, bytes.Length);
fs.Close();
_browserReport.Url = new Uri(fileName);
--
But I would like to know how to do this without saving to disk.
2) As far as I can read the SQL Server 2005 documentation, it should work to
get a pdf through URL access from Reporting Services by setting the attribute
"Format=PDF" in the URL. But I can't get it to work in the CTP april
2005-version.
3) Haven't tried this further out. I think Adobe sells some kind of SDK
which might help.
So my answer is that I'm still looking for a good solution.
Tomsi
"rich.beaver@.gmail.com" wrote:
> I ran into this problem as well. I need to display pdf documents
> within windows forms and I am trying to utilize the webbrowser control
> but can't seem to set the contenttype to 'application/pdf'. Did you
> ever find a solution?
> Tomsi wrote:
> > I'm using Reporting Services 2005 and .Net framework 2.0 and want to display
> > reports from RS in my Windows form. My questions are:
> >
> > 1) I've got the pdf from the Render-method in the RS Web Service, and tried
> > to display the pdf in a WebBrowser in my Windows Form using the
> > WebBrowser.DocumentStream property. But I don't know how set the content type
> > to application/pdf. I only get the binary displayed in the browser.
> > Suggestions?
> >
> > 2) If I access, from the same browser as in 1), a pdf through an URL, it
> > works fine. So, is if possible to retreive a report as a pdf through an URL
> > reference directly?
> >
> > 3) I could try to display the pdf some kind of other pdf container in my
> > winform. Does anyone know some nice tools to do this?
> >
> > Regards,
> > Tomsi
>sql

Sunday, March 25, 2012

Exporting Data/1st three lines NOT CSV..

I have a specific format that I need to export data to. The first three lines of the document MUST be in the form of:

ascii
,
klg, Eastern Daylight Time,1,1
PineGrove,0,2005/10/01,00:00,1,1.75,192
PineGrove,0,2005/10/01,00:05,1,1.75,192
Pinegrove,0,2005/10/01,00:10,1,1.75,192

If I set this up in DTS and do an export, it puts commas after ascii - which I cannot have.

I've also tried using two data sources and exporting twice (hoping to append), however, one just overwrites the other.

Anyone have any ideas?? :o

Thanks in advance,
KristaIs this from a table?

Read the sticky at the top|||A couple of ideas...

You can create two text files, one with the headers. Then use the dos copy command to make one file.

copy file1+file2 file3

Another option is to create a temporary staging table. It can have one large varchar column that contains the data. Then export from this table. This option requires a little work.

Bill|||A couple of ideas...

You can create two text files, one with the headers. Then use the dos copy command to make one file.

copy file1+file2 file3 [B][I]

Bill

YOU'RE AWESOME!! I WAS TRYING TO REMEMBER HOW TO DO THIS EARLIER TODAY!! THANKS SO MUCH!!!!!!! :D|||You're welcome.

Check your PM.|||What's PM?|||Private Messagesql

Sunday, February 26, 2012

Export to Excel in MS Access

Hi,

I have one form in access application which shows various fields from
the database. The fields are like No of PCs a client has,No of
employees,revenue etc.

Need of the user is to filter the data on the form and export the
results.
I am using a Qury as the base for this form.Can I do it easily or i
need to write the code to do this.

Secondly can I provide a separate interface to allow user to Query and
extract the data.

Say, PC between <SomeRange> AND/ OR
Revenue Between <Some Range
whatever result comes will be exported to the Excel file.

Please tell me if you have any solution.

Thanks in Advance.

Rohit

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/General-Dis...pict241673.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=840002If you can utilize a query to create the data you want, then you can do
a simple trick of exporting the data within Access to Excel with very
little code.

DoCmd.OutputTo acOutputQuery, "Name Of Query", acFormatXLS

This can be assigned to a button and you have your results. This works
great if the query is based off the actual form.

Enjoy!

Sunday, February 19, 2012

Export through MS SQL Server

I am new to the MS SQL Server, is there any command that exports a Table form Microsoft SQL Server 7 to a delemiterd text file?
Also, how could it be automated? i.e not form the GUI but through the schedule manager
ThanksYou can use bcp or DTS to export a delimited file. With bcp, you need to look up xp_cmdshell in Books OnLine (BOL), and build a bcp string to execute via a scheduled SQLServer Agent job. With DTS (visit www.SQLDTS.com (http://www.SQLDTS.com) for an opportunity to learn about DTS) you build the DTS package and then schedule the job to run via SQLServer Agent.|||Thank you for your help, I'll have a look...
Thanks again|||I am new to the MS SQL Server, is there any command that exports a Table form Microsoft SQL Server 7 to a delemiterd text file?
Also, how could it be automated? i.e not form the GUI but through the schedule manager

Thanks

If you are looking to export to a delemited text file, BCP can do the Job faster than DTS !! u could schedule it as well..|||You can schedule dts. I usually save dts as stuctured storage files and launch them though the scheduler. dtsrun.|||u r right Ebola!! u can schedule dts as well!! my choice was for performace when the export is to txt files... I prefer BCP for that...

Friday, February 17, 2012

Export table content to sql script

Is it possible in SQL express and SQL server mangement studio express to export table content to sql script, like form table

column1 column2
1 2 2
2 3 34
3 4 234

we get script

INSERT INTO [database].[dbo].[table] ([column1] ,[column2]) VALUES (2,2)

INSERT INTO [database].[dbo].[table] ([column1] ,[column2]) VALUES (3,34)

INSERT INTO [database].[dbo].[table] ([column1] ,[column2]) VALUES (4,234)

?

If it is not possible in express editions, is it at least available in developer editions?

Have a look here: http://vyaskn.tripod.com/code.htm#inserts

HTH, Jens SUessmeyer.

http://www.sqlserver2005.de