Solved

ASP -> SL

Posted on 2011-03-10
12
453 Views
Last Modified: 2013-11-12
Hi Experts

I have an ASP page that prints using a third party printing object through its designer, but wondered if i can do this in a SL4? If so what can i do with existing code to transfer in SL.

I have attached the code and 2 screenshots - one of the page and the printed label just to show how the ASP works

Thanks
XCEL-100-SATA-2-5.pdf
ASP-screenshot.docx
ASPSSD.txt
0
Comment
Question by:razza_b
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
12 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 35110171
What type of "third party printing object" are you using (ActiveX, C++, ...)?
0
 
LVL 1

Author Comment

by:razza_b
ID: 35115737
We use a designer called TFormer and thats where i create the label, then the names(values) on label is used in code and then the dll is added to solution and i use the objects from that to help do printing, to get the repo name, form name etc.

these are the fields on label and in asp(see attachment)...
          Job.RepositoryName = "<%=TFormerRepository%>"
          Job.ProjectName = "<%=RS("LabelProject")%>"
          Job.FormName = "<%=RS("LabelType")%>"
          Job.PrinterName = ""
          JobData.AddNewRecord() // add a new record. Each record prints the Detail Band of the form
          Jobdata.SetDataField "PartNumber","<%=RS("PartNumber")%>"
          Jobdata.SetDataField "SerialNumber","<%=RS("Serial")%>"
          Jobdata.SetDataField "CustomerSerialNumber","<%=RS("CPN")%>"
          Jobdata.SetDataField "CustDesc","<%=REPLACE(RS("CustomerDesc"),CHR(34),"")%>"
          Jobdata.SetDataField "WWNumber","<%=RS("WWN")%>"
          Jobdata.SetDataField "COO","<%=RS("COO")%>"
          Jobdata.SetDataField "Model","<%=RS("SmartModel")%>"
          Jobdata.SetDataField "WorkOrder","<%=RS("WorkOrder")%>"
          Jobdata.SetDataField "CPN","<%=RS("CustomerModel")%>"
          Jobdata.SetDataField "Revision","<%=RS("CustomerRev")%>"
          Jobdata.SetDataField "Firmware","<%=RS("Firmware")%>"
          Jobdata.SetDataField "Capacity","<%=RS("Capacity")%>"
          Jobdata.SetDataField "Interface","<%=RS("Interface")%>"
          Jobdata.SetDataField "DOM","<%=RS("DOM")%>"


Thanks
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 35116695
I haven't heard of TFormer, but if it is ActiveX, you need to do something special to work with ActiveX, such as creating an HTML page, with a reference to the ActiveX control.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 1

Author Comment

by:razza_b
ID: 35117057
I could get TFormer working myself its just the rest of the code in the asp page i want to use in SL if its possible.

Would it be possible to use/modify code into SL?

0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 500 total points
ID: 35118316
I am not sure what you mean by "the rest of the code"...I don't think that you can use ASP classic code in Silverlight, unmodified, so you would need to re-engineer as .NET code.
0
 
LVL 1

Author Comment

by:razza_b
ID: 35120114
i mean tformer not a problem(designer & dll), the"rest of the code" what i have shown you can it be easily re-engineered in SL?

so i can basically use this in the xaml.cs(obviously modified for c#)....

// db connection here

<%IF Len(SerialNumber) > 1 THEN
        SQL="EXECUTE wsp_PrintSSDProductLabel '" & SerialNumber  & "'"
        'RETURNS : Plant,WorkOrder,Serial,WWN,CPN,CustomerRev,DOM,PartNumber,CustomerModel,CustomerDesc,SmartModel,Capacity,Interface,Firmware,Coo,LabelType,LabelProject,PrintFlag

        RS.Open(SQL)
                'Print Labels
        Sub PrintLabel()
          set Job = window.TF.CreateJob()
          set JobData = Job.NewJobDataRecordSet()
          TF.License "Modular Technologies, Inc.",3,2,"A34AB63D4F7CAFD40E6969220DDC9"
         Job.RepositoryName = "<%=TFormerRepository%>"
         Job.ProjectName = "<%=RS("LabelProject")%>"
          Job.FormName = "<%=RS("LabelType")%>"
          Job.PrinterName = ""
          JobData.AddNewRecord() // add a new record. Each record prints the Detail Band of the form
          Jobdata.SetDataField "PartNumber","<%=RS("PartNumber")%>"
          Jobdata.SetDataField "SerialNumber","<%=RS("Serial")%>"
          Jobdata.SetDataField "CustomerSerialNumber","<%=RS("CPN")%>"
          Jobdata.SetDataField "CustDesc","<%=REPLACE(RS("CustomerDesc"),CHR(34),"")%>"
          Jobdata.SetDataField "WWNumber","<%=RS("WWN")%>"
          Jobdata.SetDataField "COO","<%=RS("COO")%>"
          Jobdata.SetDataField "Model","<%=RS("SmartModel")%>"
          Jobdata.SetDataField "WorkOrder","<%=RS("WorkOrder")%>"
          Jobdata.SetDataField "CPN","<%=RS("CustomerModel")%>"
          Jobdata.SetDataField "Revision","<%=RS("CustomerRev")%>"
          Jobdata.SetDataField "Firmware","<%=RS("Firmware")%>"
          Jobdata.SetDataField "Capacity","<%=RS("Capacity")%>"
          Jobdata.SetDataField "Interface","<%=RS("Interface")%>"
          Jobdata.SetDataField "DOM","<%=RS("DOM")%>"

          Job.PrintForm()

        End Sub
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 35121438
The code looks pretty straightforward, with lines to set properties, and call the PrintForm method.

What does NewJobDataRecordSet represent in this line?

set JobData = Job.NewJobDataRecordSet()

Open in new window

   

Is it an ADO classic Recordset object?    
0
 
LVL 1

Author Comment

by:razza_b
ID: 35121514
yes it an ADO classic Recordset object, but i think i know what ive to do should be striaght foward, just wanted someone's opinion about taking asp to SL, but your right its just .net code, i was thinking SL would need to have something similar in xaml to asp.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 35121667
This wouldn't be XAML, since that is declarative definition for a control.  That code would need to go in the code-behind xaml.cs file.  .NET can work with ADO classic Recordset object, if that is what the TFormer control uses.  This should be achievable in Silverlight, if that is all you are looking for.
0
 
LVL 1

Author Comment

by:razza_b
ID: 35126851
yeah ok, once i get the dll into SL project this should be fine (but also refereing to other post about tformer dll), will update asap.
0
 
LVL 1

Author Comment

by:razza_b
ID: 35189403
Added a SL class library and created classes for the third party dll to be written in C# code for the purposes of printing with SL.
0
 
LVL 1

Author Closing Comment

by:razza_b
ID: 35189428
This is what i had to do to get third party printing dll that was written in .net to be able to work within SL
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question