GLS ShipIt SOAP with Visual Studio - soap

does anyone have experience with the SOAP interface of GLS ShipIt?
I integrated these into Visual Studio VB .net, but after setting the credentials and ContactID, the "CreateParcels" function always reports the error "unauthorized".
Dim glscreateparcel As new GLSShipIT.ShipmentProcessingService
glscreateparcel.PreAuthenticate = True
glscreateparcel.Url = "https://shipit-wbm-test01.gls-group.eu:8443/backend/ShipmentProcessingService/ShipmentProcessingPortType?wsdl"
glscreateparcel.Credentials = New System.Net.NetworkCredential(benutzer, kennwort)
glscreateparcel.InitializeLifetimeService()
Dim glsshipmentrequestdata As New GLS.GLSShipIT.ShipmentRequestData
'some code for shipmentrequestdata details
glsshipmentrequestdata.Shipment.Shipper.ContactID = ContactID
Dim response As GLSShipIT.CreateParcelsResponse = glscreateparcel.createParcels(glsshipmentrequestdata)
the Variables for ContactID, benutzer and kennwort were previously set.
best regards

Related

Access 2007 to Word, Outlook for 2-step Mail Merge

My VBA does the email merge wonderfully ... except, I have to click on "allow" - from Outlook - twice, for each email generated. Is there a way to programatically get around this?
I am running Windows 7 Enterprise, SP1. MS Office 2007. Computer is tightly locked down. HTML format e-mail not supported - only plain text. I do not have local admin rights. I am not able to install additional add-ins or third party software, as I've found suggested numerous times.
Here is my working VBA:
Private Sub Send_Email_Merge()
Dim sDBPath As String
'Word variables
Dim oWD As Word.Application
Dim oDoc As Word.Document
Dim RecCount As Long
'Sanity check on how many e-mails to be sent
RecCount = DLookup("[Email Count]", "qry_EmailMerge_Count")
Debug.Print RecCount
Set oWD = CreateObject("Word.Application")
oWD.Visible = True
Set oDoc = oWD.Documents.Open("C:\MyTemp\MyDocs\MyEmailMerge.docx")
With oDoc.MailMerge
.MainDocumentType = wdFormLetters
sDBPath = "C:\MyTemp\MydBs\My_Engine.accdb"
.OpenDataSource Name:=sDBPath, _
SQLStatement:="SELECT * FROM [qry_E Mail Merge]"
End With
oWD.Activate
oWD.Documents.Parent.Visible = True
oWD.Application.WindowState = 1
oWD.ActiveWindow.WindowState = 1
With oDoc.MailMerge
.Destination = wdSendToEmail
.MailAddressFieldName = "Email Address"
.MailSubject = "Your Action Required"
.MailFormat = wdMailFormatPlainText
.Execute
End With
oWD.Activate
oWD.Documents.Parent.Visible = True
oWD.Application.WindowState = 1
oWD.ActiveWindow.WindowState = 1
oWD.ActiveDocument.Close
oWD.Quit
Set oWD = Nothing
Set oDoc = Nothing
End Sub
Any help is appreciated.
You can automate directly from Access. See How to automate Outlook from another program for more information. It describes all the required steps for automating Outlook from another applications.

Trying to Insert QBO Credit Memo with IPP.NET

