Groups | Blog | Home
all groups > sql server reporting services > january 2005 >

sql server reporting services : Render and save without viewing?


trint
1/21/2005 12:13:29 PM
I need to do this...if anyone knows how, I would very much appreciate
your input...
I need my c# app to be able to render and save image without any user
input...just pre-set parameters.
Thanks,
Trint
bri
1/21/2005 12:39:13 PM
Just use the Web Service API's. I wrote a web app wrapper so a windows
app could make a url call to pass parameters so that a report could be
rendered and delivered.
trint
1/21/2005 12:44:21 PM
Can you point me to an example please? My program must render and save
several reports very fast. I have all the code except 'render and
save'.
Thanks,
Trint
bri
1/21/2005 12:48:42 PM
There isn't really a "Render and Save" method. What I am doing to get
around this is to use the Web Service API to create a oneoff
subscription:

InteleReport.DeliveryMethod d = new DeliveryMethod("email");
string scheduleXml = @"<ScheduleDefinition>";
scheduleXml += @"<StartDateTime>" +
DateTime.Now.AddMinutes(1).ToString() + "</StartDateTime>"
+ "<EndDate>" + DateTime.Now.AddMinutes(60).ToString() +
"</EndDate>"
+ "</ScheduleDefinition>";
RS.ExtensionSettings extSettings = new RS.ExtensionSettings();
extSettings.ParameterValues = d.ExtentionParameters;
extSettings.Extension = "Report Server Email";
RS.ReportingService rs = new InteleReport.RS.ReportingService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
string subid = rs.CreateSubscription(d.Path,
extSettings,d.Name,
"TimedSubscription",scheduleXml,d.AdditionalParameters);

Not all the parts are in this code, as you can see. It's just an
example of how to use the idea of a subscription to render and deliver
somewhere else. In this code I am creating a subscription for email
delivery.
trint
1/21/2005 1:11:24 PM
thanks bri,
but i'm getting The type or namespace name 'RS' could not be found (are
you missing a using directive or an assembly reference?) and i have
added a web reference...
thanks,
Trint
bri
1/21/2005 1:15:17 PM
RS is the reference to the web service.
trint
1/21/2005 1:25:43 PM
isn't this how though? :
http://localhost/ReportServer/reportservice.asmx
trint
David Pope
1/22/2005 8:08:42 AM
Trint,

Buy the book "SQL Server Reporting Services by Wrox" or "Hitchhiker's =
Guide to SQL Server 2000 Reporting Services ."

They both have great examples on how to do what you are asking.

David=20





[quoted text, click to view]
AddThis Social Bookmark Button