I would like to draw a box dynamically in SAP Script, whereas the POSITION YORIGIN for the box will be changing constantly depending on the availability of data for print.
For more Detail , Please have a look on the pic.
On page2 marked area, I want to display data on page3. Empty area on page2 is not fixed and vary depending on the data.Therefore , I have to display page3 data on empty space which is not fixed.
regards,
Umar Abdullah
You cannot specify the YORIGIN value dynamically, however here is one workaround how you can place box in a dynamic way. You can do this from print-program:
DATA: command TYPE c LENGTH 100.
command = 'BOX WIDTH ''17.5'' CM HEIGHT 5 CM FRAME 10 TW INTENSITY 15'.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = command
EXCEPTIONS
UNOPENED = 1
UNSTARTED = 2
OTHERS = 3.
This will insert new box on the form, and you can control the position by changing command string conditionally depending on the presence of data on page 2.
Related
I am trying to set the color of an indicator to different colors based on different values, like 1 = red, 2 = blue etc. Using guidance from a Youtube video (accessible using this link: https://www.youtube.com/watch?v=czUmPQmKmGU), I have created a Colors[4] control for the indicator I have after changing it to the "write" function.
The Problem on the front panel is that I am getting a control with numbers instead of a color box where I can select the colors to show based on the value. This was the control I got instead.
This is the control I am trying to achieve (below):
Is there any way that I can get the color box on my control instead of the number controls? I am not sure if it can be changed through a control on the front panel or something but what I have tried so far keeps leading me back to this problem.
Any advice is much appreciated
A color box control is just a U32 number (three bytes for RGB and one which is always 0), which is why that's what you get.
There is a right click plugin which adds a replace with color box option directly to the right click menu of unsigned 32 bit numbers, but I don't remember if it ships with LV or not.
If you don't have that, you can always just right click the indicator inside the cluster, select replace and navigate the palettes to find the color box. You can also copy a color box and then select the indicator and paste, which replaces the selected control.
The color[4] is actually an array of 4 colors (UInt32 as Yair said), that define 2 color gradients, one for the 'Off' state, and the other for the 'On' State of the control.
If you want to set the control's color, you will have to define all 4 of them.
On my report, all the fields have their fixed width and height and if the content is longer than the width, it automatically increases the height of field (like G3 on screenshot). But I want it looks like G2 on screenshot.
I turned off text wrap option, dynamic height to false. However it doesn't seem there's change.
Someone can help me please?
Select the cell and set the option Style -> size & position -> x-overflow to true. This allows text to exceed the horizontal limit of its cell.
I want to have on the same page a pie chart and a bar chart, with trellis pages.
They both have 5 columns as trellis, so 5 different pages that you can visualize by scrolling down.
However, I would like to display the same pages at the same time for both graphs. For instance, let's imagine I'm on the pie chart, I scroll down one page - and so my pie chart is on page2 - I want my bar chart to automatically go to page 2 as well
I tried to use markings but although it links a bit the two graphs, it doesn't change the trellis pages automatically
Does anyone know how to do this ?
as #scsimon mentions, there's no native feature (nor API method, AFAIK) for this using a trellis. however, you can create a Property Control (I'd use a dropdown) in a Text Area, then use the same Document Property to your chart in a Limit By expression.
little more detail, assuming a data table like this:
A B CATEGORY
1 2 red
3 4 red
5 6 green
7 8 green
9 10 blue
11 12 blue
add a Text Area to the page and edit its contents
add a Property Control
click New to create a Document Property, give it a type String and a name category
change Set property value through to Unique values in column and choose the "category" column and click OK
save the Text Area contents
in your Pie Chart's Properties dialog, go to the Data page and look for Limit data using expression. click Edit
set the expression to: [CATEGORY] = "${category}" (don't forget the quotes or the Document Property won't be treated as a string and you'll get an error)
repeat steps 6 & 7 for your other chart
As #scsimon mentioned in the comments, it seems to be impossible. I found a way to have a similar representation though without using trellis visualization, by using text arena
I created a list box that contains the 5 columns I want to visualize, and then I select this list box as the vertical axis variable of the bar chart and the sector size of the pie chart
Then, by clicking on my list box, I can have a synchronized Pie chart and Bar chart (a bit different from what I expected but it also has some advantages like a multiple scale since a new graph is generated independently of the other variables)
Is there any way to populate the report viewer Dynamically (only labels)?, i what to make a little process where the users can define the label and position on the report, for example:
A)User pick this 2 fields:
1)Beneficiary Name
2) Amount of the payment
B) User pick the position of each label (or better with a drag/drop)
1)Beneficiary: Heigth = 30, width = 200, x = 20, y = 60
2)Amount: Heigth = 30, width = 80, x = 400, y = 60
C) We populate the report viewer so the user can see how his report is going to print.
Once the user save is report and want to print a Check/Payment, by code we only are going to take the label and position and send it to the print directly ("p.print()") not with a ReportViewer control, i only want the report viewer so the user can see how their report will see before printing it (position preview), or there another way to do this?.
I hope you get my idea of what a want to do here, thanks in advance.
(i use an example of 2 fields, the user will select between 30 to 40 different field)
The report definition is simply a XML file (text). As part of your report generate/run process, you could alter the contents of the .rdl file
Start by making a report template that has your fields on the report (with default positions).
Before you run the report, read template, replace (reposition or hide) those fields, save copy under a temp name.
Use your report viewer to run the (modified) copy.
I'm not saying it will be easy though. Your requirements sound tough.
The drag/drop resizing and add/removing controls (that you described) would probably have to be done using some pretty slick JQuery. There are plenty of nice examples of that kind of thing (goog).
Take a look at ReportBuilder. It allows user to create adhock reports on the fly.
Is there a way to automatically add a new line or something when a column in my ultraGrid is full? Sometimes when i load some text into a column in my ultragrid it has a longer value length than the available column field, as a result some text stays hidden. So i want when this happens to show the rest of the text in another line. Is this possible in vb.net for ultrawingrid?
You could set the CellMultiLine property as in the example below. (supposing you have one band and the column with the long text is the second one)
UltraGrid1.DisplayLayout.Bands(0).Columns(1).CellMultiLine = DefaultableBoolean.True
UltraGrid1.DisplayLayout.Bands(0).Columns(1).VertScrollBar = True
UltraGrid1.DisplayLayout.Override.DefaultRowHeight = 100
The next two lines are optional, but they serve the purpose to show immediately the column with a different height and with a vertical scrollbar