I am using IPP.Net to attempt to insert a single CreditMemo into Quickbooks Online. I have been successful inserting an invoice with similar code. My code for inserting the CreditMemo is as follows:
Try
Dim qboCreditMemo As New Intuit.Ipp.Data.Qbo.CreditMemo
Dim qboCreditMemoHdr As New Intuit.Ipp.Data.Qbo.CreditMemoHeader
Dim qboCreditMemoLine As Intuit.Ipp.Data.Qbo.CreditMemoLine
Dim CreditMemoLines As New List(Of Intuit.Ipp.Data.Qbo.CreditMemoLine)
Dim CreditMemoItemAttributes As Qbo.ItemChoiceType2()
Dim CreditMemoItemValues As Object()
For Each row In tblTrans.Rows
If bFirstRow Then
'Set CreditMemo header
qboCreditMemoHdr.DocNumber = "SMA" & CStr(row("batch_id"))
qboCreditMemoHdr.TxnDate = Format(row("acct_date"), "yyyy-MM-dd")
qboCreditMemoHdr.Msg = row("batch_descr")
qboCreditMemoHdr.CustomerId = New Intuit.Ipp.Data.Qbo.IdType
qboCreditMemoHdr.CustomerId.Value = row("iface_owner_id")
qboCreditMemo.Header = qboCreditMemoHdr
bFirstRow = False 'only do this once
End If
'Lines
qboCreditMemoLine = New Qbo.CreditMemoLine
qboCreditMemoLine.Desc = row("descr")
qboCreditMemoLine.Amount = row("amount_owner")
qboCreditMemoLine.AmountSpecified = True
CreditMemoItemAttributes = {Qbo.ItemsChoiceType2.ItemId, Qbo.ItemsChoiceType2.UnitPrice, Qbo.ItemsChoiceType2.Qty}
CreditMemoItemValues = {New Qbo.IdType With {.idDomain = Qbo.idDomainEnum.QBO, .Value = row("iface_item_id")}, row("unitPrice"), row("quantity")}
qboCreditMemoLine.ItemsElementName = CreditMemoItemAttributes
qboCreditMemoLine.Items = CreditMemoItemValues
qboCreditMemoLine.ClassId = New Intuit.Ipp.Data.Qbo.IdType
qboCreditMemoLine.ClassId.Value = row("iface_class_id")
CreditMemoLines.Add(qboCreditMemoLine) 'Add line to list of lines
Next row
qboCreditMemo.Line = CreditMemoLines.ToArray 'Add CreditMemo lines to CreditMemo lines property
resultCreditMemo = commonService.Add(qboCreditMemo) 'Add CreditMemo to request
Return "OK"
'Catch exID As Intuit.Ipp.Exception.IdsException
'Return exID.Message
Catch ex As Exception
Return ex.Message
End Try
I got an error with message 'Internal Server Error'. It seems to be an IdsException. As indicated in my other article, I was able to get detailed information for a BatchRequest through the Fault and Error objects. However, I do not understand how to get the details on this error for a single invoice using Dataservices.
I think I may need better error handling, assuming there is more information available for this error. And, I need help figuring out why the same properties that I set for an invoice would not work for a CreditMemo. Unfortunately the documentation in the Intuit website where the required properties are listed does not include a CreditMemo (though it includes an Invoice).
CreditMemo is not supported in QBO:
https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0400_QuickBooks_Online/0500_Supported_Entities_and_Operations
I had almost the same issue, and the problem was that the qty and amount should not be negative. I changed it on my creditmemoLine and it worked

Crystal Reports Runtime & Redistributable

Is there a difference between these two things. I am trying to move some reports from a local server to a dev server and I know that we have installed the redist on the dev server, but am still having problems getting the report to run. Is the runtime separate I come accross different sites mentioning both things but havent been able to tell if they are talking about the same thing
*Edit - posting code to see if as dotjoe suggested I have incorrectly labled my report path. the database connection is returned from a method to a string array reportString so that is what that array is.
<CR:CrystalReportViewer ID="CrystalReportViewer2" runat="server"
AutoDataBind="True" Height="50px" Width="350px" ReuseParameterValuesOnRefresh="True" ToolbarImagesFolderUrl="~/images/reportViwerImages"/>
ConnectionInfo myConnectionInfo = new ConnectionInfo();
myConnectionInfo.ServerName = reportString[1];
myConnectionInfo.DatabaseName = reportString[0];
myConnectionInfo.UserID = reportString[2];
myConnectionInfo.Password = reportString[3];
string ReportPath = Server.MapPath("../../mdReports/CrystalReport.rpt");
CrystalReportViewer2.ReportSource = ReportPath;
ParameterField field1 = new ParameterField();
ParameterDiscreteValue val1 = new ParameterDiscreteValue();
val1.Value = hiddenFieldReportNumber.ToString();
field1.CurrentValues.Add(val1);
SetDBLogonForReport(myConnectionInfo);
private void SetDBLogonForReport(ConnectionInfo myConnectionInfo)
{
TableLogOnInfos myTableLogOnInfos = CrystalReportViewer2.LogOnInfo;
foreach (TableLogOnInfo myTableLogOnInfo in myTableLogOnInfos)
{
myTableLogOnInfo.ConnectionInfo = myConnectionInfo;
}
}
you have not load the report from the given Path.
Please see below link

