Print options in C1flexviewer control of C1 - report

I want to choose number of copies when I print my report in C1flexviewer control of C1 . how I can achieve this?

Related

How to get the comma separated values into rows like one below another oracle apex

I have a apex item with values like Value1,Value2,Value3, so on i need to show the values like below
Value 1
Value 2
Value 3
below is my select query, can anyone help here to show the comma seperated values as one below another
ex :: a,b,c,d
i need to see the output as
a
b
c
d
SELECT AD.EMAIL_ADDRESS recipient
FROM HES_EXTERNAL_ACCOUNTS EA,
HES_ADDRESSES AD
WHERE EA.ACCOUNT_CODE = 'AUTO';
The above query will result the email address like a,b,c,d i need to show in apex item as
a
b
c
d
While Chris Saxon's post describe many SQL scenarios, and a cool SQL macro, APEX provides a simple tool for splitting strings into rows:
select column_value from table(apex_string.split('a,b,c,d',','));
Result Sequence
----------------
a
b
c
d
That table() clause isn't required from a certain db version, perhaps 18c.
But your question isn't completely clear as to the output you need. On one hand it seems like you want to replace commas with spaces
replace('a,b,c,d', ',', ' ')
but then another moment you suggest one of top of the other
replace('a,b,c,d', ',', '<br>')
If displayed as a column in a report, this would need escaping turned off.
If that select returns a single row, then this is a possible solution:
CREATE TABLE emails (email_list) AS (
select 'mickey.mouse#disney.com, homer.simpson#acme.com'
from dual
);
Table EMAILS created.
select TRIM(regexp_substr (
email_list,
'[^,]+',
1,
level
)) email
from emails
connect by level <=
length ( trim ( both ',' from email_list ) ) -
length ( replace ( email_list, ',' ) ) + 1;
EMAIL
-----------------------------------------------
mickey.mouse#disney.com
homer.simpson#acme.com
But Chris has already done all the research and blogged about it here. That blog sums up most common cases and a solution in each of those cases.

How to print unique numbers dynamically with PLSQL

I would like to display Unique numbers dynamically. I have tried below code for the same but same number is displaying all the times.
DECLARE
a NUMBER;
BEGIN
FOR i IN 1 .. 3 LOOP
DBMS_OUTPUT.PUT_LINE(&a);
END LOOP;
END;
the above code will ask me for "a" value three times, if i pass 1,2,3 as parameters then it should display 1,2,3 but this code is displaying first(1) value three time as 1,1,1.
Could you please help me to get the required output like 1,2,3
You can't really create an interactive program in just PL/SQL. When you put &a in the PL/SQL and run it in a tool like SQL Developer, it prompts you once for a value for a before it runs the code, using the value you typed instead of the substitution variable a.
You want to print i and not a. Also the ampersand in front of the a means you will be prompted to enter a value for a.

Display text value instead of number in crystal report

I have a crystal report in which my datas are displayed. In my database table the branches are to be represented in numbers like 1,2,3 etc. So after displaying in crystal report the place of branch name shows as 1. So instead of number I need to show it as office.
example: If the branch name is '1' then in crystal report it will display as 'office', how can I achieve this?
Try this...
StringYourVar text := Totext({YourNumberField} , 6 , "YourText");
or this.
Maybe This situation (Display keywords instead of integers) can help you.
If {YourNumberField} = 1 Then "Office"
Esle If {YourNumberField} = 2 Then "YourText" .
make sure use crystal syntax in editor

Link array inside CSV for Neo4j

I have a file with 3 column where one of the column will consist of an "array" with delimiter as say "," . I will need to link the text inside the array to form something like a linked list. After which, it will be linked to the other 2 column.
For example:
Column 1 (Text): A
Column 2 (Array of text): B1, B2, B3, B4
Column 3 (Text): C
I will need something like A->B1->B2->B3->B4->C to be visualise in Neo4j.
I need help in forming the "LOAD CSV..." query. Appreciate any help offered!
You can use split for extracting each element of the desired array
USING PERIODIC COMMIT
LOAD CSV WITH HEADERS FROM
'file://directory/file.csv' AS line
with SPLIT(line.columnName,',') as arrayColumn
now you can use each data of the arrayColumn like
arrayColumn[0], arrayColumn[1]
then you can create relationships or node
MERGE (v:LabelName {name:arrayColumn[0]})-[:relations]->(v:LabelName {name:arrayColumn[1]})
Hope this helps ...

Unix grep command to return groups of rows in a textfile where it meets conditions

I have a large text file containing the following records:
024567808 name date etc..
0376567 dfu ugig etc..
0388888 dtg hii etc..
032357 tuth gug etc..
025789 gkh kjkjk etc..
Using the grep command, I am able to retrieve the line containing a keyword. How do I retrieve the next records if it starts with 03?
So for example I search for name, and it returns the first row. I want this record along with all the 03 rows until the next 02 record.
output should be:
024567808 name date etc..
0376567 dfu ugig etc..
0388888 dtg hii etc..
032357 tuth gug etc..
I think grep is not powerful enough for this sort of task. Perhaps awk could do it. What is the best way to do this kind of thing?
This might be what you want:
awk '/^02/{f=0} /name/{f=1} f' file
It all depends if you want "name" to only occur in a specific position on a line and whether or not you want "name" to only match if its not part of a longer word, e.g. do you want a search for "Jo" to match on "John"?

Resources