Showing results 1 to 6 of 6

Thread: Report-Visual Studio

  1. #1
    Join Date
    28.03.2017
    Posts
    11

    Default Report-Visual Studio

    Iím new in Zenon and Iím using the Report Viewer (Repor-Visual Studio) tool in Zenon Supervisor.
    I have a dataset with some variables and Iím trying to make a chart.
    Iím writing in the expression the code to visualize the value, but it only shows the first variable in the dataset and it seems that I canít choose within my variables.
    I found functions ďFirstĒ and ďLastĒ that helped me choosing 2 of my variables in that dataset, Iím trying to figure out how to choose a variable that I desire from my dataset and not only the first or the last.
    I also found the function ďChooseĒ and it works for the first, writing Choose(1,Fields!VALUE.Value) it shows me the value of the first variable but it doesnít work with 2 or 3 for the second and the third.
    How can the system detect the first or the last of the variables? Are there any indexes to enter the ďarrayĒ of variables? And what is the code to enter a cell of that array? Fields!VALUE.value(0) or something similar doesnít work.
    Iím looking for the way to select and show in the chart one of the n variables from a dataset, now I have n dataset for n variables because of this problem and it isnít a good configuration.
    Thankís for your help.
    Attached Thumbnails Attached Thumbnails Screenshot_2.png   Screenshot_4.png  

  2. #
    Join Date
    28.02.2013
    Posts
    146
    Best Answer

    Default Re: AW: Report-Visual Studio

    Another option is to change your expression to "[VARIABLE]" (the field which contains the variable name), the datatype to "TEXT" and the value to your variable name.
    If you want to filter on text with wildcards, then you can use the operator "LIKE"...

    Please also take a look here: https://docs.microsoft.com/en-us/sql...ilder-and-ssrs

    Hint: When googeling for a solution add "SSRS" (short for SqlServerReportingServices" to your search words. There is a lot of information how to set up reports on MSDN.

    Regards,
    Felix

  3. #2
    Join Date
    15.09.2016
    Posts
    59

    Default Re: Report-Visual Studio

    Hello,
    first of all, you should install the Report Builder 2 from Microsoft. It is very comfortable to define your Report Files with this program.

    After you have installed the Report builder, please create a new Report file and choose your datasets. In your case i think you should choose Online values. After that, you will be ask if you want to use the Report builder to define the file.

    Try the rest by youself for the moment. I thnk it is simple to use, but if you have still Problems please write again or check the Help file.


    Greetings
    Florian L.

  4. #3
    Join Date
    28.02.2013
    Posts
    146

    Default Re: Report-Visual Studio

    Hello,

    first of all add [VARIABLES] to the series group field of your chart and remove your expression.
    By adding [TIMESTAMP] to the category group you define that the [TIMESTAMP] field is used for the x-axis.
    Then you need to tell the chart what filed identifies data that belongs togehter. By specifing [VARIABLE] (which contains the variable name), as data series group you tell the chart that all datarows that contain the same variable name belong together to one series and therefore shall be "drawn as one line".

    With that you have a chart showing one curve per variable that is contained in the datastream.

    If you do not want to display all it is possible to add filters which are applied on the dataset in the properties (section "Filters") of the chart.

    Regards from Salzburg,
    Felix

  5. #4
    Join Date
    28.03.2017
    Posts
    11

    Default Re: Report-Visual Studio

    Thank you felixst for your answer.
    I understood what you explained to me. 
    Now I have the chart showing a line for each variable as I wanted.
    How can I set a filter in which I choose the variable that I desire? I tried a strcmp with the name but it doesn't work, it gives me an error and it shows nothing, maybe i'm failing with the code..
    Anyway, I wish to set up a filter in which I choose my variables by their names, how can I do it?
    I'll post you the filter and the expression that I tried.
    Thank you for your time again.
    Attached Thumbnails Attached Thumbnails Screenshot_9.png  

  6. #5
    Join Date
    10.12.2007
    Posts
    181

    Default AW: Report-Visual Studio

    Maybe it works when you use Fields!VARIABLE.NAME instead of .VALUE in your expression...

  7. #6
    Join Date
    28.02.2013
    Posts
    146
    Best Answer

    Default Re: AW: Report-Visual Studio

    Another option is to change your expression to "[VARIABLE]" (the field which contains the variable name), the datatype to "TEXT" and the value to your variable name.
    If you want to filter on text with wildcards, then you can use the operator "LIKE"...

    Please also take a look here: https://docs.microsoft.com/en-us/sql...ilder-and-ssrs

    Hint: When googeling for a solution add "SSRS" (short for SqlServerReportingServices" to your search words. There is a lot of information how to set up reports on MSDN.

    Regards,
    Felix

Similar Threads

  1. Microsoft Visual C++ Runtime Library Error
    By douglasm in forum VSTA
    Replies: 5
    Last Post: 5th April 2019, 06:54
  2. Visual Basic Debugger
    By jebote in forum VBA
    Replies: 2
    Last Post: 7th September 2012, 08:22
  3. Form visual style windows XP/7
    By ippela in forum VSTA
    Replies: 1
    Last Post: 26th September 2011, 00:20
  4. Form visual fault
    By ippela in forum VSTA
    Replies: 2
    Last Post: 23rd September 2011, 09:20
  5. how open vipwin from visual basic?
    By draganchem in forum VBA
    Replies: 1
    Last Post: 2nd June 2010, 12:14

Tags for this Thread

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •