Mobiliser : Deploying custom code to SMP 3.0
Hi Experts,
We have developed few custom use cases on top of standalone Mobiliser 5.1 SP01 (Linux server).
Same use case we are trying to deploy it to Mobiliser 5.1 SP03 and on SMP 3.0 SP03.
1. I hope As-Is code which is developed on SP01 will not fit SP03, please confirm on this.
2. Please let us know any guideline document how to migrate code from SP01 to SP03
3. How to deploy custom code on SMP 3.0.
With regards
Shankar.K
See my Answers below:
1. I hope As-Is code which is developed on SP01 will not fit SP03, please confirm on this.
Your code should have no impact unless there are some backend dependences. With SP03, additional OSGI bundles are copied to server and tomcat application (incase Money Mobiliser is used)
2. Please let us know any guideline document how to migrate code from SP01 to SP03
You can find the upgrade document here: https://websmp108.sap-ag.de/instguides Once at the support portal just navigate to SAP Mobile > Sybase Mobiliser Platform > Mobiliser Platform 5.1 SP03 on the left side of the screen then open Mobiliser Platform Upgrade Guide for SP03
The vital part of the upgrade process is making sure that the DB backend, where the SP 03 Money folder will be retrieving its data from, is upgraded properly. To help alleviate any further confusion:
1. You will not be using the SP01 money folder or anything else in that directory anymore
2. Everything that you need for the upgrade will be in the Mobiliser SP03 zip file that the customer should have.
3. Upgrade the DB backend schema in the manner specified in the document
4. You will need to perform some slight configurations to the Mobiliser SP03 money folder to successfully communicate with the DB upgrade that was performed in Step 3. The configurations are referenced in the Mobiliser Installation manual for SP03.
3. How to deploy custom code on SMP 3.0.
refer following:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30ae5b68-78a0-3010-6fa3-c1742e0195c0?overridelayout=true
Regards, Kiran
Similar Messages
-
Hi,
I Haven't used Vb.net, as I work on C#, But in SSRS it supports only VB.net code as custom coding, so i coded in c# and converted to VB.net from online converter. The code i got from online converter is working fine in local i.e when i preview in BI studio,
but when i try to deploy the same i'm getting error
Error 3
There is an error on line 12 of custom code: [BC30201] Expression expected.
0 0
Below is the code:
' -- Author : Jai Anand
' -- Date : 06-05-2014
' -- Discription : To split the given string of numbers and Assign the days for it,
' -- example: if integer 1 - (Su) --> Sunday, 2 - (Mo) --> Monday
public Function FindPlanDays(plandate As String) As String
Dim planarray As String() = New String() {}
Dim days As String = ""
planarray = plandate.Split(","C)
Dim i As Integer = 0
While i < planarray.Length
Dim day As String = If(planarray(i) = "1", "Su,", If(planarray(i) = "2", "Mo,",
If(planarray(i) = "3", "Tu,", If(planarray(i) = "4", "We,", If(planarray(i) = "5", "Th,", If(planarray(i)="6","Fr,", If(planarray(i) = "7", "Sa,", String.Empty)))))))
days = days & day
i += 1
End While
days = If(days <> String.Empty, " (" + days.TrimEnd(","C) + ")", days)
Return days
End Function
Kindly check the code, if any issue is there,give me the solution..Thank youHi,
I found the solution and the report is deployed . The issue was with If and we should suffix with space and underscore( _) at the end of the line break and continues in next line (i.e if the statement continues in next line).
iif has always been available in VB, even in VB6.
Dim day As String = Iif(planarray(i) = "1", "Su,","Mon")
It is not a true operator, as such, but a function in the Microsoft.VisualBasic namespace.
so the modified code which worked fine to deploy
' -- Author : Jai Anand
' -- Date : 06-05-2014
' -- Discription : To split the given string of numbers and Assign the days for it,
' -- example: if integer 1 - (Su) --> Sunday, 2 - (Mo) --> Monday
public Function FindPlanDays(plandate As String) As String
Dim planarray As String() = New String() {}
Dim days As String = ""
planarray = plandate.Split(","C)
Dim i As Integer = 0
While i < planarray.Length
Dim day As String = Iif(planarray(i) = "1", "Su," ,Iif(planarray(i) = "2", "Mo,", _
Iif(planarray(i) = "3", "Tu,", Iif(planarray(i) = "4", "We,", Iif(planarray(i) = "5", "Th,", _
Iif(planarray(i) ="6","Fr,", Iif(planarray(i) = "7", "Sa,", String.Empty)))))))
days = days & day
i += 1
End While
days = Iif(days <> String.Empty, " (" + days.TrimEnd(","C) + ")", days)
Return days
End Function -
Function MakeList(ByVal items As Object()) As String
If items Is Nothing Then
Return Nothing
END if
Dim builder As System.Text.StringBuilder =
New System.Text.StringBuilder()
builder.Append("<div>")
For Each item As Object In items
builder.Append("<div <ul>")
builder.Append(item)
builder.Append("</ul>")
Next
builder.Append("</div>")
Return builder.ToString()
End Function
Function Length(ByVal items as Object()) as Integer
If items is Nothing Then
Return 0
End If
Return items.Length
End FunctionHi Wintersbay,
According to your description, when you use the custom code in SSRS report, you got the error message.
To solve the problem, please refer to the custom code below:
Function MakeList(ByVal items As Object) As String
If items Is Nothing Then
Return Nothing
END if
Dim builder As System.Text.StringBuilder =
New System.Text.StringBuilder()
builder.Append("<div>")
For Each item As Object In items
builder.Append("<div <ul>")
builder.Append(item)
builder.Append("</ul>")
Next
builder.Append("</div>")
Return builder.ToString()
End Function
Function Length(ByVal items as Object) as Integer
If items is Nothing Then
Return 0
End If
Return items.Length
End Function
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support -
Hi
We are new to Windows azure and are developing a web application. In the beginning of the project , we have deployed complete code using Sitefinity Thunder to different environments which actually publish complete code. But now as we are in the middle of development
, we are just required to upload any new files created which can be quite less in numbers (1 or 2 or maybe few). Now if we deploy with thunder , it publishes all files and then deploys complete code which takes good amount of time. Hence we are thinking to
attach each Azure Cloud Service which is actually a different environment like staging, UAT to a TFS branch and then just check in code from local development machine to TFS and then deploy only checked in files to azure environment linked to TFS.
I hope this possible but if you can help send some links where I can see how to achieve this , that will be helpful.
Also I would like to know whether a single cloud service can be linked to a single TFS branch or multiple cloud service can be linked to a single TFS repository? Why I am asking is – because we want to deploy a checked in files revision number to a staging
cloud service and then will test there and then if everything works well then will be required to deploy these revision files to the next cloud UAT cloud service and then production cloud service. Please help.Hi,
We can use TFS to manage our azure cloud service application code, refer to the following to get more information about how to deploy sitefinity to azure.
#http://www.sitefinity.com/documentation/documentationarticles/manually-deploying-your-project-to-windows-azure
#http://www.youtube.com/watch?v=E2aZ7lE1JUA
#http://www.sitefinity.com/documentation/documentationarticles/sitefinity-azure-configuration
If any question about sitefinity, please redirect to sitefinity forum:
http://www.sitefinity.com/developer-network/forums if the issue was related with azure, welcome to post again.
Best Regards
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Calling Customer code in java application
Hi,
in my java application running on WAS 6.40 I want to call some customer code.
Basically I create a data structure (DOM XML tree) and want to pass this to customer code to be able to modify it as needed.
My idea would be to define an interface which would than be implemented by customer java classes. But how do I load these classes?
In theory I would create a configuration table in my app where the customer would specify the classname of his classes implementing this interface and I would do a Class.forName("...")
But those classes will be unknown to my application'S classloader, right? Because they won't be deployed with my application and I can't have references as I do not know if and what the customer will deploy. What's the best approach to this? WOuld EJBs help better?
Thanks
BrunoHi Bruno,
We did this for our application. We needed a weak reference from our deployable DC to a specific DC (e.g. DC\customerExit) The customer then creates this DC and adds their classes to it. Since it is a weak reference, it does not need to exist for your application to work. You can use the customizing to be able to lookup the specific class name that they created.
hope this helps,
Rich -
Error deploying custom java web service -Jdeveloper11.1.1.3.0
Hi all,
Error deploying custom java web service in - Jdeveloper 11.1.1.3.0
Weblogic Server Exception: weblogic.deploy.api.internal.utils.DeployerHelperException: The source 'C:\DOCUME~1\.......\LOCALS~1\Temp\.xyz..........Project-context-root.war'
for the application 'xyz....Project-context-root' could not be loaded to the server 'http://hostname:port/bea_wls_deployment_internal/DeploymentService'.
Server returned HTTP response code: 409 for URL: http://hostname:port/bea_wls_deployment_internal/DeploymentService
See server logs or server console for more details.
weblogic.deploy.api.spi.exceptions.ServerConnectionException: [J2EE Deployment SPI:260041]Unable to upload 'C:\JDeveloper\mywork\MyApllicationName\Project\deploy\xyz........Project-context-root.war' to 't3://hostname:port'
#### Deployment incomplete. ####
Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
Thanks
Edited by: soauser on Sep 3, 2010 8:55 AMAny help for the above post is appreciated..
Edited by: soauser on Sep 3, 2010 11:58 PM -
Error deploying custom java web service in SOA11g-Jdeveloper 11.1.1.3.0
Hi all,
I am getting Error deploying custom java web service in SOA 11G- Jdeveloper 11.1.1.3.0
Weblogic Server Exception: weblogic.deploy.api.internal.utils.DeployerHelperException: The source 'C:\DOCUME~1\.......\LOCALS~1\Temp\.xyz..........Project-context-root.war'
for the application 'xyz....Project-context-root' could not be loaded to the server 'http://hostname:port/bea_wls_deployment_internal/DeploymentService'.
Server returned HTTP response code: 409 for URL: http://hostname:port/bea_wls_deployment_internal/DeploymentService
See server logs or server console for more details.
weblogic.deploy.api.spi.exceptions.ServerConnectionException: [J2EE Deployment SPI:260041]Unable to upload 'C:\JDeveloper\mywork\MyApllicationName\Project\deploy\xyz........Project-context-root.war' to 't3://hostname:port'
#### Deployment incomplete. ####
Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
Edited by: soauser on Sep 3, 2010 7:44 AM
Edited by: soauser on Sep 3, 2010 7:45 AM
Edited by: soauser on Sep 3, 2010 7:46 AMAny help for the above post is appreciated..
Edited by: soauser on Sep 3, 2010 11:58 PM -
Error when publishing WF containing custom code activity to workflow manager 1.0
Hello:
Workflow manager sounds every exciting to me, I am trying it out to see if it will work for me.
I downloaded "CustomCodeActivitySample" of workflow manager 1.0, and when I ran, I got following exception:
Workflow XAML failed validation due to the following errors:
Cannot create unknown type '{clr-namespace:HashActivity;assembly=HashActivity}ComputeHash'. HTTP headers received from the server - ActivityId: 2a1e4d9d-90bd-4f59-a1fc-d3673194dd54. NodeId: NDL0714. Scope: /CustomCodeActivitiesSample. Client ActivityId : 235d66c1-bbe6-4982-8242-833a6bc1f6b1.
more details:
Microsoft.Workflow.Client.ActivityValidationException was unhandled
HResult=-2146233088
Message=Workflow XAML failed validation due to the following errors:
Cannot create unknown type '{clr-namespace:HashActivity;assembly=HashActivity}ComputeHash'. HTTP headers received from the server - ActivityId: efe2c3cb-e6fd-4124-88a1-6c8e72aecb06. NodeId: NDL0714. Scope: /CustomCodeActivitiesSample. Client ActivityId : 73d7b773-be53-4a7b-b2d8-ba687e60a4f4.
Source=Microsoft.Workflow.Client
ActivityName=ProcessMovies
ScopePath=/CustomCodeActivitiesSample
StackTrace:
at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
at Microsoft.Workflow.Client.WorkflowManagementClient.SendRequest[T](HttpWebRequest request, T content)
at Microsoft.Workflow.Client.ActivityManager.Publish(ActivityDescription description, Boolean overwriteXClassName, Boolean terminateDependentInstances)
at Microsoft.Workflow.Client.ActivityManager.Publish(ActivityDescription description)
at Microsoft.Workflow.Samples.Common.WorkflowManagementClientExtensions.PublishWorkflow(WorkflowManagementClient client, String workflowName, String xamlFilePath, Collection`1 externalVariables, IDictionary`2 configValues,
SubscriptionFilter activationFilter) in c:\WFM_C\C\Microsoft.Workflow.Samples.Common\WorkflowManagementClientExtensions.cs:line 45
at Microsoft.Workflow.Samples.Common.WorkflowManagementClientExtensions.PublishWorkflow(WorkflowManagementClient client, String workflowName, String xamlFilePath, SubscriptionFilter activationFilter) in c:\WFM_C\C\Microsoft.Workflow.Samples.Common\WorkflowManagementClientExtensions.cs:line
29
at CustomCodeActivitySample.Program.Main(String[] args) in c:\WFM_C\C\CustomCodeActivitySample\Program.cs:line 39
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Net.WebException
HResult=-2146233079
Message=The remote server returned an error: (400) Bad Request.
Source=Microsoft.Workflow.Common
StackTrace:
at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)
at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
InnerException:
Thanks
ahorseHi
We had to update following in assemblyinfo.cs file.
assembly: XmlnsDefinition("wf://workflow.windows.net/$Current/$Activities", "YourProjectNamespace")]
to
assembly: XmlnsDefinition("wf://{WorkflowManagerServerName}:12291/$Current/$Activities", "YourProjectNamespace")]for e.g.assembly: XmlnsDefinition("wf://workflowmanagerserver:12291/$Current/$Activities", "YourProjectNamespace")]
Only then custom code activity started working. However, this means, when we want to deploy in other environment with different URL, we need to re-build the assembly.
Is there any way by which we have this configurable?
Regards,
RK
Radhakrishna -
Hi all,
I'm a newbie of SMP and SCN. I sincerely respect SMP leaders who posted nice blog.
I’d like to know how can I process the request (the number of customers) from client application to SOAP request.
My requirement is to connect SOAP WebService to client with Integration Gateway in SMP3 SP06.
SOAP service is provided by RFC. I checked the following blog and created function module.
http://scn.sap.com/docs/DOC-28582
This function module can input customer code (optional) and the number of entities to output customer information such as customer code, name, address, country, postal code and city.
I have configured SOAP WebServices with Integration Gateway in SMP3 SP06.
http://scn.sap.com/people/marvin.hoffmann/blog/2014/03/15/how-to-connect-soap-webservices-with-integration-gateway-in-smp3
OData looks like this:
Operation is Query and Response Mapping is defined as below:
At that time, I couldn’t see the Service Document of my OData service. So I added custom script to pass the Basic Authorization and input parameter.
http://scn.sap.com/docs/DOC-58551
Basic Authorization is working but the request
parentMap.put(“IM_COUNT”, “5”) [the number of customer from FM]
does not work. I thought I could see 5 customers information in the service document but I could see all the customers information.
In addition, When I click on ”Define Request Mapping”, eclipse says "Request mapping is not available for SOAP Query.”
How do I implement my request successfully?
Thanks,
HanaeHi Midhun,
thank you for your quick response!
I have already used SOAPUI to test my query.
>it's creating an xml file in a specific format where you need to pass values to get the output.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
<soapenv:Header/>
<soapenv:Body>
<urn:ZGetcustomerWebservice>
<!--Optional:-->
<ImCount>5</ImCount>
<!--Optional:-->
<ImKunnr>
<!--Zero or more repetitions:-->
</ImKunnr>
</urn:ZGetcustomerWebservice>
</soapenv:Body>
</soapenv:Envelope>
Is this the xml file you mentioned?
I checked the following blog and tried debugging, but I couldn't see any variables value...
Debugging Custom Script in Integration Gateway
Here is my custom code:
function processRequestData(message) {
message.setHeader("Authorization", "Basic XXXXXXXX=");
importPackage(com.sap.gateway.ip.core.customdev.logging);
importPackage(com.sap.gateway.ip.core.customdev.util);
importPackage(org.apache.olingo.odata2.api.uri);
importPackage(java.util);
importPackage(com.sap.gateway.core.ip.component.commons);
importPackage(com.sap.gateway.ip.core.customdev.api);
parentMap = new LinkedHashMap();
parentMap.put("IM_COUNT", "5");
//Set the message body back
message.setBody(parentMap);
//Logger
importPackage (com.sap.gateway.ip.core.customdev.logging);
log.logErrors(LogMessage.TechnicalError, "This is first log"+message.getBody().toString());
return message;
Authorization is perfectly working but others are not.
It would be great if you could have suggestions.
BR,
Hanae -
Error while deploying, Custom Style Skin in OBIEE 11.1.1.6.7
Hi,
I have deployed Custom Style Skin in OBIEE 11.1.1.5 successfuly (with the help of http://www.rittmanmead.com/2010/12/oracle-bi-ee-11g-styles-skins-custom-xml-messages/ ).
Now when we're moving RPD, Catalog & Custom Style Skin from OBIEE 11.1.1.5 to OBIEE 11.1.1.6.7, I could deploy RPD & Catalog but am not able to deploy Custom Style & Skin Folders.
If you are aware of the process of deploying Custom Style & Skins (as mentioned in the link above), it requies:
1. Custom Style & Skins folder to be Deploy using Weblogic Console.
2. Making necessary changes in instanceconfig.xml (to point to the deployed folder) ---- this is where it's failing.
When I do add necessary tags ( <URL> & <UI>) in instanceconfig.xml and restart Services. Presentation Services dosen't come up. Error message that is in log file is:
In element URL: Can not have element children within a simple content.
unknown element 'UI'
Element 'UI' is not valid for content model : 'All(URL, SocketTimeoutSec,FileSizeMB)'
Any pointers?
Regards,
JitendraHi,
I too faced such issue, actually obiee11.1.1.5 version skin and style wont work in obiee11.1.1.6.0 and above patch ..
u have do it once again by using obiee11.1.1.6.0 skin (because the 11.1.16.0 has UI and skin different from 11.1.1.5.0 )
Thanks
Deva -
SSRS custom code for count in Report Footer
Hi All,
Please help me with the custom code used for below requirement
Debtor Name current 30+days 60+days 90+days
aaa 7000 0.00 0.00 10.00
bbb 5000 0.00 20.99 3.00
ccc 1000 0.00 0.00 0.00
Expected result in report footer :
0 1
2
if the value of 30+ , 60+ and 90+ columns >=1 then i have to display the count in Report footer,for that i have tried using a custom code like below :
Shared Dim OD As Integer=0
Public Shared Function Test(ByVal OP As Decimal) As Integer
If OP >= 1 Then
OD = OD + 1
Else
OD = OD
End If
Return OD
End Function
and using below code to display
Code.Test(Overdue)
but when i use this code in report footer is not displaying correct value.Please guide me where i am going wrong.
Please let me know if you need any other details.
Thanks in advance,
Samhith.Hi Samhith,
Per my understanding you what to count the rows which values >=1 and display them at the bottom of the table, you are trying to use the custom code to do this but failed, right?
I have tested in my local environment and find the custom code is not correctly, and I have an alternative method which is more easy and can work in both table and matrix.
As Vaibhav Chaudhari also mentioned that we can use the CountDistinct function, but more correctly, we can use the count() function and the RunningValue() function, because CountDistict will not count the duplicated values if they >=1.
Please find the expression as below:
=Count(IIf(Fields!Yourfield.Value>=1 , Fields!Yourfield.Value, Nothing))
OR:
=RunningValue(IIf(Fields!Yourfield.Value>=1 , 1, Nothing),Sum,"DataSetName")
If you still have any problem, please feel free to ask.
Regards
Vicky Liu -
How to execute custom code only when a specific node is selected in infoset
Hi,
We have written a piece of custom code under a node (P1045). Not all users will have access to this Infotype as it is related to Appraisals. So, when users (w/no access to 1045) try to run a Query for other info types data, they are getting error message 'Can not access 1045'. Custom code is getting generated whenever user runs a query. Tried to control custom code with simple IF condition by giving user name. Still generating 1045 code.
All users use same infoset, where a group of users has access to 1045 and another group does not have access to 1045.
Appreciate your inputs to get this resolved.
Thanks,
Swapna.Why don't you try another aproach, instead of adding the infotype to the infoset, create a new table as an alias (with the fields you want to show in regards to infotype 1045) and fill it in the node depending on the authorization check for that infotype in the code ?
I think that adding the infotype as a node will always get the data from the infotype regardless, that is why it's showing the error. -
Can I use Partial class to enhance a typed dataset without losing the custom code?
Hi All,
I wanted to see if I could use a Partial class for one of the datatable classes to add custom code so that when the dataset is regenerated I don't lose my code.
Partial public
Class
WA_MMTP_TrackerDataSet1
'Code for dataset
Partial Public Class PATIENTSTableAdapter
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
Public Overloads Overridable Function FillbyClinicianId(ByVal dataTable As WA_MMTP_TrackerDataSet1.PATIENTSDataTable, ClinicianId As Integer, sql As string) As Integer
Dim dd As System.Data.SqlClient.SqlCommand
dd = new System.Data.SqlClient.SqlCommand
dd.CommandText = Sql
dd.Connection = OpenConnection() ' UsersTableAdapter1.Connection
Me.Adapter.SelectCommand = dd 'Me.CommandCollection(0)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
'Other code for datatable
end class
end class
I'd like to take the function FillbyClinicianId and put it in a separate partial class like so and remove the function by the same name from the original file (dataset file):
Partial Public Class PATIENTSTableAdapter
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
Public Overloads Overridable Function FillbyClinicianId(ByVal dataTable As WA_MMTP_TrackerDataSet1.PATIENTSDataTable, ClinicianId As Integer, sql As string) As Integer
Dim dd As System.Data.SqlClient.SqlCommand
dd = new System.Data.SqlClient.SqlCommand
dd.CommandText = Sql
dd.Connection = OpenConnection() ' UsersTableAdapter1.Connection
Me.Adapter.SelectCommand = dd 'Me.CommandCollection(0)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
end class
But when I try this, the compiler gives the following errors:
Error 91 'Adapter' is not a member of 'AttendTrackerFull.WA_MMTP_TrackerDataSet1.PATIENTSTableAdapter'.
Error 92 'ClearBeforeFill' is not a member of 'AttendTrackerFull.WA_MMTP_TrackerDataSet1.PATIENTSTableAdapter'.
I guess I'm a little confused. once code is moved into the custom partial class it seems to lose any knowledge of the main class file and any references in the class. Am I doing it wrong? or is it a restriction of the .Net since it is in another
file. If its because its in another file, my next question would it be better to take the partial class I created to contain my custom code, should I just move my partial class to the bottom of the dataset.designer.vb file? But if I do this, wont it still
erase my custom code. Any suggestions?
Thanks
MichaelThanks for the reply.
They are compile time errors, but the error shows up even before compiling, so I guess it would be designer time exception also.
What I did the other day was to create a new class file (didn't add a namespace statement to class) then added the code in prev message. This morning I added a new module and added the prev code in it incased in the namespace
namespace ADO.NET.DataSet1TableAdapters statement. But I still have the same errors messages. I tried
to set the Custom tool.namespace property of the dataset to WA_MMTPDataset and then did the following in a module:
namespace WA_MMTPDataset
Module Module4
Partial Public Class PATIENTSTableAdapter
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
Public Overloads Overridable Function FillbyClinicianId(ByVal dataTable As WA_MMTP_TrackerDataSet1.PATIENTSDataTable, ClinicianId As Integer, sql As string) As Integer
Dim dd As System.Data.SqlClient.SqlCommand
dd = new System.Data.SqlClient.SqlCommand
dd.CommandText = Sql
dd.Connection = OpenConnection() ' UsersTableAdapter1.Connection
Me.Adapter.SelectCommand = dd 'Me.CommandCollection(0)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
End Class
Partial Public Class UsersTableAdapter
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
Public Overloads Overridable Function FillbyClinicianId(ByVal dataTable As WA_MMTP_TrackerDataSet1.UsersDataTable, ClinicianId As Integer, sql As string) As Integer
Dim dd3 As System.Data.SqlClient.SqlCommand
dd3 = new System.Data.SqlClient.SqlCommand
dd3.CommandText = Sql
dd3.Connection = OpenConnection()
Me.Adapter.SelectCommand = dd3 'Me.CommandCollection(0)
If (Me.ClearBeforeFill = true) Then
dataTable.Clear
End If
Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
Return returnValue
End Function
End Class
End Module
End Namespace
But I'm still getting the same errors. -
How to control or manipulate a report parameter through SSRS Custom Code
Hi,
In reporting services 2005 or 2008, is it possible to control the parameters inside the custom code of a report?
for example:
Let's say I have a parameter that displays the following value:
Red
Green
Blue
In typical scenario I can select one of the values or I can select all of the values then click the View Report button in reporting services.
I know that this approach is much easier to do if I have an external application like ASP.Net and from there I'll just add report viewer and control the parameters to be passed and then generate the report.
In the report I added text box that will serve as a hyperlink to refresh report:
In the Text Box Properties\Action tab. Is it possible to control the selection of values through a custom code(SSRS Custom Code) then the report will be automatically refreshed?
thanks,
JoeferNot sure about doing a multiple selection. But you can pop up an input box to get the input on the fly.
Add the below custom code and expression for the above parameter
Public function Getparamvalue() AS STRING
Dim x as STRING
x = InputBox("Enter Red / Blue / Green")
Return(x)
End function
=Code.Getparamvalue() -
I am receiving this error with the following code, which counts the number of work days between two parameters and I don't see the problem. Please help.
Public Function GetDateCount(ByVal StartDate AS DateTime, ByVal EndDate AS DateTime) AS Integer
Dim TempVal AS Integer
DimTotalDays AS Integer
TotalDays = 0
TempVal = DateDiff(DateInterval.Day, StartDate, EndDate) + 1
for I as Integer = 1 to TempVal
If(StartDate.DayOfWeek.ToString() <> "Sunday" AND StartDate.DayOfWeek.ToString() <> "Saturday") Then
TotalDays = TotalDays +1
End If
StartDate = DateAdd(DateInterval.day, 1, StartDate)
Next
Return TotalDays
End FunctionHi CNet Vase,
According to your description, you want to use custom code to count the number of work days between two parameters in the report, but when you run the report, an error occurs.
I reproduced the issue in my environment, the error message: ‘DimTotalDays’ is not declared. The error is caused by there is no space between Dim and variable TotalDays, so the system regards it as a unit. To fix this issue, please type
space behind the word Dim like below:
Dim TotalDays AS Integer
If there is any misunderstanding , please feel free to let me know.
Best Regards,
Wendy Fu
Maybe you are looking for
-
Where is file button in itunes 11?
I am trying to import playlists from one PC to another. It was easy to export to a USB stick but the instruction from Apple about importing is incorrect. It says, File, Library, Import Playlist but that structure does not exist in itunes 11.
-
Is it possible to only view files that could be opened by a program?
Hello all, this is my first mac and for the most part I find it as good or better than windows in almost everyway. One feature that I guess I took for granted in windows was that it only displayed files that could be opened by a program in that progr
-
I've been using firefox forever, use it with google maps, mostly with earth view and suddenly, it shows a diagonal mirror image of the map from the bottom right corner to the top left. Google maps in Chrome works fine and maps in Google Earth also wo
-
Cannot see users on other nodes
Calendar users cannot see the users on other nodes.What should I do? <P> You may not have configured your node-to-node connections. Use Connect Nodes or uninode -edit. Your fully qualified domain name for your network exceeds 16 characters. Shorten y
-
Unable to access Service Registry through VC 7.1 SP6
Hi, I am unable to access the service registry through VC 7.1 SP6. I followed all the instructions detailed by Rudi. But keep getting an error message 'Could not receive classifications from UDDI server. Please change the UDDI server'. Any help in re