Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ASP -> SL

Posted on 2011-03-10
12
Medium Priority
?
457 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
  • 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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 2000 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 2000 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
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…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

877 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