Creating a Cross tab that contains fields with shared variables

I am trying to create a cross tab in CR2008. I can get the field in the details but cannot choose it when trying to create a cross tab. Please help.
Thanks.
Shared numbervar MonHrs;
Shared numbervar TueHrs;
Shared numbervar WedHrs;
Shared numbervar ThuHrs;
Shared numbervar FriHrs;
Shared numbervar SatHrs;
Shared numbervar SunHrs;
If dayofweek(today) = 1
    then {@CapacityTeamCount} * SunHrs else
if dayofweek(today) = 2
    then {@CapacityTeamCount} * MonHrs  else
if dayofweek(today) = 3
    then {@CapacityTeamCount} * TueHrs else
if dayofweek(today) = 4 
    then {@CapacityTeamCount} * WedHrs else
if dayofweek(today) = 5
    then {@CapacityTeamCount} * ThuHrs else
If dayofweek(today) = 6
    then {@CapacityTeamCount} * FriHrs else
if dayofweek(today) = 7
    then {@CapacityTeamCount} * SatHrs

I don't use CR cross tabs as a matter of preference so I can't tell you if the shared variables are having an impact on their availability in the cross tab dialog or how to make the necessary adjustments...
I can, however, tell you that you don't need a cross tab for what you are trying to do. All you need to do is split all of the IF formulas in to their own formulas.
This will place each day in it's own column.
Now... you'll notice that there's a lot white space and nothing's aggregated... Not to worry, it's easy to fix.
Just create a grouping on which ever field you were going to use as "rows" in the cross tab... insert SUM totals in the group header... and hide the details.
Now you have created your own manual cross tab, without using CR's cross tab object.
HTH,
Jason

