How to dynamically create a table to join with
I have a table of users and when they should submit time sheets: start date and end date.
I have a table of timesheets with user ID and week-ending date.
I need to construct a report of which timesheets are missing this year.
I effectively need a table of week-ending dates for the year to join with the user and table and filter on start/end dates - and derive a list of week-ending dates for which I expect to see timesheets.
But I donu2019t have write-access to the database: Can I effectively create a local table with the week-ending dates for the year?
We currently solve it by using a local Excel file. Is that the most efficient way? It is also a nuisance as we have to edit the report and copy the excel file when we move directories.
2nd question on the forum
Mike
Mikecro,
Trying to actually write a SQL script of any complexity in the Command window itself is a horrible experience. I'd recommend writing your SQL in SSMS and testing it there. Once you have the script written in SSMS and it producing the desired result set you can then copy and paste it into the CR Command. (Just use hard coded dummy parameters in SSMS and replace them once they're pasted into the command.)
If you are building "canned" reports that will ship with a software package, I'd recommend building it out as a stored procedure (and the same with any other reports). This will also make future support much easier by allowing you to make any modifications to the data set directly on the SQL Server without having to touch CR or CRS.
If you're acting as a 3rd party consultant and you don't have the access or authority to add SP objects to the SQL Server then sticking with the Command is going to be your best bet. This is still better than using linked tables IMO.
#1) CR simply lacks the ability to write SQL with any real level of complexity. It can't even create a simple sub-query.
#2) It looks more professional. From an end users pov a report that uses a sql command, as opposed to linked table, demonstrates that the report developer is of a more advance skill level.
#3) Most of your clients won't know how to write SQL themselves so they will need to re-engage your services to take care of any existing reports and to build new ones. It's easier to get repeat business than it is to get new business.
As you've already seen, getting everything into a single, well written, SQL command can make a dramatic improvement in report performance. If you get in the habit of building all of your reports using SPs, Views or Commands, you'll quickly come to appreciate added flexibility it affords you. Once to modify your report building workflows to accommodate the change, you won't even think about going back.
HTH,
Jason
Similar Messages
-
How do I create a table of contents with a nested style paragraph?
I'm having difficulty figuring out how to generate my Table of Contents with a nested style. In this screen shot, "SPECIAL EVENTS" is considered level one and the pink circled "Fittest Firm Challenge" is level 2. Because it is a nested style, it is picking up the entire paragraph. I don't want to put in a paragraph break because that would add too much space in the magazine since there are a lot of other listings like this. I've tried reading through other people's discussions but I'm totally lost with the explanations. Is there a simple workaround or solution to this?
apricotanna wrote:
I'm having difficulty figuring out how to generate my Table of Contents with a nested style. In this screen shot, "SPECIAL EVENTS" is considered level one and the pink circled "Fittest Firm Challenge" is level 2. Because it is a nested style, it is picking up the entire paragraph. I don't want to put in a paragraph break because that would add too much space in the magazine since there are a lot of other listings like this. I've tried reading through other people's discussions but I'm totally lost with the explanations. Is there a simple workaround or solution to this?
You're asking InDesign to do something it's not designed to do, namely, to treat a nested-style section of a paragraph as an independent paragraph. That's called a "run-in paragraph" in Adobe FrameMaker, and it's been a beloved feature there since FrameMaker was introduced in '89, about ten years before InDesign.
You can make a formal feature enhancement request here: Wishform Many InDesign features have come into being from user requests, so lend your voice, and be patient. Explain why you think a run-in paragraph feature would be useful.
Others have asked about this, and there are a number of workarounds that may or may not be suitable for you. Let's hope that some of the more-intense forum folks can help you with a useful search term for this forum, so that you can review what's been suggested and tried in the past, and what results you can expect.
In the meantime, you might consider inserting the second-level heading in an inline anchored text frame in the paragraph. It will be an independent paragraph but you can adjust appear on the same line as following paragraph. Then you can extract it for the TOC.
Here's an example:
HTH
Regards,
Peter
Peter Gold
KnowHow ProServices -
Appending column to an dynamically created internal table
Hi folks,
i have an dynamically created internal table <dyn_tab> which is based on a parameter p_table ( containing the table name ). now i want to add one more column to this <dyn_tab> table where i can store further information in. how can i do that ?
i appreciate your help!Hi,
Please check this sample program.
type-pools : abap.
field-symbols: <dyn_table> type standard table,
<dyn_wa>,
<dyn_field>.
data: dy_table type ref to data,
dy_line type ref to data,
xfc type lvc_s_fcat,
ifc type lvc_t_fcat.
selection-screen begin of block b1 with frame.
parameters: p_table(30) type c default 'T001'.
selection-screen end of block b1.
start-of-selection.
perform get_structure.
perform create_dynamic_itab.
form get_structure.
data : idetails type abap_compdescr_tab,
xdetails type abap_compdescr.
data : ref_table_des type ref to cl_abap_structdescr.
* Get the structure of the table.
ref_table_des ?=
cl_abap_typedescr=>describe_by_name( p_table ).
idetails[] = ref_table_des->components[].
loop at idetails into xdetails.
clear xfc.
xfc-fieldname = xdetails-name .
xfc-datatype = xdetails-type_kind.
xfc-inttype = xdetails-type_kind.
xfc-intlen = xdetails-length.
xfc-decimals = xdetails-decimals.
append xfc to ifc.
endloop.
*Add your new field(s) into table ifc here.
endform.
form create_dynamic_itab.
* Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = ifc
importing
ep_table = dy_table.
assign dy_table->* to <dyn_table>.
* Create dynamic work area and assign to FS
create data dy_line like line of <dyn_table>.
assign dy_line->* to <dyn_wa>.
endform.
Regards,
Ferry Lianto -
How do I create a Table of Contents in InDesign CS6 for print that easily converts to epub?
How do I create a Table of Contents in InDesign CS6 for a print book that easily converts to epub?
Can anyone point me to a link for a step-by-step (not a video) on setting up all the elements of a print book properly (pages, table of contents and index) so they will convert and reflow perfectly from print to epub in InDesign CS6. This is not about building an ebook from ground up, but taking 50 backlisted print books (converted from old versions of Quark to InDesign) that now need to be converted to epub formats.
OR could someone point me to the link in the Adobe InDesign CS6 support that explains how to create a Table of Contents for a print book (5.5" x 8.5", 288 pages), one that will convert when the file is converted to ePub (for MAC OSX)?
Just downloaded the 706 page inDesign CS6 reference manual from Adobe <http://helpx.adobe.com/pdf/indesign_reference.pdf> but there's not even a search feature on the pdf file.
Up until this week, we have only done print books, creating the TOC the old fashioned way, as a fixed page, comprised of two columns: page numbers and chapters/subject. The files I have created are taken by our printer and printed beautifully.
However, when I convert the same book to epub in CS6, the character and paragraph styles converted beautifully - but everything else is all over the place! The table of contents is on different pages, the columns split apart. That goes for the page contents as well - everything is all over the place. when it's converted to a pdf -- total perfection. Never any problems converting with perfection to pdf format and reading those on the various readers.
(Thank you so much in advance for any help).<http://helpx.adobe.com/pdf/indesign_reference.pdf> Adobe Digital Reader does have a search feature for reading pdfs. Found the TOC instructions on page 176 of 706 pages.
-
How Do I Create A Table?
I will admi9t that I am the newest of "newbies" to SQL Server so I pose the basic question : How Do I Create A Table in SQL Server? I read in a book fairly recently how to do this but have forgotten.
Steve R. Burrus"SQL Server 2008 supports the creation of tables using T-SQL, the SQL Server
Management Studio (SSMS) Object Explorer and the SSMS Database Diagram Editor. Regardless of the tool you choose, creating a table involves naming the table, defining the columns, and assigning properties to the columns. The visual tools (such
as Object Explorer and database diagrams) are usually the best starting point for creating tables.
Using Object Explorer to Create Tables
The Object Explorer in SSMS has a Tables node under each database listed. You can add tables via the Object Explorer by right-clicking this Tables node. As shown below the
New Table option displayed after you right-click the Tables node in Object Explorer. The top-right side of the screen shown in bleow.it is the table creation screen that allows you to enter the column name and data type and to set the Allow
Nulls option.
The data entry area under Column Name is a free-form area where you can define a column name. You can select the data type from the Data Type drop-down, which displays
the data types available with SQL Server. The Allow Nulls option is Boolean in nature and is either checked or not checked. For each column selected, a Column Properties section is displayed in SSMS, providing a myriad of additional properties that you can
assign to each column.
Using T-SQL to Create Tables
Ultimately, all the tables created with the visual tools can also be created by using T-SQL. As with many of the SSMS tools, database objects can be resolved or scripted into T-SQL statements.
Let’s examine the T-SQL syntax to better understand some of the table creation options. so let's create a Table name
test.Customer which has a 5 columns of CustomerID, LastName, FirstName, CreditLine, and CreationDate. so when you execute the bottom code you will have the table.
--START with USE command to tell the sql server which database you want to create the table on, this case we want to create the table on Adventurework2008 (it’s a Sample database)"
USE
Adventurework2008
CREATETABLE test.Customer
(CustomerID
INT IDENTITY(1,1),
LastName
VARCHAR(50)
NOT NULL,
FirstName
VARCHAR(50)
NOT NULL,
CreditLine
MONEY SPARSE NULL,
CreationDate
DATE NOT
NULL)
GO
I hope this helps answering your question more or less. Goodluck
Reference-book:
Microsoft® SQL Server 2008 R2 UNLEASHED Ray Rankins Paul Bertucci Chris Gallelli Alex T. Silverstein -
How do I create a table that breaks for new pages?
I'm running Pages 5.5.1 on OS X Yosemite 10.10.1 and am having difficulty understanding table behavior.
Scenario 1 - I create a new file and insert a table at the top of the first (blank) page. It automatically is selected for Object Placement>Move With Text. If I add rows to this table, Pages automatically adds a new page and breaks the table so that additional cells appear on the new page. All well and good. If I change the Object Placement to Stay on Page, the second page and those cells disappear.
Scenario 2 - I create a file and first add a few lines to the top of the first page. Then, I insert a table below those lines. It is also automatically selected for Object Placement>Move With Text. When I add rows, the table does not break for the second page, but the entire table jumps to the second page. If I change the Object Placement to Stay on Page, I can then slide the table back onto page one, but as in Scenario 1 the portion of the table which would continue onto page two disappears.
So, how do I create a table that I can add to a page which is not blank (as in Scenario 2) which will break automatically onto page 2 instead of jumping, and so the rows appear on page two (not disappear as I describe above)?
Thank you for your help.The inline table is supposed to break but like most things Pages 5 it is buggy and erratic in its behavior.
Use Pages '09.
Peter -
Uploading data from excel file to a dynamically created internal table
Hi,
I have a requirement where i have to upload data from an excel file into a database table. I would be able to determine the structure of the table only at runtime based on the user input.. so i have created an internal table dynamically.
Could you please tell me if its possible to upload data from an excel file to the dynamically created internal table using any function modules?
I thought of doing this by declaring a generic internal table of one field and then uploading the *.csv file into it and then splitting it based on "," and then assigning it to the field symbol referencing the internal table.. but my file length exceeds 132 characters and i'm only able to get data of lenght 132 char's in my internal table ( generic one).
Could anyone please show me a way around this.
Thanks in advance,
HarshaSure, check this out.
report zrich_0002.
type-pools: slis.
field-symbols: <dyn_table> type standard table,
<dyn_wa>,
<dyn_field>.
data: it_fldcat type lvc_t_fcat,
wa_it_fldcat type lvc_s_fcat.
type-pools : abap.
data: new_table type ref to data,
new_line type ref to data.
data: iflat type table of string.
data: xflat type string.
data: irec type table of string with header line.
data: tabix type sy-tabix.
data: file type string.
selection-screen begin of block b1 with frame title text .
parameters: p_file type rlgrap-filename default 'c:Test.csv'.
parameters: p_flds type i.
selection-screen end of block b1.
start-of-selection.
* Add X number of fields to the dynamic itab cataelog
do p_flds times.
clear wa_it_fldcat.
wa_it_fldcat-fieldname = sy-index.
wa_it_fldcat-datatype = 'C'.
wa_it_fldcat-inttype = 'C'.
wa_it_fldcat-intlen = 10.
append wa_it_fldcat to it_fldcat .
enddo.
* Create dynamic internal table and assign to FS
call method cl_alv_table_create=>create_dynamic_table
exporting
it_fieldcatalog = it_fldcat
importing
ep_table = new_table.
assign new_table->* to <dyn_table>.
* Create dynamic work area and assign to FS
create data new_line like line of <dyn_table>.
assign new_line->* to <dyn_wa>.
file = p_file.
call method cl_gui_frontend_services=>gui_upload
exporting
filename = file
changing
data_tab = iflat
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 17.
loop at iflat into xflat.
clear irec. refresh irec.
split xflat at ',' into table irec.
loop at irec.
tabix = sy-tabix.
assign component tabix of structure <dyn_wa> to <dyn_field>.
<dyn_field> = irec.
endloop.
append <dyn_wa> to <dyn_table>.
endloop.
* Write out data from table.
loop at <dyn_table> into <dyn_wa>.
do.
assign component sy-index of structure <dyn_wa> to <dyn_field>.
if sy-subrc <> 0.
exit.
endif.
if sy-index = 1.
write:/ <dyn_field>.
else.
write: <dyn_field>.
endif.
enddo.
endloop.
Regards,
Rich Heilman -
How do i create a table of contents from bookmarks?
How do I create a Table of Contents from the list of bookmarks? How do I format a Table of Contents?
Hi Brent!613,
I think you may have landed in the wrong forum. Are you using Acrobat? If so, this thread from the AcrobatUsers.com may be useful: https://answers.acrobatusers.com/Create-Table-Contents-pdf-Bookmarks-q192651.aspx
Best,
Sara -
How do I create a table within another table?
How do I create a table within another table?
As shown in image below (document created with Words), I already have a table with 3 columns. How do I create another table with 6 columns to tabulate the data (the one below "3.1 Overall")?Last time I checked in Pages 5.5.2 that is not possible.
Peter -
How do we create a Table pool
You need to use WLST online. I am not sure what your exact requirements are but one good way of working this is to have a WLST script that deletes all your WL customisations, like connection pools, JMS Servers etc and then creates it. That way you can run the same script repeatedly and it will get everything up to date for you. However you have to remember that everytime you add something new you need to update your delete section. Also your deleting should not fail if the item does not exist. I hope that makes sense!
As to the specifics of WLST examples to do this then check out the WLST examples in CodeShare.
If you are still having issues then post another message.
Geoff -
How to dynamically create a treeview in sharepoint using javascript or jquery
How to dynamically create a treeview in sharepoint using javascript that displays spsites ,spweb,splist
Hi,
In SharePoint 2010, we can customize web service and use Server Object Model to get all the SharePoint sites, webs and lists, then call the web service using jQuery and using the jQuery Treeview plugin to display the data.
The following articles for your reference:
Walkthrough: Creating a Custom ASP.NET Web Service
https://msdn.microsoft.com/en-us/library/office/ms464040%28v=office.14%29.aspx?f=255&MSPPError=-2147217396
Using Jquery to call an ASMX service in sharepoint 2010
http://stackoverflow.com/questions/9035539/using-jquery-to-call-an-asmx-service-in-sharepoint-2010
jQuery-ui Treeview
https://plugins.jquery.com/btechcotree/
Best Regards,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Dear Experts,
How Can I create plan Table.
How can i read it?run UTLXPLAN.SQL
under
$ORACLE_HOME/rdbms/admin/
check this link for detailed information
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14211/ex_plan.htm#i19260 -
How to create labeled table of Content with expand and collapse
Hi All,
Can somebody help me how to create labeled table of Content with expand and collapse as example given below:
User1
Template1
Template2
User2
+
User3
Template1
Template2
Like when we see expand (+) and collapse (-) button when we click on 'about this page' link.
Thanks
BhupendraHi,
Tou can use Table inside table to show the details this way but I'm not sure about Expand/Collapse.
Expand/Collapse are part of HGRID.
I think we can develop this functionality with little manipulation.
Regards,
Reetesh Sharma
Edited by: Reetesh Sharma on Jun 28, 2010 4:56 AM -
How set dynamically created query in GridControl?
How set dynamically created query in GridControl?
Thank youIf your dynamic query is based on an Entity object, then you can probably use RowSetInfo setQueryInfo method.
The argument to this method is a 'Query' object. There are three flavours provided in the oracle.dacf.dataset
package.
oracle.dacf.dataset.QueryViewInfo
defines an updateable SQL query based on a predefined BC4J View Object.
oracle.dacf.dataset.QueryStatementInfo
Creates a view object based on an arbitrary SQL statement.
oracle.dacf.dataset.QueryInfo
Creates a View Object from an Entity Object and additional SQL clauses. The View Object will have
that Entity Object as its sole Entity Object base.
If in your application you are able to specify the name of the entity, then you can use the QueryInfo method to define your
query. Please try the following.
SessionInfo si = ....
void runDynamicQuery()
RowSetInfo rsi = new RowSetInfo();
AttributeInfo ai = new AttibuteInfo(..);
ai.setName(..);
rsi..addChild(ai);
si.addChild( rsi)
rsi.setQueryInfo( new QueryInfo( ...../* include entity name */ .... ));
rsi.setName(....);
rsi.open(true);
grid.setDataItemName(...);
Hope this helps,
Sathish. -
How do you create a table of contents on pages?
How do you create a table of contents on pages?
Hi Megan ..
See page 102 > http://manuals.info.apple.com/en/pages_userguide.pdf
You may want to save that PDF file. It will come in handy.
Maybe you are looking for
-
Copy data from one application to another in the same application set
Hello everyone i hope you are all fit and fine i have a little question i have my source application with accounts and in my destination application, some accounts are like AppSource.Account1+AppSource.Account2 etc... when i write the logic i have to
-
Video wont render in FireFox on Mac?
Hi guys, http://www.griffith.edu.au/science-aviation/content-new/careers-outlook-animation/_nocache This works in all other browsers for me - except FireFox on Mac. The video elements dont even render. Any suggestions? THanks!
-
Because of an OS problem while troubleshooting Win 7 deleted .exe file of Bridge CC. On AAM it looks still installed but i can neither run nor reinstall it. Which files should i delete in order to see Bridge CC uninstalled on AAM.
-
HT201412 Touch screen input not responsive.
Touch screen input not responsive. Cannot slide to power off. Appear message "iCloud Backup: This ipad hasn't been backed up in 2 week. Backups happen when this ipad is plugged in, locked, and connected to wi-fi" Touch OK but nothing change. Does fol
-
Restricting the Travel expense claims for future date
Hi, We are configuring the BPs for ESS & MSS. Currently we are on NW portal 7.0 ,SPS15 and ECC6.0 at the backend. Can anyone suggest us, how to restrict the users NOT to apply the Travel expense claims for the future dates (i.e.the portal system is