vb base reporting

Join Date
Apr 2006
Location
pune
Posts
18
Hi
I am using rs view32 in which, I want to do reporting in excel with specific format .I am not much more familiar with vb.
In this project I want to show some current data and also some logged data on excel.
Please provide me some sample project which will help me to develop the my programme but it must be without SQL.
Is there any user manual to develop vb for rs view32
Thanks and regards
Shailesh

 
RSView and VBA

I do alot with VBA with RSView32. There are a lot of resorces both on the web (try Google), Rockwell website has a lot of examples of using RSView with Excel. I also think there are some resources on the RSView32 CD.

Look around and you should be albe to find enough examples to piece together the code you need.
 
I once had to do an excel project for reporting from an RSV32 system, but the users did not have access to the RSV server.
A simple way is to log the data required to an odbc database.
open up an excel sheet, Select say sheet 3 , create a macro then get external data from the menu, create a query & select the format i.e. date/time between dates for example, run the query stop the macro, goto vba convert the macro to vb, you can then modify the query to suit & return the data to excel, you can insert a variable inplace of the dates so a date selector in the form of mscalendar will select the dates required, then format the data in excel as required
The last one I did fetched line data from the production lines i.e. pack counts efficiency etc. this way all could view the data at anytime. just create an excel template for them.
an example is below
' Macro1 Macro
' Macro recorded 28/05/2009 by len
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=MyScada;UID=MyDatabase;Trusted_Connection=Yes;APP=Microsoft® Query;WSID=LEN_HOME;DATABASE=MyScada;" _
, Destination:=Range("A1"))
.CommandText = Array( _
"SELECT FIXALARMS.ALM_TAGNAME, FIXALARMS.ALM_TAGDESC, FIXALARMS.ALM_VALUE, FIXALARMS.ALM_DESCR, FIXALARMS.ALM_ALMAREA, FIXALARMS.ALM_OPNAME, FIXALARMS.ALM_OPFULLNAME, FIXALARMS.ALM_DATELAST, FIXALARMS." _
, _
"ALM_TIMELAST, FIXALARMS.ALM_DTLAST" & Chr(13) & "" & Chr(10) & "FROM BCHScada.dbo.FIXALARMS FIXALARMS" & Chr(13) & "" & Chr(10) & "WHERE (FIXALARMS.ALM_DATELAST>'30/07/06' And FIXALARMS.ALM_DATELAST<'25/10/06')" & Chr(13) & "" & Chr(10) & "ORDER BY FIXALARMS.ALM_TAGNAME" _
)
.Name = "Query from MyScada"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = True
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With
End Sub
 
Last edited:
format Excel cells from FTView VBA

Hi,
Is there any method to format excel file which we have created and logged data into....actually i want to add Borders and format the text.....
I tried with the following code

report.Application.range(3, 2).Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With

but unable to format it,
anyone with the solution???????

thanks....
 
Please provide me some sample project which will help me to develop the my programme but it must be without SQL.
I am a beginner who studies ESVIEW32
 
I am using rs view32 in which, I want to do reporting in excel with specific format .I am not much more familiar with vb.
In this project I want to show some current data and also some logged data on excel.

Unfortunately,I am a beginner who studies ESVIEW32 I can not read the text above,Please provide me some sample project which will help me to develop the my programme thanks

 
I am using rs view32 in which, I want to do reporting in excel with specific format .I am not much more familiar with vb.
In this project I want to show some current data and also some logged data on excel.

Unfortunately,I am a beginner who studies ESVIEW32I can not read the text above,Please provide me some sample project which will help me to develop the my programme thanks
 

Similar Topics

I’ve been tasked with extracting PLC (logix 5572) realtime data, storing it in a database (anything compatible with our data) and displaying it in...
Replies
0
Views
31
We are a water/wastewater plant, collecting realtime and manually entered data. We have been using FactoryTalk Historian (OSI PI) for real time...
Replies
3
Views
130
Hello to Everyone all over the world: I don't want to reinvent the wheel so I am asking others if they have programmed something similar to this...
Replies
6
Views
289
Kindly, I am trying to do some Modbus Rtu communication between a 1214C Siemens plc and the following slaves. ( Schneider PM5110 meter , Socomec...
Replies
4
Views
262
I'm connecting up two remote ethernet devices to the switch in my control panel, and I'm trying to do the cleanest install. The customer typically...
Replies
11
Views
589
Back
Top Bottom