Similar Messages

  • I have created a form that contains fields with default text for a user to update/personalize.  Is there a way to style the text so I can quickly identify changes to default text in a field?

    I have created a form that contains fields with default text for a user to update/personalize.  Is there a way to style the text so I can quickly identify changes to default text in a field?

    George - Thanks you so much!  Actually, i'd love for the text color to be red font color.  Could you send me the script for that? And I assume I just copy and paste the script into the field properties (see screenshot)?
    thanks again!
    Seth

  • Creating Profile type report that hold fields with multiple values

    Really hoping someone can please help me out as I am very new to Crystal Reports.
    We use Maximizer CRM and we have been in need of some custom reports to rule out risk for regulators. I contacted Max and they suggested the only possible way is to create through Crystal. Its been almost one month already and I still cannot for the likes of me get this report operating properly. I have been inside and out on all sorts of forums, posted topics but no luck! So I will give it one more attempt in hopes that one of you geniuses can show me the way.
    In Maximizer CRM there is date, numeric, alphanumric and table. Our table fields items can be set to either single value or multi-value. So in crystal i did a default join of Client.tbl and the user-defined fields from view and joined the client id and contact number from all the view fields to client table. See Image:
    and I have dragged all the relevant fields in rows (in details section) rather then columns because we would be reporting on more then 1 record at a time. My problem is - If there is a table with multiple items selected (values), the records triple in count and it will show the same record over and over with just single field value changing at a time.
    The formula field you see in the image is from when I posted a discussion and Abhilash assisted me by providing the formulas I should add:
    1) Create a formula with this code and place this on the Details Section:
    whileprintingrecords;
    stringvar s := s + {field_with_multiple_values} + ", ";
    2) Next, move all the fields (except the formula field above) from the Details section to the Report Footer
    3) Create a formula with this code and place this on the Report Footer. This field would replace the existing field that contains multiple values:
    whileprintingrecords;
    stringvar s;
    Left(s, len(s)-2);
    This method is not working out for this type of report. When I add the formula Crystal is still counting my 2 records as 5 records but I can only view it as a single record and the multi-field has all the values for both records and displaying as a single record. See image:
    Can anyone please assist and advise where I am going wrong?
    -Jared

    Hi Jared,
    Thanks for taking down memory lane that is Maximizer.  Nice to see their table structure hasn't been simplified in the last 20 years.
    If I understand what's happening, you should only see 2 records and not 5.  That means your joins are creating duplicate records.  For now I'm going to skip over trying to optimize your query because I still have bad dreams of linking Maximizer tables.
    There are a couple of ways to work around the duplicates, one is to create a group and instead of having your formula in the Detail section, put it in the Group Header.  The question is what would you create your group on that would get you a unique record?
    If you know where the duplicates are coming from, create a Record Selection Formula that will remove the duplicates.
    There is also the menu option Database | Select Distinct Records.  I've never really had success with this one but there's no harm in giving it a shot.
    I would have you try and find which table or combination of tables is generating the duplicates but that requires playing with your links.  Normally I'd start by adding one table at a time and dropping one field onto the report.  If it doesn't repeat then add another table and field and repeat until you get your duplicates.  Once you know where they are coming from then you can either drop that table from your query or create a selection formula that removes the duplicates.
    Good luck,
    Brian

  • How Can I create a SAP form that contains activeX report viewer?

    I'm trying to create a SAP form that contains a ActiveX control to view a Crystal Report. Can anyone Help?
    Thanks,
    Ezequiel.

    Thanks Ludek, I use this a sub to create a report document and report viewer in sap bussines one form.
    Running this code shows the sap business one form with the report viewer but then closes SAP Business One Application.
    which may be the problem?.
    Private Sub CreateFormWithActiveX()
        Dim CP As SAPbouiCOM.FormCreationParams
        Dim fTree As SAPbouiCOM.Form
        Dim AcXTree As SAPbouiCOM.ActiveX
        Dim oItem As SAPbouiCOM.Item
        Dim CRapp As CRAXDDRT.Application
        Dim CRRep As CRAXDDRT.Report
        'Dim CRepDoc as
        ' Set the form creation parameters
        CP = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
        CP.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
        CP.FormType = "ACXTree"
        CP.UniqueID = "ACTree1"
        fTree = SBO_Application.Forms.AddEx(CP)
        fTree.Left = 10
        fTree.Top = 10
        fTree.Width = 800
        fTree.Height = 600
        fTree.Title = "Crystal Report Viewer - Argentis"
        fTree.AutoManaged = True
        ' Add the TreeView Control to the form
        oItem = fTree.Items.Add("Tree", SAPbouiCOM.BoFormItemTypes.it_ACTIVE_X)
        oItem.Left = 1
        oItem.Top = 1
        oItem.Width = 800
        oItem.Height = 600
        ' Create the new activeX control
        AcXTree = oItem.Specific
        CRapp = New CRAXDDRT.Application
        CRRep = CRapp.OpenReport("C:\Projects\Crystal Report ActiveX Viewer\Crystal\Indumetaria\Reportes\ARInvoiceMatrix_portrait.rpt", 1)
        'CRRep.RecordSelectionFormula = "{OINV.DocEntry} = {?doc_num}"
        For i As Integer = 1 To CRRep.Database.Tables.Count
          Dim ConnectionInfo As CRAXDDRT.ConnectionProperties
          ConnectionInfo = CRRep.Database.Tables(i).ConnectionProperties
          ConnectionInfo.Delete("Integrated Security")
          ConnectionInfo.Delete("Provider")
          ConnectionInfo.Delete("Data Source")
          ConnectionInfo.Delete("Initial Catalog")
          ConnectionInfo.Delete("User ID")
          ConnectionInfo.Delete("Password")
          ConnectionInfo.Add("Provider", "SQLOLEDB")
          ConnectionInfo.Add("Data Source", "Ezequiel")
          ConnectionInfo.Add("Initial Catalog", "SITKA")
          ConnectionInfo.Add("Integrated Security", 0)
          ConnectionInfo.Add("User ID", "sa")
          ConnectionInfo.Add("Password", "sa2005")
        Next
        AcXTree.ClassID = "CrystalReports102.ActiveXReportViewer.1"
        'oTreeView = AcXTree.Object
        oViewer = AcXTree.Object
        oViewer.EnableToolbar = True
        oViewer.EnableStopButton = True
        oViewer.EnableSelectExpertButton = True
        oViewer.EnableSearchControl = True
        oViewer.EnableRefreshButton = True
        oViewer.EnableProgressControl = True
        oViewer.EnablePrintButton = True
        oViewer.EnablePopupMenu = True
        oViewer.EnableGroupTree = False
        oViewer.DisplayGroupTree = True
        oViewer.ReportSource = CRRep
        oViewer.ViewReport()
        fTree.Freeze(True)
        ' Make the form visible
        fTree.Visible = True
      End Sub
    Regards.

  • Issues with Shared Variables in Systems Running for Extended Periods of Time

    I am designing a large SCADA system using LabVIEW DSC and cRIOs. My plan is to use shared variables to communicate the majority of the information across my network (much like "tags" in a normal SCADA system).
    I'm wondering if anyone has experienced issues (connection failures, etc...) with shared variables running on systems for months (both real-time and windows based PCs) without the cRIO or PC being restarted/redeploying the variables. What is the stability of the Shared Variable Engine over extended periods of time?
    Thank you for the input.
    --CLD--
    LV 6.1, 8.6.1, 2011 SP1, 2012 SP1

    I have a system with 2 cRIO's each with Ethercat extension chassis.  Each cRIO hosts ~100 NSV's and is running the scan engine at 40 Hz.
    Each cRIO is coupled to a HMI that has front panel control bindings to NSV's hosted on the cRIO as well as a windows hosted mirror library (used for citadel db logging) that is also bound to the cRIO NSV library.  The cRIO's have monay months of contiguous run time without reboot and I closely monitor cpu and memory usage and also rt performance metrics and will log faults if there are any such events.  I also use NSV's for messaging from the HMI to the cRIO for such things as setting zero offset values and deploying configuration parameters.  My overall findings are that the SV engine and the PSP are stable and efficient (especially NSV<->NSV and NSV<->HMI binding)

  • TPC 2012 - Problems with shared variable

    Hi,
    I tried to program simmilar thing to this one http://zone.ni.com/devzone/cda/tut/p/id/5548 on TPC 2012. But it doesn't work.I can see that both programs on my laptop and TPC are working(I've added an additional counter with display), but I cannot see any effect on TPC when I change the value of shared variable on my laptop. I use LabView 8.6 with Touch Panel Module. My question is what are the exact steps to run such application on TPC2012? Are they the same as for TPC 2006?
    I've noticed following issues:
    1.I cannot deploy the program from Project Manager(there is an information that maybe TPC Service is not started. - I've found such information about TPC Service http://digital.ni.com/public.nsf/allkb/DE177828D27A14A48625734E00768B66 but in fact I cannot find Start » All Programs»National Instruments » NI TPC Service » NI TPC Service Manager 1.0 Does it mean, that the TPC Service is not installed and the programm with shared varibles won't be working or can I start it somehow in another way? Do I need to have TPC service installed on TPC2012?
    Until now, I've built the project and sent it through FTP to TPC(the folder was /TEMP) and then started it.
    2.Ping works OK
    Thank you in advance for any hints how to solve this problem.
    Martin

    Well no problem, but I'm frustrated with this issue... I've tested many things and nothing. Just to help someone else as I in the future, these are my sources:
    http://forums.ni.com/t5/LabVIEW/TPC-2012-Problems-with-shared-variable/m-p/1009631/highlight/false#M...
    http://digital.ni.com/public.nsf/allkb/28536DE7E2D9E98B8625770B00738920?OpenDocument
    http://zone.ni.com/reference/en-XX/help/372507B-01/lvtpcgsm/tpc_install_sharvar/
    http://zone.ni.com/reference/en-XX/help/372507C-01/lvtpcgsm/tpc_install_sharvar/
    http://digital.ni.com/public.nsf/allkb/23532363F4905EC28625727A00730B80?OpenDocument
    http://forums.ni.com/t5/FieldPoint-Family/TPC-2006-Not-Listed-in-Targets-and-Devices/td-p/566325
    http://forums.ni.com/t5/LabVIEW/MAX-can-t-detect-TPC-2106T/td-p/831524
    http://zone.ni.com/devzone/cda/tut/p/id/5868
    http://digital.ni.com/public.nsf/websearch/28B748B9697B79E18625725A00009066?OpenDocument
    http://digital.ni.com/public.nsf/websearch/D1726990DCEB82E4862570F20069C57D?OpenDocument
    http://digital.ni.com/public.nsf/allkb/3B469103BBDD4CE48625726000665B36
    I hope find some hint..
    Fabian León
    Certified LabVIEW Associate Developer

  • Is it necessary to use semaphores with shared variables

    is it ok to use semaphores with shared variables to prevent race conditions or is that built into the shared variable?
    - James
    Using LV 2012 on Windows 7 64 bit

    Semaphores are more of a method to protect a section of code from executing, and as tst as said they won't really help you.  There is nothing inherently harmful about having 2 sections of code trying to write to a shared variable at the same time.  Nothing like a crashed program, scrambled value, or an error message.  What will happen is that whatever happens 2nd is the value that sticks.  So a shared variable can still have the possiblility of race conditions just like local and global variables if you are dealing with multiple writers.  That is really an architecture problem.

  • I want to work with shared variables. How can I add a remote pc?

    I did an aplication to work with shared variables, but I do not know how add a remote pc. I tried make it in Variable Manager, but Labview showed a error message: "Cannot Connect to Target xxxxxxxx". What can I do?

    Message Edité par JeromeL le 08-28-2007 06:44 AM
    Jérôme LIBBRECHT

  • How can I list all folders that contain files with a specific file extension? I want a list that shows the parent folders of all files with a .nef extension.

    not the total path to the folder containing the files but rather just a parent folder one level up of the files.
    So file.nef that's in folder 1 that's in folder 2 that's in folder 3... I just want to list folder 1, not 2 or 3 (unless they contain files themselves in their level)

    find $HOME -iname '*.nef' 2>/dev/null | awk -F '/'   'seen[$(NF-1)]++ == 0 { print $(NF-1) }'
    This will print just one occurrence of directory
    The 'find' command files ALL *.nef files under your home directory (aka Folder)
    The 2>/dev/null throws away any error messages from things like "permissions denied" on a protected file or directory
    The 'awk' command extracts the parent directory and keeps track of whether it has displayed that directory before
    -F '/' tells awk to split fields using the / character
    NF is an awk variable that contains the number of fields in the current record
    NF-1 specifies the parent directory field, as in the last field is the file name and minus one if the parent directory
    $(NF-1) extracts the parent directory
    seen[] is a context addressable array variable (I choose the name 'seen'). That means I can use text strings as lookup keys.  The array is dynamic, so the first time I reference an element, if it doesn't exist, it is created with a nul value.
    seen[$(NF-1)] accesses the array element associated with the parent directory.
    seen[$(NF-1)]++ The ++ increments the element stored in the array associated with the parent directory key AFTER the value has been fetched for processing.  That is to say the original value is preserved (short term) and the value in the array is incremented by 1 for the next time it is accessed.
    the == 0 compares the fetched value (which occurred before it was incremented) against 0.  The first time a unique parent directory is used to access the array, a new element will be created and its value will be returned as 0 for the seen[$(NF-1)] == 0 comparison.
    On the first usage of a unique parent directory the comparison will be TRUE, so the { print $(NF-1) } action will be performed.
    After the first use of a unique parent directory name, the seen[$(NF-1)] access will return a value greater than 0, so the comparison will be FALSE and thus the { print $(NF-1)] } action will NOT be performed.
    Thus we get just one unique parent directory name no matter how many *.nef files are found.  Of course you get only one unique name, even if there are several same named sub-directories but in different paths
    You could put this into an Automator workflow using the "Run Shell Script" actions.

  • Data binding cross tab in Crystal 2008 with Xcelsius swf file

    I've created a visualisation in Xcelsius and want to bind it to a cross tab in CR2008.   The labels appear correctly in the swf visualisation but I get no data.   The format of the table in Xcelsius and the cross tab I believe to be the same, covering data formats.   I have placed the Xcelsius visualisation in page header "a" with the cross tab in page header "b".   The Xcelsius table has been defined in terms of column and row headers as well as data area, so I've done everything that I understand to be correct.   In CR2008 I have specified that I use the existing named cross tab.
    Does anyone have any idea what I may have missed.
    tia
    Neil

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly

  • Cross Tab keeps suppressing rows with no data

    I have a Crystal Report that is using a Cross Tab.  I have 2 rows in the cross tab the first row is the Month name and the second row is the Day Number of the month, and the report will print the Month Name on the left followed by all the Calendar Day Numbers in the month.
    The problem is that when there is no data for a Day Number row the entire row is not shown.  So you might have day number 1, 2, 3 and then jumps to maybe 6.  I found that the ones the cross tab was not showing did not contain any data.  I just need the calendar day number to at least print so the days read sequentially instead of jumping to 6 or another number.
    Is there any way to show the rows even if they don't contain any data?
    I have right clicked and gone into the Cross Tab expert and there isn't anything checked to suppress rows.  I don't understand why its still suppressing rows!
    Is there a global report option that I missed that says "suppress rows when there are no records"?
    Thank you all in advance,
    I am using Crystal Reports XIR2 with Service Pack 4

    I am still not getting all rows to show up on the report.   The rows that are not showing up contain no data in the cross tab but the row still needs to show.
    The only reason I got it to work before was because I selected all values for the columns parameter so it brought back everything in the database that was why it was able to show all values.
    I have two tables one is a date database and contains all the dates till 2012.  The other is the product data which contains the product code and qty that the cross tab summarizes.
    I have done a left outer join from the product data to the date database, and I am still not able to get all the dates to list for the selected time range. 
    I was able to get the dates to show up when I right clicked the link and modified the link properties.  I chose Left Outer Join and then under Link Type I selected ">" in the database expert dialog.  This brought back all the dates but the data in the report was all the same.  Probably just the first record repeated all down the page.
    Any ideas how to fix this problem?

  • Creating exe for application that contains ARINC and MIL Codes

    Hi all,
    I am not able to create exe for my application that contains ARINC and MIL. To be precise, the ARINC and MIL part is not working in the exe created. 
    Please tell me how to create an EXE with ARINC and MIL codes.

    Did you install the according device drivers on the target machine? And no I don't mean the instrument drivers that you use in LabVIEW but the OS device drivers from NI (resp. AIT), that will access the hardware boards and provide an interface to the LabVIEW application. I would expect them to be part of the AIT SDK kit that comes with the boards.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Creating interactive swf files that contain flash files that don't play once loaded on server

    I am creating an interactive swf file that contains a  flash movie f4v file and when I preview the page in ID it plays, but once I export the InDesign file to swf, insert that on a html page using Dreamweaver (so I can send a link and not a file out) the movie doesn't play, just the first frame of the clip.  I have uploaded the f4v file to our server and linked in the original ID file and it still doesn't play.  Any suggestions or similar issues?

    I have left the page up for quite a while to see if it is just taking longer to load that clip and that doesn't seem to be it.  I am just stumped and honestly not knowledgable on how websites and servers work - just know how to get my documents up so I can send links.

  • How to create a stored procedure that contains all 3 AFTER Triggers Update/Insert/Delete ?

    Hi guys, I'm trying to create a Stored procedure that will automatically add all 3 After triggers when executed on any given database, can someone please explain and give an example on how do I go about doing this ? I'd also like it to raise any errors
    that may come across, thanks in advance.

    Lets start with the question why do you need the triggers at all. Since SQL Server 2005 we can use an OUTPUT clause.
    This code can be re-written in SQL Server 2005 using the OUTPUT clause like below:
    create table itest ( i int identity not null primary key, j int not null unique )
    create table #new ( i int not null, j int not null)
    insert into itest (j)
    output inserted.i, inserted.j into #new
    select o.object_id from sys.objects as o
    select * from #new
    drop table #new, itest;
    go
    Now from this example, you can see the integration of OUTPUT clause with existing DML syntax.
    Another common scenario is auditing of data in a table using triggers. In this case, the trigger uses information from the inserted and updated tables to add rows into the audit tables. The example below shows code that uses OUTPUT clause in UPDATE and DELETE
    statements to insert rows into an audit table.
    create table t ( i int not null );
    create table t_audit ( old_i int not null, new_i int null );
    insert into t (i) values( 1 );
    insert into t (i) values( 2 );
    update t
       set i  = i + 1
    output deleted.i, inserted.i into t_audit
     where i = 1;
    delete from t
    output deleted.i, NULL into t_audit
     where i = 2;
    select * from t;
    select * from t_audit;
    drop table t, t_audit;
    go
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to create an e-mail that contains a graphic flyer notice

    I need to create an e-mail poster advertisement for a
    recreation area that
    will be sent out to shareholders. I need to do this as an
    extra-curricular
    activity for work. Does anyone have any suggestions on how I
    would do this?
    Would I create the web page and then send the web page in an
    e-mail. I need
    the info to show up directly, not
    through an attachment. Also, once created, this will be sent
    out to
    shareholders. How do I save this file to disk( in what format
    )so that it
    can be sent out by my boss. Any suggestions would be helpful.
    Thanks
    jmick

    Thanks for your assistance. I went to mailchimp and found
    some helpful
    information. I also found another program and created a
    presentable draft
    that I have forwarded on. Thanks again.
    jmick

Maybe you are looking for