Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Monday, March 19, 2012

Error in sample PrinterDeliveryProvider.cs?

The Deliver method in the sample returns false if the delivery is successful
and never sets the Notification.Retry flag. Both seem to contradict the
documentation. Please confirm that the sample is wrong and the
documentation is right.
Thanks,
- SteveThat is true. The documentation is correct. The printer delivery extension
sample should be changed to reflect the documentation.
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"Stephen Walch" <swalch@.proposion.com> wrote in message
news:OpQ$ZirXEHA.3512@.TK2MSFTNGP12.phx.gbl...
> The Deliver method in the sample returns false if the delivery is
successful
> and never sets the Notification.Retry flag. Both seem to contradict the
> documentation. Please confirm that the sample is wrong and the
> documentation is right.
> Thanks,
> - Steve
>|||One more thing. To make the sample more accurate, I would recommend changing
the retry flag to a success flag, like:
public bool Deliver(Notification notification)
{
bool success = false;
// Set the status of the notification to pending
notification.Status = "Processing...";
try
{
// Build user data
Setting[] userSettings = notification.UserData;
SubscriptionData subscriptionData = new SubscriptionData();
subscriptionData.FromSettings(userSettings);
// Print the report
PrintReport(notification, subscriptionData);
// If delivery is successful return false
success = true;
}
catch (Exception e)
{
// Set the status of the notification if an error occurs
// and attempt retry
notification.Status = "Error: " + e.Message;
success = false;
}
finally
{
// Finally, save the notification information
notification.Save();
}
return success;
}
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"Stephen Walch" <swalch@.proposion.com> wrote in message
news:OpQ$ZirXEHA.3512@.TK2MSFTNGP12.phx.gbl...
> The Deliver method in the sample returns false if the delivery is
successful
> and never sets the Notification.Retry flag. Both seem to contradict the
> documentation. Please confirm that the sample is wrong and the
> documentation is right.
> Thanks,
> - Steve
>|||Don't you also want to set the Retry flag?
catch (Exception e)
{
// Set the status of the notification if an error occurs
// and attempt retry
notification.Status = "Error: " + e.Message;
notification.Retry = true;
success = false;
}|||Hi,
During to build "Sample Printer Delivery Extension", the document write:
2.Issue the following command to create the sample delivery extension
Microsoft.Samples.ReportingServices.PrinterDeliverySample.dll.
csc /t:library /out:Microsoft.Samples.ReportingServices.PrinterDelivery.dll
*.cs /r:Microsoft.ReportingServices.Interfaces.dll
During to build "Sample Printer Delivery Extension", the
How should I Implement this command? Please give me advice, thanks for your
time!
Angi|||CSC is the C# compiler which ships with the .Net Framework. It should be
installed on your computer if you installed the .Net Framework v. 1.1.4322.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"angi" <angi@.microsoft.com> wrote in message
news:uCWemPUbEHA.3752@.TK2MSFTNGP12.phx.gbl...
> Hi,
> During to build "Sample Printer Delivery Extension", the document write:
> 2.Issue the following command to create the sample delivery extension
> Microsoft.Samples.ReportingServices.PrinterDeliverySample.dll.
> csc /t:library
/out:Microsoft.Samples.ReportingServices.PrinterDelivery.dll
> *.cs /r:Microsoft.ReportingServices.Interfaces.dll
> During to build "Sample Printer Delivery Extension", the
> How should I Implement this command? Please give me advice, thanks for
your
> time!
> Angi
>|||You can also build it by opening the .SLN file in Visual Stidio.NET 2003.
-Steve
"angi" <angi@.microsoft.com> wrote in message
news:uCWemPUbEHA.3752@.TK2MSFTNGP12.phx.gbl...
> Hi,
> During to build "Sample Printer Delivery Extension", the document write:
> 2.Issue the following command to create the sample delivery extension
> Microsoft.Samples.ReportingServices.PrinterDeliverySample.dll.
> csc /t:library
/out:Microsoft.Samples.ReportingServices.PrinterDelivery.dll
> *.cs /r:Microsoft.ReportingServices.Interfaces.dll
> During to build "Sample Printer Delivery Extension", the
> How should I Implement this command? Please give me advice, thanks for
your
> time!
> Angi
>

Sunday, March 11, 2012

Error in printreport method of Crviewer

Hi!

I used vb6.0 and crystal Report 11 ,. I integrated the report to VB form. By calling the report in vb th viewreport method working fine . But the .printreport method have the problem " Method 'printreport' of Object 'ICrystalreportviewer11' Failed"

What is the problem and how to solve the problemMake sure that the printer is properly connected to the system

Wednesday, February 15, 2012

error handling vbscript via sqlserver

Hi,

I wrote a small vbscript that sends information from a local computer to SQL server.
The method I use for connecting to the SQL server is via ODBC DSN.
This scripts runs on a DMZ located machine, while the SQL server is inside our LAN.

All works fine, but when the network connection between DMZ machine and SQL server lost
for a min. I receive an error.

I monitored the error and tried to error handle it.

after network is back the script is still on, but the error still there.

this is the part where I get the error:

-----------------------
Public function reso(byval res)

'error 3705 occurs here

objConn.Open strConn

Set objrs = objconn.Execute("exec cmp_creation "& Computer &"," & res)


objConn.Close

end function
-----------------------

Help would be much appreciatedWhy not use a DSN-less connection?

Also, if the server is in your DMZ and the SQL Server is behind a firewall (assumed), I would be sure to use the IP address instead of the network name.

Regards,

hmscott|||I'm not sure about the DSN-Less connection.... what would it change regarding my problem? also, what port do I have to open for a DSN-Less connection?|||I don't think that there's anything really wrong with a DSN connection and I'm not positive it would rectify your particular issue. However, DSN connections leave "footprints" on the server in your DMZ (in the registry) which are potentially vulnerable.

DSN and DSN-less connections use the same ports to connect to their respective data sources. Thus, a DSN connection to SQL Server would use port 1433 as would a DSN-less connection.

In general (from what I understand), DSN-less connections are "lighter" on the server, incurring less memory overhead. They are not, however, necessarily faster.

In your script, do you check for the state of the connection? Is it just opened once and left open? Or is it opened and closed as necessary?

Regards,

hmscott

Originally posted by eransp
I'm not sure about the DSN-Less connection.... what would it change regarding my problem? also, what port do I have to open for a DSN-Less connection?