SAP Crystal Report Visual Studio 2010

How can the parameter prompt in SAP Crystal Report be disabled? I'm using Visual Studio 2010.
My Code is:
{
NPB.Report.CrLetter objCrLetter = new NPB.Report.CrLetter();
NPB.Report.frmViewer objView = new NPB.Report.frmViewer();
private void btnGenerateLetters_Click(object sender, EventArgs e)
{
objCrLetter.ParameterFields["LetterDate"].DefaultValues.AddValue(dtpLetterDate.Value.ToShortTimeString());
objCrLetter.ParameterFields["Salutation"].DefaultValues.AddValue(cboboxSalutation.Text);
objCrLetter.ParameterFields["Address"].DefaultValues.AddValue("2");
objCrLetter.ParameterFields["City"].DefaultValues.AddValue("3");
objCrLetter.ParameterFields["State"].DefaultValues.AddValue("4");
objCrLetter.ParameterFields["ZipCode"].DefaultValues.AddValue("5");
objView.crViewer.ReportSource = objCrLetter;
objView.Show();
}
}
I would probably change your code so that for each Parameter in the Crystal Report would clear the current & default values then pass in the correct value.
So you need to do something like this for each parameter:
ParameterDiscreteValue paramDV = new ParameterDiscreteValue();
paramDV.Value = "Parameter Value";
objCrLetter.ParameterFields["#ParameterName"].CurrentValues.Clear();
objCrLetter.ParameterFields["#ParameterName"].DefaultValues.Clear();
objCrLetter.ParameterFields["#ParameterName"].CurrentValues.Add(paramDV);
This should prevent the Parameter Prompt from appearing.
This answers are almost perfect, but, You should pay attention to the when setting de data source.
This setting should happens before you set the parameters.

crystal report library for classic asp

is there a library available for classic asp. I want to create a pdf file from rpt file in classic asp. i dont want to install crystal reports. is there a way?
-Vivek
You can use only the Crystal Reports redistributable DLLs to open a report file and generate a PDF with it.
I've never tried to open the Crystal Reports library directly from ASP, but should be no problem (or you can create a COM Dll in VB6 if you can)
Some code I have in a VB6 DLL using Crystal Reports 9:
Private Sub Export(ReportFile as string)
Dim crxReport As Report
Set crxReport = Prepare(ReportFile )
crxReport.ExportOptions.FormatType = crEFTPortableDocFormat
crxReport.ExportOptions.DestinationType = crEDTDiskFile
crxReport.ExportOptions.DiskFileName = "C:\export\export.pdf"
crxReport.Export (False)
end sub
Private Function Prepare(ReportFile as string) As Report
Dim CRapp As CRAXDRT.Application
Set CRapp = New CRAXDRT.Application
Dim crxReport As Report
Dim aDatabaseObject As Database
Dim aDatabaseTableObject As CRAXDRT.DatabaseTable
Dim objConn As ConnectionProperty
Set CRapp = New CRAXDRT.Application
CRapp.SetLicenseKeycode ("XXXXXXXXXXXXXXXXXXXXXXXX")
Set crxReport = CRapp.OpenReport(ReportFile)
Set aDatabaseObject = crxReport.Database
Set cnn = New ADODB.Connection
cnn.ConnectionString = MyConnectionString()
Set aDatabaseObject = crxReport.Database
For Each aDatabaseTableObject In aDatabaseObject.Tables
Dim objCPProperties As CRAXDRT.ConnectionProperties
aDatabaseTableObject.DllName = "crdb_ado.dll"
Set objCPProperties = aDatabaseTableObject.ConnectionProperties
objCPProperties.DeleteAll
objCPProperties.Add "Provider", "SQLOLEDB"
objCPProperties.Add "Data Source", cnn.Properties.Item("Data Source").Value
objCPProperties.Add "Initial Catalog", cnn.Properties.Item("Initial Catalog").Value
objCPProperties.Add "User ID", cnn.Properties.Item("User ID").Value
objCPProperties.Add "Password", cnn.Properties.Item("Password").Value
aDatabaseTableObject.Location = aDatabaseTableObject.Name
Next
Set Prepare = crxReport
End Function