Wednesday, March 28, 2012
PDF not showing??
PDF document. But nothing happens, no errors, no nothing?
private void Button1_Click(object sender, System.EventArgs e)
{
Reportservice.ReportingService rs = new
Reportservice.ReportingService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
//rs.Url = "http://localhost/ReportServer/ReportingService.asmx";
Reportservice.ParameterValue [] Parameter;
Reportservice.Warning [] Warnings;
string [] StreamIDs;
string Encoding, MimeType;
rs.Render("/Report Project3/Report1", "PDF", null, "", null, null,
null, out Encoding, out MimeType, out Parameter, out Warnings, out
StreamIDs);
}
Please help, im really stuck!
JimboFrom your code it looks like you are writing windows application. Call to
rs.Render returns you byte array with PDF document in it. You ignore return
value, hence no errors or anything. It is your responsibility to take this
byte array and put it in a file. You may change your code to
byte[] result = rs.Render(...
and then use result as you like.
If you want more automation, you can open web browser and point it at
http://localhost/ReportServer?/Report Project3/Report1&rs:Format=PDF
that way you'll see "Save..." dialog without programming it.
--
Dmitry Vasilevsky, SQL Server Reporting Services Developer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
---
"Jimbo" <jimbo_vr5@.hotmail.com> wrote in message
news:1126178576.968569.12620@.z14g2000cwz.googlegroups.com...
>I would expect a box showing up, asking me either to open or save the
> PDF document. But nothing happens, no errors, no nothing?
>
> private void Button1_Click(object sender, System.EventArgs e)
> {
> Reportservice.ReportingService rs = new
> Reportservice.ReportingService();
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
> //rs.Url = "http://localhost/ReportServer/ReportingService.asmx";
> Reportservice.ParameterValue [] Parameter;
> Reportservice.Warning [] Warnings;
> string [] StreamIDs;
> string Encoding, MimeType;
> rs.Render("/Report Project3/Report1", "PDF", null, "", null, null,
> null, out Encoding, out MimeType, out Parameter, out Warnings, out
> StreamIDs);
> }
> Please help, im really stuck!
> Jimbo
>|||Its actually in a web page, but i got it to work now.
Now i have another problem, ive posted it in this group:
<http://groups.google.dk/group/microsoft.public.sqlserver.reportingsvcs/browse_frm/thread/8de9666b2df2bdc1/6b895696b710b2c0?hl=da#6b895696b710b2c0>
Thanks
Regards
Jimmy
PDF generation without the save/open window
the PDF before it is displayed.
Is there a way to have the PDF open automatically without that window being
displayed?
Thanks!We are having the exact same problem....did you ever get an answer to this
problem ? Anyone come across this previously '
Thanks
"PJJ" wrote:
> When we generate a report directly to PDF the user is asked to open or save
> the PDF before it is displayed.
> Is there a way to have the PDF open automatically without that window being
> displayed?
> Thanks!|||Scott:
Sadly, we have not received a response. This is a significant drawback for
my users and we would welcome any information about this issue.
PaulJ
"ScottJ" wrote:
> We are having the exact same problem....did you ever get an answer to this
> problem ? Anyone come across this previously '
> Thanks
> "PJJ" wrote:
> > When we generate a report directly to PDF the user is asked to open or save
> > the PDF before it is displayed.
> > Is there a way to have the PDF open automatically without that window being
> > displayed?
> > Thanks!|||This is a limitation of Report Manager. Using our SOAP methods it would be
pretty easy to replace our UI with your own that did not exhibit this
behavior.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"PJJ" <PJJ@.discussions.microsoft.com> wrote in message
news:6C2ECAD1-18C9-478F-B159-7AEB1F175B94@.microsoft.com...
> Scott:
> Sadly, we have not received a response. This is a significant drawback
> for
> my users and we would welcome any information about this issue.
> PaulJ
> "ScottJ" wrote:
>> We are having the exact same problem....did you ever get an answer to
>> this
>> problem ? Anyone come across this previously '
>> Thanks
>> "PJJ" wrote:
>> > When we generate a report directly to PDF the user is asked to open or
>> > save
>> > the PDF before it is displayed.
>> > Is there a way to have the PDF open automatically without that window
>> > being
>> > displayed?
>> > Thanks!
Monday, March 26, 2012
PDF file is not in right format
HI,
When I preview the report it is in correct format but when I save it in PDF form it is not coming in the right format.
There is a textbox on 1st page.If the value of that textbox is large it prints the text on 2nd page and leaves a blank
space on 1st page.Why this is happening.Please Help me.
May
Try couple of things:
1) make your textbox multiline. There is property MultiLine so set that to true.
2) Check your report page margins. Keep it according to your page size.
Let me know if this helps
Lav
|||I have set the page margin to 0.3 and also body size is 6.8in.Still it is shifting the whole text to next page.
Text is a big paragraph .I could not find the multiline property of textbox.
Thanks in Advance.
May
|||What is your page size??
I assume 6.8in is your width.
For Multiline i meant Can grow property. Make sure its set to True.
|||also make sure your page size must be greater than your width + left margin + right margin|||Page Size is 8.5in-11in.Can Grow property is True already.
Is there any property like Keep Together.Because it is trying to keep the whole text together thats why
it is shifting it onto the next page.I tried to put textbox in a rectangle..still not working.
May
|||Is there anything else on that page? Explain me the layout of the page.
If possible add an image of report layout.
|||
I don't know how to add the image from here.Layout is like this:
CustomerName: !First(FieldCustname.value) DateEntered: Fielddate.value
Contact (subreport)
Reason: !First(FieldReason.value)
Action: !First(FieldAction.value)
Reason textbox is giving trouble.After printing the name,date n contact the rest of the page is blank.
reason text is on 2nd page.
|||
I have the same problem with a table which the report try to display on the next page when it fit, butKeepTogether is set toflase and there is noPageBreakBefore.
But it behave like if KeepTogether was set to True.
Any idea ?
Monday, March 12, 2012
Passwords in Sql Server 2000
database that consist table of user , in this table i want to storage
user's details including their passwords. As i understand it's not good
idea to storage password like other data i mean name , last name.
How to accomplish this?
--
Message posted via http://www.sqlmonster.comYou would usually handle the encryption/decrpytion in your application,
using an API like the Win32 CryptoAPI or the .NET libraries:
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=22
Simon